-
Bug
-
Resolution: Done
-
Major
-
None
-
False
-
None
-
False
-
-
-
-
-
-
+
-
+
I have a table in a postgresql database which is of type jsonb.
I annotated the entity field with @org.hibernate.annotations.JdbcTypeCode(org.hibernate.type.SqlTypes.JSON)
I was not able to insert a new entity (using a trivial persist) as hibernate complained loudly:
org.hibernate.HibernateException: Could not find a FormatMapper for the JSON format, which is required for mapping JSON types. JSON FormatMapper configuration is automatic, but requires that you have either Jackson or a JSONB implementation like Yasson on the class path
As a work-around, I added the following lines in org.hibernate module.xml:
<module name="com.fasterxml.jackson.core.jackson-databind" optional="true" />
<module name="com.fasterxml.jackson.core.jackson-core" optional="true" />
I have zero confidence that my "fix" is correct, but "It Works (TM)" for this one application. Can you confirm that 1. the problem is legitimate and 2. the fix is OK ? I can carry the "patch" as long as needed.
- clones
-
WFLY-18275 Hibernate can't access Jackson
- Closed
-
WFLY-19262 hibernate.type.json_format_mapper error
- Closed
- is incorporated by
-
JBEAP-28024 (8.0.z) Upgrade EAP codebase to 8.0.7.GA-redhat-SNAPSHOT in EAP 8.0 Update 5
- Resolved