Hello together,
i use hibernate3 (bundle) in a servlet.
Before a webservice function is closed, the lazyloaded values location in user shall be initilized with
Code:
Hibernate.initialize(rideSearch.locationStart);
hibernate correctly calls the database access, however the object is still refered to javassistLazyInitializer(id=190). Trying to marshalling it creates the error:
Code:
31.03.2011 01:12:14 org.apache.catalina.core.StandardWrapperValve invoke
SCHWERWIEGEND: Servlet.service() for servlet *** Web Service threw exception
org.codehaus.jackson.map.JsonMappingException: No serializer found for class org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: de.***ReturnSearch["rideSearch"]->de***RideSearch["user"]->de***model.User_$$_javassist_1["handler"])
When Hibernate.initialize is called the "variables" in eclipse show the following change:
* user.location.handler changes from false to true
* user.location.handler.target is correctly filled with all the data
For some reason the actuall java class is not filled with the data of user.location.handler.target though. Could anybody give me a hint?
Thank you very much!!