Hi,
Looks like a JAXB class conflict issue when creating a JAXBContext.
What version of SE are you using? and what version of JAXB is utilized
by the Web container?
Paul.
On Aug 3, 2009, at 11:48 PM, RajKal wrote:
>
> Why am i getting below error when accessing produces as "application/
> xml", "application/json"?
>
> I have these jars in the path (web-inf/lib):
> asm-3.1.jar
> jaxb-api-2.1.jar
> jaxb-impl-2.1.10.jar
> jersey-core-1.0.2.jar
> jersey-server-1.0.2.jar
> jsr311-api-1.0.jar
> stax-api-1.0-2.jar
> wlfullclient.jar
> wstx-asl-3.2.6.jar
>
>
> Error 500--Internal Server Error
>
>
> java.lang.NoClassDefFoundError: Could not initialize class
> com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl
> at com.sun.xml.bind.v2.model.impl.RuntimeTypeInfoSetImpl.
> (RuntimeTypeInfoSetImpl.java:61)
> at
> com
> .sun
> .xml
> .bind
> .v2
> .model
> .impl.RuntimeModelBuilder.createTypeInfoSet(RuntimeModelBuilder.java:
> 129)
> at
> com
> .sun
> .xml
> .bind
> .v2
> .model
> .impl.RuntimeModelBuilder.createTypeInfoSet(RuntimeModelBuilder.java:
> 81)
> at com.sun.xml.bind.v2.model.impl.ModelBuilder.(ModelBuilder.java:
> 152)
> at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.
> (RuntimeModelBuilder.java:89)
> at
> com
> .sun
> .xml
> .bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:
> 431)
> at com.sun.xml.bind.v2.runtime.JAXBContextImpl.
> (JAXBContextImpl.java:288)
> at com.sun.xml.bind.v2.runtime.JAXBContextImpl
> $JAXBContextBuilder.build(JAXBContextImpl.java:1111)
> at
> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:
> 154)
> at
> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:
> 121)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun
> .reflect
> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun
> .reflect
> .DelegatingMethodAccessorImpl
> .invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:202)
> at javax.xml.bind.ContextFinder.find(ContextFinder.java:363)
> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)
> at
> com
> .sun
> .jersey
> .core
> .provider
> .jaxb
> .AbstractJAXBProvider.getStoredJAXBContext(AbstractJAXBProvider.java:
> 199)
> at
> com
> .sun
> .jersey
> .core
> .provider
> .jaxb.AbstractJAXBProvider.getJAXBContext(AbstractJAXBProvider.java:
> 177)
> at
> com
> .sun
> .jersey
> .core
> .provider
> .jaxb.AbstractJAXBProvider.getMarshaller(AbstractJAXBProvider.java:
> 163)
> at
> com
> .sun
> .jersey
> .core
> .provider
> .jaxb.AbstractJAXBProvider.getMarshaller(AbstractJAXBProvider.java:
> 136)
> at
> com
> .sun
> .jersey
> .core
> .provider
> .jaxb
> .AbstractRootElementProvider
> .writeTo(AbstractRootElementProvider.java:138)
> at
> com
> .sun
> .jersey.spi.container.ContainerResponse.write(ContainerResponse.java:
> 254)
> at
> com
> .sun
> .jersey
> .server
> .impl
> .application
> .WebApplicationImpl._handleRequest(WebApplicationImpl.java:578)
> at
> com
> .sun
> .jersey
> .server
> .impl
> .application
> .WebApplicationImpl.handleRequest(WebApplicationImpl.java:502)
> at
> com
> .sun
> .jersey
> .server
> .impl
> .application
> .WebApplicationImpl.handleRequest(WebApplicationImpl.java:493)
> at
> com
> .sun
> .jersey.spi.container.servlet.WebComponent.service(WebComponent.java:
> 308)
> at
> com
> .sun
> .jersey
> .spi
> .container.servlet.ServletContainer.service(ServletContainer.java:314)
> at
> com
> .sun
> .jersey
> .spi
> .container.servlet.ServletContainer.service(ServletContainer.java:239)
> at weblogic.servlet.internal.StubSecurityHelper
> $ServletServiceAction.run(StubSecurityHelper.java:227)
> at
> weblogic
> .servlet
> .internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:
> 125)
> at
> weblogic
> .servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
> at
> weblogic
> .servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
> at weblogic.servlet.internal.WebAppServletContext
> $ServletInvocationAction.run(WebAppServletContext.java:3498)
> at
> weblogic
> .security
> .acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
> at weblogic.security.service.SecurityManager.runAs(Unknown Source)
> at
> weblogic
> .servlet
> .internal
> .WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
> at
> weblogic
> .servlet
> .internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
> at
> weblogic
> .servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
> at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
> at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>