user4559248
user4559248

Reputation: 51

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?

Upvotes: 3

Views: 4111

Answers (2)

Kass
Kass

Reputation: 1

I am upgrading from 10.3.6 to 12.2.1.3 and seeing the same issue: Exception below. modules/databinding.override_1.0.0.0.jar is not part of the distribution but I found: Oracle/Middleware_Home12c/wlserver/modules/databinding.override.jar which I included in the calsspath but that did not fix the issue, still getting the same exception.

Feb 07, 2019 9:22:51 AM org.springframework.web.context.ContextLoader initWebApplicationContext

SEVERE: Context initialization failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'basketService' defined in ServletContext resource [/WEB-INF/store-services.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public synchronized java.lang.Object org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create()] threw exception; nested exception is Exception [EclipseLink-25037] (Eclipse Persistence Services - 2.6.5.v20170607-b3d05bd): org.eclipse.persistence.exceptions.XMLMarshalException

Exception Description: A cycle is detected in the object graph.  This will cause an infinite loop: org.eclipse.persistence.internal.oxm.schema.model.ComplexType@8e926ca -> org.eclipse.persistence.internal.oxm.schema.model.Element@3e83f11a -> org.eclipse.persistence.internal.oxm.schema.model.Sequence@745d452e -> org.eclipse.persistence.internal.oxm.schema.model.ComplexType@8e926ca

        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:597)

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1055)

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:951)

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)

Upvotes: 0

Lorenz Pfisterer
Lorenz Pfisterer

Reputation: 863

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.

Upvotes: 6

Related Questions