-
Bug
-
Resolution: Done
-
Major
-
7.0.2.GA
The following NullPointerException rarely happens in Web Service application.
This phenomenon occurs when Full GC happens before calling CachedContextAndSchemasInternal#getContext() in a constructor of org.apache.cxf.common.jaxb.JAXBContextCache$CachedContextAndSchemas. WeakReference<JAXBContext> context inside org.apache.cxf.common.jaxb.JAXBContextCache$CachedContextAndSchemasInternal is cleared at the Full GC then CachedContextAndSchemasInternal#getContext() returns null.
As far as I tested, this issue can not be reproducible with OpenJDK/Oracle JDK but it was reproducible with IBM JDK.
ERROR [io.undertow.request] (default task-1) UT005023: Exception handling request to /jboss-servlet-wsclient/client: java.lang.NullPointerException at org.apache.cxf.common.jaxb.JAXBUtils.createJAXBContextProxy(JAXBUtils.java:1500) at org.apache.cxf.jaxb.JAXBDataBinding.checkForJAXBAnnotations(JAXBDataBinding.java:412) at org.apache.cxf.jaxb.JAXBDataBinding.justCheckForJAXBAnnotations(JAXBDataBinding.java:406) at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:342) at org.apache.cxf.service.factory.AbstractServiceFactoryBean.initializeDataBindings(AbstractServiceFactoryBean.java:86) at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:423) at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:525) at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:261) at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:199) at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:102) at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:91) at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:157) at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:142) at org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:493) at org.jboss.wsf.stack.cxf.client.ProviderImpl$JBossWSServiceImpl.createPort(ProviderImpl.java:578) at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:343) at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:338) at javax.xml.ws.Service.getPort(Service.java:168) at org.jboss.as.quickstarts.wshelloworld.Client.<init>(Client.java:44) at org.jboss.as.quickstarts.wshelloworld.WSClientServlet.doGet(WSClientServlet.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50) at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:285) at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:264) at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81) at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:175) at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202) at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:802) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1153) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.lang.Thread.run(Thread.java:785)
Note: this issue is originally reported as https://bugzilla.redhat.com/show_bug.cgi?id=1384856 in EAP 6.4 (CXF 2.7.x). Same issue is still reproducible in EAP 7.0.x (CXF 3.1.x).
- clones
-
JBEAP-6433 [GSS](7.1.0) NullPointerException at org.apache.cxf.common.jaxb.JAXBUtils.createJAXBContextProxy
- Closed
- is incorporated by
-
JBEAP-8885 [GSS](7.0.z) Upgrade Apache CXF to 3.1.10 (from 3.1.8)
- Closed
- is related to
-
CXF-7166 Loading...