My Oracle Support Banner

NullPointerException When Using EclipseLink MOXy Providers With RequestWrapper And No Package In The ClassName Specification (Doc ID 1518799.1)

Last updated on APRIL 12, 2018

Applies to:

Oracle Weblogic Server - Version 12.1.1.0 and later
Information in this document applies to any platform.

Symptoms

 

generateWsdl="true" once you add it you will hit the exception.
<jws file="com/daleen/dataclasses/Test.java" type="JAXWS"   generateWsdl="true" explode="true"/> 

 when generating web service using RequestWrapper and ResponseWrapper with out package names using EclipseLink MOXy Providers, This is failing with NullPointerException

Caused by: java.lang.NullPointerException
  at com.sun.xml.ws.db.toplink.JAXBContextFactory.newContext(JAXBContextFactory.java:140)
  at com.sun.xml.ws.spi.db.BindingContextFactory.create(BindingContextFactory.java:179)
  at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:211)
  at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:185)
  at java.security.AccessController.doPrivileged(Native Method)
  at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:184)
  at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:109)
  at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:321)
  at weblogic.wsee.tools.jws.jaxws.JAXWSProcessor.generateWsdl(JAXWSProcessor.java:276)
  at weblogic.wsee.tools.jws.jaxws.JAXWSProcessor.finish(JAXWSProcessor.java:138)

 

Note: MOXy Providers http://docs.oracle.com/cd/E24329_01/web.1211/e24964/data_types.htm#CIHBHDGI
  com.sun.xml.ws.spi.db.BindingContextFactory=com.sun.xml.ws.db.toplink.JAXBContextFactory
  javax.xml.bind.JAXBContext=org.eclipse.persistence.jaxb.JAXBContextFactory
  

 



Changes

 

The Glassfish RI JAXB data binding and JAXB providers provide the standard Glassfish JAXB implementation, and were the default JAXB providers in previous WebLogic Server releases. If desired, you can restore the Glassfish RI providers, either globally on the server, or on a per application basis.

Note that the JAXB data binding provider and the JAXB provider are two distinct entities, although both use EclipseLink MOXy as the default. The JAXB data binding provider is used by the Web services tooling and runtime, and performs tasks such as WSDL generation from a Java endpoint, as in the JWS task, and the runtime marshalling and unmarshalling of the contents of the SOAP message. The JAXB provider, on the other hand, specifies which JAXBContext provider to use for all other JAXB-related tasks. Although the JAXB provider configuration does apply to some of the Web services tooling, such as Java class generation from WSDL/schema files, it includes all other JAXB usage as well. These two providers can be configured independently. For example, you could retain EclipseLink MOXy for data binding, but revert to the Glassfish RI JAXB provider for other JAXB tasks.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.