Never tried openjdk, but you MAY be able to get it to work by taking the jaxb-
impl and jaxb-api jars and such from the CXF distribution and throwing it in 
the endorsed directory.   Just a thought of something to try.


Dan


On Wed June 17 2009 3:57:43 pm Eugeny N Dzhurinsky wrote:
> Hello everybody!
>
> I recently faced the very strange issue: under openjdk6 serializing to XML
> simply doesn't work. Even examples don't work well - the server returns
> empty content for the REST requests. Suddenly I noticed the following
> exception:
>
> SEVERE: EXCEPTION
> java.lang.NoClassDefFoundError: Could not initialize class
> com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder at
> com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.
>java:432) at
> com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:297
>) at
> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139)
> at
> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:117)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
>9) at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
>l.java:25) at java.lang.reflect.Method.invoke(Method.java:597)
>         at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:210)
>         at javax.xml.bind.ContextFinder.find(ContextFinder.java:368)
>         at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
>         at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)
>         at
> org.apache.cxf.jaxrs.provider.AbstractJAXBProvider.getClassContext(Abstract
>JAXBProvider.java:132) at
> org.apache.cxf.jaxrs.provider.AbstractJAXBProvider.getJAXBContext(AbstractJ
>AXBProvider.java:124) at
> org.apache.cxf.jaxrs.provider.AbstractJAXBProvider.createUnmarshaller(Abstr
>actJAXBProvider.java:196) at
> org.apache.cxf.jaxrs.provider.JAXBElementProvider.readFrom(JAXBElementProvi
>der.java:118) at
> org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBody(JAXRSUtils.java:8
>27) at
> org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameter(JAXRSUtils.java:470)
> at
> org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameters(JAXRSUtils.java:435
>) at
> org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInI
>nterceptor.java:194) at
> org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInIn
>terceptor.java:65) at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai
>n.java:236) at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationO
>bserver.java:89) at
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(Jet
>tyHTTPDestination.java:302) at
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTT
>PDestination.java:265) at
> org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandle
>r.java:70) at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCol
>lection.java:230) at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at
> org.mortbay.jetty.Server.handle(Server.java:326)
>         at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534) at
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java
>:879) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747) at
> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) at
> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409
>) at
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:52
>0)
>
> so looks like openjdk lacks some required classes. I believe this is not
> cxf-related issue, however just in case - it looks like there is no way to
> use openjdk with JAX-RS implementation in CXF. Can somebody please try out
> to run jaxrs/basic example under openjdk and let me know, does it work
> fine?
>
> Thank you in advance!

-- 
Daniel Kulp
[email protected]
http://www.dankulp.com/blog

Reply via email to