« Return to Thread: Re: Customizing marshalling

Re: Customizing marshalling

by metro-3 :: Rate this Message:

Reply to Author | View in Thread

Hello,

I am using Hibernate 3 in glassfish v2.1 and I ran into this same problem. In my project there are stateless session beans exposing SOAP web service interface. These SLSBs access Hibernate entities and in many cases, returns one or Collection of these entities in the web service response.

During JAXB marshaling when constructing the web service response, if a entity (the one to be returned) has related entities via a lazy load association then it throws:

org.hibernate.LazyInitializationException: could not initialize proxy - no Session

Just like the problem described here. Another twist is that the same problem was NOT there when the same project was deployed to glassfish v2.0.

Since this thread is more than 2 years old, do we have a more or less standard solution to tell JAXB how to handle the situation ?

Does anyone have any explanation on why glassfish v2.0 and v2.1 behaves so differently in this aspect ?

Thanks
[Message sent by forum member 'ming_chan' (ming_chan)]

http://forums.java.net/jive/thread.jspa?messageID=354938

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

 « Return to Thread: Re: Customizing marshalling