New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jackson2DatatypeHelper should register Jackson's Hibernate 5 module automatically if present [DATAREST-607] #980
Comments
Rikard Oxenstrand commented Hibernate 5 is included in [Spring IO Platform release Athens I have included a patch that solved the problem for me. It registers the Hibernate 5 module and also force hibernate lazy lookup in the The dependencies should also be updated with the Hibernate 5 module. I'm not sure where that should be done so it's not included in the patch: <dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-hibernate5</artifactId>
<version>2.8.1</version>
</dependency> |
Oliver Drotbohm commented What's the reason you don't simply register the Jackson module yourself? In There's a couple of other issues I see here:
|
Rikard Oxenstrand commented I have been using data-rest since 2.1.4 and the Jackson2DatatypeHelper have previously registered and configured the jackson-datatype-hibernate module. There have never been any need to register the module myself. Since hibernate 5 is included in the next release that is planned for next week (mid-September) I'm a bit surprised that you downgraded the priority of the issue. The other issue is also related to lazy-loading in Hibernate 5 and I ran into it after testing my updated version of It was not my intention to sneak in any changes. That is why I stated what class I changed and what. Next time I will explain the changes and what needs to be done in more detail. I agree that the update in |
Oliver Drotbohm commented It always has registered the module for Hibernate 4. You can register the module for Hibernate 5 yourself. Plus the lack of automatic registration is by no means affecting the core functionality of the library. Hence the prioritization. If, assuming the Hibernate 5 module is registered, we have an issue with serialization, we need to fix that. However — again — this is not what this ticket is about. So feel free to raise a new issue so that we can act on those things independently |
Petar Tahchiev opened DATAREST-607 and commented
I saw that jackson-datatype-hibernate has included a hibernate5 module:
https://github.com/FasterXML/jackson-datatype-hibernate
However, I do have the jackson-datatype-hibernate in my classpath (using hibernate5), but when I try to access the https://localhost:8112/storefront/rest/variant/564503594854080/catalogVersion
I get this error:
I believe this is because in
Jackson2DatatypeHelper
you register the Hibernate4 module and not the Hibernate5 oneAffects: 2.4 M1 (Gosling)
Attachments:
Referenced from: commits 31c894e
2 votes, 3 watchers
The text was updated successfully, but these errors were encountered: