jackson-datatype-hibernate
jackson-datatype-hibernate copied to clipboard
Still getting LazyInitialization Exception
Hi ,
I have integrated jackson-datatype-hibernate version 2.3.3 into my application. I am using spring MVC 3.2 and hibernate 3.6.
My Controller returns a User Object that has few String Fields , and collections defined in it .
The ManyToMany relationships on the collections in User (hibernate Entity) have been mentioned to use lazy fetch stratergy.
My expectation was using this module jackson can serialize the entire user object including the collections while generating the JSON, But instead I am still getting LazyInitializtion Exception.
Any help would be appreciated.
Regards, Ravi
check your dependency version
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-hibernate4</artifactId>
<version>2.4.1</version>
</dependency>
Relevant : https://github.com/FasterXML/jackson-datatype-hibernate/pull/58