Search code examples
jakarta-eejaxbweblogic

JAXB Webservice migrating from Weblogic 10 to 12


I have a running webservice (JAX-WS 2.2) on a Weblogic 10.3. Everything works fine. So there can't be the problem in the wsdl.

I try to migrate to WLS 12. But now I get erros while deplyoment.

What has changed from WLS 10 to WLS 12 which yould cause the problem?


Solution

  • The JAXB implementation changed for WLS 12.

    • In Oracle Weblogic WLS10 Glassfish JAXB RI Implementation is provided
    • In Oracle Weblogic WLS12 the EclipseLink Implementaiotn MOXy is provided

    You can force WLS12 using JAXB RI as described oracle docs

    You need to override the following two properties in order to tell WLS12 to use JAXB RI:

    • com.sun.xml.ws.spi.db.BindingContextFactory=com.sun.xml.ws.db.glassfish.JAXBRIContextFactory
    • javax.xml.bind.JAXBContext=com.sun.xml.bind.v2.ContextFactory

    The simplest way to do this, is to add a databinding.override_1.0.0.0.jar to your classpath

    Or you could set them as java system properties, but as written in the oracle docs

    In certain situations, it can be difficult to propagate the system properties to an indirectly invoked Java instance, such as a client forked from an Ant task. In these situations, it is important to ensure that the environment you are using propagates the properties.