0 Replies Latest reply on Mar 25, 2014 12:21 PM by zzum

    JAX-WS + Hibernate + JAXB: How to avoid LazyInitializationException during marshalling

    zzum

      I have a JAX-WS application which is deployed to JBoss EAP 6.2. Now we get a lot of lazy loading exceptions when JAX-WS is marshalling a response.

       

      I found a solution:

      https://blogs.oracle.com/searls/entry/jaxb_custom_accessor_for_marshalling

       

      Now I have problems to apply this, because I do not find the correct places to configure JAXB in JBossWS. I need to pass only one property to the JAXB context: JAXBRIContext.XMLACCESSORFACTORY_SUPPORT.

       

      Are there any solutions that don't depend on the JAX-WS implementation (CXF)?

       

      For more details, please see my question on stackoverflow.com:

      http://stackoverflow.com/questions/22509921/jax-ws-hibernate-jaxb-how-to-avoid-lazyinitializationexception-during-marsh

       

      Thanks in advance,

      Ruslan