Hi I used the same code and it is not able to find the ServletContainer class. I am using JBoss 5.X and I do not think it comes with this container.
Error is :-- com.sun.jersey.spi.service.ServiceConfigurationError: com.sun.jersey.spi.HeaderDelegateProvider: The class com.sun.jersey.core.impl.provider.header.LocaleProvider implementing provider interface com.sun.jersey.spi.HeaderDelegateProvider could not be instantiated: null
these seem to be the same steps as writing a RESTful web service in Glassfish. The big difference is that Glassfish comes with all Jersey JARs installed.
My question is, which JARs did you deploy into which JBoss directory?
Typically, you would either put JARs into jboss/servers/XXX/lib, where XXX is your server name, or you would have them packaged in your JARs.
Which JARs you need will likely be different depending on your configuration. I would start by including jersey.jar itself, the trouble-shooting via the JBOSS logs.
Hi Chase, your jersey example is running well on JBoss 4.2.3, but on JBoss 5.1.0 I get this: java.lang.ClassCastException: com.sun.xml.bind.v2.runtime.JAXBContextImpl cannot be cast to javax.xml.bind.JAXBContext
I had a similar problem to Snooker and took out the jaxb jars that come from jersey from my project lib as I am running under JRE 6. JAXB is included with Java 6 so did not need to add it to the project.
Hi
ReplyDeleteI used the same code and it is not able to find the ServletContainer class. I am using JBoss 5.X and I do not think it comes with this container.
Error is :--
com.sun.jersey.spi.service.ServiceConfigurationError: com.sun.jersey.spi.HeaderDelegateProvider: The class com.sun.jersey.core.impl.provider.header.LocaleProvider implementing provider interface com.sun.jersey.spi.HeaderDelegateProvider could not be instantiated: null
Dear Chase,
ReplyDeletethese seem to be the same steps as writing a RESTful web service in Glassfish. The big difference is that Glassfish comes with all Jersey JARs installed.
My question is, which JARs did you deploy into which JBoss directory?
Typically, you would either put JARs into jboss/servers/XXX/lib, where XXX is your server name, or you would have them packaged in your JARs.
ReplyDeleteWhich JARs you need will likely be different depending on your configuration. I would start by including jersey.jar itself, the trouble-shooting via the JBOSS logs.
Hi Chase,
ReplyDeleteyour jersey example is running well on JBoss 4.2.3, but on JBoss 5.1.0 I get this:
java.lang.ClassCastException: com.sun.xml.bind.v2.runtime.JAXBContextImpl cannot be cast to javax.xml.bind.JAXBContext
Any idea, what can I do?
I deployed jersey on jboss 5.1 following the tutorial. The libraries I add were
ReplyDeleteactivation-1.1.jar
asm-3.1.jar
jersey-bundle-1.8.jar
stax-api-1.0-2.jar
I had a similar problem to Snooker and took out the jaxb jars that come from jersey from my project lib as I am running under JRE 6. JAXB is included with Java 6 so did not need to add it to the project.
hi, i can confirm with these libraries it works under jboss5.1
ReplyDeleteactivation-1.1.jar
asm-3.1.jar
jaxb-api-2.1.jar
jaxb-impl-2.1.jar
jersey-bundle-1.5.jar
jersey-core-1.5.jar
jersey-server-1.5.jar
jsr311-api-1.0.jar
stax-api-1.0-2.jar
thanks for this simple but very helpful tutorial.. helped me very much !
ReplyDelete