karlmdavis / rps-tourney

An online multi-player Rock-Paper-Scissors game. Just because.
https://rpstourney.com/
1 stars 2 forks source link

Web service error on justdaivs.com: "java.lang.ClassNotFoundException: com.sun.xml.bind.marshaller.NamespacePrefixMapper" #32

Closed karlmdavis closed 10 years ago

karlmdavis commented 10 years ago

Not really sure why this is happening there but not on my local development box, but the web service is blowing up badly on eddings.

karlmdavis commented 10 years ago

A quick test indicates that the previous CXF release, 3.0.0-milestone1, didn't include any additional JAXB libraries.

karlmdavis commented 10 years ago

Here's the full stack trace from /var/lib/tomcat7/logs/rps-tourney-service-app.log:

2014-09-01 12:46:42,330 [http-bio-8080-exec-3] ERROR o.apache.cxf.jaxrs.utils.JAXRSUtils - Problem with writing the data, class java.util.ArrayList, ContentType: text/xml
2014-09-01 12:46:42,339 [http-bio-8080-exec-3] WARN  o.a.cxf.phase.PhaseInterceptorChain - Interceptor for {http://app.service.rpstourney.karl.justdavis.com/}ServiceStatusResour
ceImpl has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: com/sun/xml/bind/marshaller/NamespacePrefixMapper
        at org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleWriteException(JAXRSOutInterceptor.java:363) ~[cxf-rt-frontend-jaxrs-3.0.1.jar:3.0.1]
        at org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.serializeMessage(JAXRSOutInterceptor.java:266) ~[cxf-rt-frontend-jaxrs-3.0.1.jar:3.0.1]
        at org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.processResponse(JAXRSOutInterceptor.java:117) ~[cxf-rt-frontend-jaxrs-3.0.1.jar:3.0.1]
        at org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleMessage(JAXRSOutInterceptor.java:80) ~[cxf-rt-frontend-jaxrs-3.0.1.jar:3.0.1]
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307) [cxf-core-3.0.1.jar:3.0.1]
        at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:83) [cxf-core-3.0.1.jar:3.0.1]
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307) [cxf-core-3.0.1.jar:3.0.1]
        at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) [cxf-core-3.0.1.jar:3.0.1]
        at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:243) [cxf-rt-transports-http-3.0.1.jar:3.0.1]
        at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223) [cxf-rt-transports-http-3.0.1.jar:3.0.1]
        at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:197) [cxf-rt-transports-http-3.0.1.jar:3.0.1]
        at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:149) [cxf-rt-transports-http-3.0.1.jar:3.0.1]
        at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:171) [cxf-rt-transports-http-3.0.1.jar:3.0.1]
        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:286) [cxf-rt-transports-http-3.0.1.jar:3.0.1]
        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:211) [cxf-rt-transports-http-3.0.1.jar:3.0.1]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) [tomcat-servlet-api-3.0.jar:na]
        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:262) [cxf-rt-transports-http-3.0.1.jar:3.0.1]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) [tomcat-catalina-7.0.26.jar:7.0.26]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) [tomcat-catalina-7.0.26.jar:7.0.26]
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224) [tomcat-catalina-7.0.26.jar:7.0.26]
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169) [tomcat-catalina-7.0.26.jar:7.0.26]
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) [tomcat-catalina-7.0.26.jar:7.0.26]
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) [tomcat-catalina-7.0.26.jar:7.0.26]
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) [tomcat-catalina-7.0.26.jar:7.0.26]
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927) [tomcat-catalina-7.0.26.jar:7.0.26]
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) [tomcat-catalina-7.0.26.jar:7.0.26]
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) [tomcat-catalina-7.0.26.jar:7.0.26]
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987) [tomcat-coyote-7.0.26.jar:7.0.26]
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579) [tomcat-coyote-7.0.26.jar:7.0.26]
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309) [tomcat-coyote-7.0.26.jar:7.0.26]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_65]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_65]
        at java.lang.Thread.run(Thread.java:745) [na:1.7.0_65]
Caused by: java.lang.NoClassDefFoundError: com/sun/xml/bind/marshaller/NamespacePrefixMapper
        at java.lang.ClassLoader.defineClass1(Native Method) ~[na:1.7.0_65]
        at java.lang.ClassLoader.defineClass(ClassLoader.java:800) ~[na:1.7.0_65]
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[na:1.7.0_65]
        at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2836) ~[tomcat-catalina-7.0.26.jar:7.0.26]
        at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1160) ~[tomcat-catalina-7.0.26.jar:7.0.26]
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1668) ~[tomcat-catalina-7.0.26.jar:7.0.26]
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1546) ~[tomcat-catalina-7.0.26.jar:7.0.26]
        at org.apache.cxf.common.classloader.ClassLoaderUtils.loadClass(ClassLoaderUtils.java:256) ~[cxf-core-3.0.1.jar:3.0.1]
        at org.apache.cxf.common.jaxb.JAXBUtils.createNamespaceWrapper(JAXBUtils.java:1024) ~[cxf-core-3.0.1.jar:3.0.1]
        at org.apache.cxf.common.jaxb.JAXBUtils.setNamespaceMapper(JAXBUtils.java:559) ~[cxf-core-3.0.1.jar:3.0.1]
        at org.apache.cxf.jaxrs.provider.AbstractJAXBProvider.setNamespaceMapper(AbstractJAXBProvider.java:155) ~[cxf-rt-frontend-jaxrs-3.0.1.jar:3.0.1]
        at org.apache.cxf.jaxrs.provider.JAXBElementProvider.marshalCollectionMember(JAXBElementProvider.java:422) ~[cxf-rt-frontend-jaxrs-3.0.1.jar:3.0.1]
        at org.apache.cxf.jaxrs.provider.JAXBElementProvider.marshalCollection(JAXBElementProvider.java:382) ~[cxf-rt-frontend-jaxrs-3.0.1.jar:3.0.1]
        at org.apache.cxf.jaxrs.provider.JAXBElementProvider.writeTo(JAXBElementProvider.java:313) ~[cxf-rt-frontend-jaxrs-3.0.1.jar:3.0.1]
        at org.apache.cxf.jaxrs.utils.JAXRSUtils.writeMessageBody(JAXRSUtils.java:1363) ~[cxf-rt-frontend-jaxrs-3.0.1.jar:3.0.1]
        at org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.serializeMessage(JAXRSOutInterceptor.java:244) ~[cxf-rt-frontend-jaxrs-3.0.1.jar:3.0.1]
        ... 31 common frames omitted
Caused by: java.lang.ClassNotFoundException: com.sun.xml.bind.marshaller.NamespacePrefixMapper
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1701) ~[tomcat-catalina-7.0.26.jar:7.0.26]
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1546) ~[tomcat-catalina-7.0.26.jar:7.0.26]
        ... 47 common frames omitted
2014-09-01 12:46:42,379 [http-bio-8080-exec-3] INFO  o.a.c.i.LoggingOutInterceptor - Outbound Message: [id=2,responseCode=500,encoding='UTF-8',contentType='text/xml',headers={Content-Type=[text/xml], Date=[Mon, 01 Sep 2014 16:46:42 GMT], Set-Cookie=[authToken=d137870b-efb0-4835-b397-66fa9bf2e4fe;Comment=;Domain=localhost;Max-Age=31536000;Path=/;Secure;Version=1]},message='',payload='<?xml version="1.0" encoding="UTF-8"?><ns1:gameSessions xmlns:ns1="http://justdavis.com/karl/rpstourney/api/schema/v1"><ns1:XMLFault xmlns:ns1="http://cxf.apache.org/bindings/xformat"><ns1:faultstring xmlns:ns1="http://cxf.apache.org/bindings/xformat">java.lang.NoClassDefFoundError: com/sun/xml/bind/marshaller/NamespacePrefixMapper</ns1:faultstring></ns1:XMLFault>']
karlmdavis commented 10 years ago

Just noticed: eddings is using OpenJDK, while my development box (jordan-u) is using Oracle's JDK.

karlmdavis commented 10 years ago

Some hints: http://stackoverflow.com/questions/2326107/what-happened-to-jaxbs-namespaceprefixmapper-in-jdk6u18.