users@jersey.java.net

[Jersey] [java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory not found by com.sun.jersey.glassfish.v3.osgi.jersey-gf-server [48]]

From: Kevin Duffey <andjarnic_at_yahoo.com>
Date: Mon, 11 Feb 2013 12:44:34 -0800 (PST)

Hi all,

I have been digging around the net for this issue.. and from what I can tell, it's "fixed" in 1.14 or 1.15. I don't know why or how this is now happening. I am using Glassfish 3.1.2.2 on Linux Mint 14 64-bit. I have not changed anything that I know of. I grabbed the latest jersey-1.17 bundle jar and deleted the glassfish/modules/jerse* (and jettison and jackson*) files, unzipped into there, replaced my project libs with the same unzipped jars. I build my WAR without the jars in it, since it's part of the glassfish classpath. When I deploy, I am getting this exception (I'll paste it at the end).

I am running JDK 1.7 (latest as of a couple weeks ago).  I don't even know if this breaks my app, but thus far it bugs me that it's even showing up. I do use json and jaxb within my jersey rest services, so it's got me a little spooked that it may break my app. I'll be testing that now, but in the mean time.. I was hoping one of you jersey/glassfish deploy experts may shed some light on this.

Thanks.


Stacktrace:

[#|2013-02-11T12:18:41.087-0800|INFO|glassfish3.1.2|com.sun.jersey.server.impl.application.WebApplicationImpl|_ThreadID=169;_ThreadName=Thread-2;|Initiating Jersey application, version 'Jersey: 1.17 01/17/2013 03:31 PM'|#]

[#|2013-02-11T12:18:41.199-0800|WARNING|glassfish3.1.2|com.sun.jersey.server.impl.wadl.WadlApplicationContextImpl|_ThreadID=169;_ThreadName=Thread-2;|Provider com.sun.xml.internal.bind.v2.ContextFactory not found
javax.xml.bind.JAXBException: Provider com.sun.xml.internal.bind.v2.ContextFactory not found
 - with linked exception:
[java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory not found by com.sun.jersey.glassfish.v3.osgi.jersey-gf-server [48]]
    at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:148)
    at javax.xml.bind.ContextFinder.find(ContextFinder.java:361)
    at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:446)
    at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:409)
    at com.sun.jersey.server.impl.wadl.WadlApplicationContextImpl.<init>(WadlApplicationContextImpl.java:95)
    at com.sun.jersey.server.impl.wadl.WadlFactory.init(WadlFactory.java:96)
    at com.sun.jersey.server.impl.application.RootResourceUriRules.initWadl(RootResourceUriRules.java:169)
    at com.sun.jersey.server.impl.application.RootResourceUriRules.<init>(RootResourceUriRules.java:106)
    at com.sun.jersey.server.impl.application.WebApplicationImpl._initiate(WebApplicationImpl.java:1331)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.access$700(WebApplicationImpl.java:168)
    at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:774)
    at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:770)
    at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:193)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:770)
    at com.sun.jersey.api.container.ContainerFactory.createContainer(ContainerFactory.java:172)
    at com.sun.jersey.api.container.ContainerFactory.createContainer(ContainerFactory.java:134)
    at org.glassfish.admin.rest.LazyJerseyInit.exposeContext(LazyJerseyInit.java:146)
    at org.glassfish.admin.rest.adapter.RestAdapter.exposeContext(RestAdapter.java:337)
    at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:146)
    at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
    at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
    at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
    at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory not found by com.sun.jersey.glassfish.v3.osgi.jersey-gf-server [48]
    at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1460)
    at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72)
    at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
    at javax.xml.bind.ContextFinder.safeLoadClass(ContextFinder.java:573)
    at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:145)
    ... 36 more
|#]






>________________________________
> From: Jeff Adamson <jwa_at_urbancode.com>
>To: users_at_jersey.java.net
>Sent: Monday, February 11, 2013 7:17 AM
>Subject: [Jersey] Can't svn checkout jersey 1.x source
>
>
>The svn url https://svn.java.net/svn/jersey~svn/trunk is prompting for credentials.
>It can be browsed with the http://java.net/projects/jersey/sources/svn/show/ but the direct checkout url on that page does not work.
>
>
>
>Am I missing some sort of read-only credentials?
>
>
>
>--Jeff
>
>