users@jersey.java.net

Re: jboss 5.10 and Jersey 1.4

From: Paul Sandoz <Paul.Sandoz_at_oracle.com>
Date: Mon, 29 Nov 2010 13:49:49 +0100

Hi,

Unfortunately i am not familiar with JBoss deployments. All i can
recommend is you double check the jars included in WEB-INF/lib and ask
on a JBoss forum.

Paul.

On Nov 29, 2010, at 10:37 AM, mid491 wrote:

>
> Hi Paul,
>
> attaching my project don't work .. sorry.. (trying with the upload
> option :
> http://jersey.576304.n2.nabble.com/file/n5783731/testRest.rar
> testRest.rar )
>
> If i put JAXB "provided" I got another error :
>
> ...
> 10:28:54,750 ERROR [[/testRest]] StandardWrapper.Throwable
> com.sun.jersey.api.container.ContainerException: Unable to create
> resource
> at
> com.sun.jersey.server.impl.resource.SingletonFactory
> $Singleton.init(SingletonFactory.java:139)
> ...
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
> ...
> Caused by: java.lang.LinkageError: loader constraint violation: when
> resolving method
> "javax.xml.bind.JAXBElement.<init>(Ljavax/xml/namespace/QName;Ljava/
> lang/Class;Ljava/lang/Object;)V"
> the class loader (instance of
> org/jboss/classloader/spi/base/BaseClassLoader) of the current class,
> com/sun/jersey/server/wadl/WadlGeneratorImpl, and the class loader
> (instance
> of <bootloader>) for resolved class, javax/xml/bind/JAXBElement, have
> different Class objects for the type javax/xml/namespace/QName used
> in the
> signature
> at
> com
> .sun
> .jersey
> .server.wadl.WadlGeneratorImpl.createResponse(WadlGeneratorImpl.java:
> 183)
> ...
> 10:28:54,750 ERROR [[Jersey]] Exception lors de l'allocation pour la
> servlet
> Jersey
> java.lang.LinkageError: loader constraint violation: when resolving
> method
> "javax.xml.bind.JAXBElement.<init>(Ljavax/xml/namespace/QName;Ljava/
> lang/Class;Ljava/lang/Object;)V"
> the class loader (instance of
> org/jboss/classloader/spi/base/BaseClassLoader) of the current class,
> com/sun/jersey/server/wadl/WadlGeneratorImpl, and the class loader
> (instance
> of <bootloader>) for resolved class, javax/xml/bind/JAXBElement, have
> different Class objects for the type javax/xml/namespace/QName used
> in the
> signature
> at
> com
> .sun
> .jersey
> .server.wadl.WadlGeneratorImpl.createResponse(WadlGeneratorImpl.java:
> 183)
> ....
>
>
> Extract of my pom :
>
> <dependency>
> <groupId>com.sun.jersey</groupId>
> <artifactId>jersey-server</artifactId>
> <version>1.4</version>
> </dependency>
>
> <dependency>
> <groupId>com.sun.jersey</groupId>
> <artifactId>jersey-json</artifactId>
> <version>1.4</version>
> </dependency>
>
> <dependency>
> <groupId>javax.xml.bind</groupId>
> <artifactId>jaxb-api</artifactId>
> <version>2.2</version>
> <scope>provided</scope>
> </dependency>
>
> <dependency>
> <groupId>com.sun.xml.bind</groupId>
> <artifactId>jaxb-impl</artifactId>
> <version>2.1</version>
> <scope>provided</scope>
> </dependency>
>
>
> Did I miss something or there is a conflict with JBOss 5.1.0 GA ?
>
> thx!
>
>
> --
> View this message in context: http://jersey.576304.n2.nabble.com/jboss-5-10-and-Jersey-1-4-tp5770718p5783731.html
> Sent from the Jersey mailing list archive at Nabble.com.