Has anyone had success deploying Jersey 2.x with JBoss 7.x? I've tried deploying Jersey 2.5 with JBoss 7.1.1 but encountered errors like:
I believe this issue is because JBoss comes bundled with RestEasy which is a JAX-RS 1.0 implementation while Jersey is a JAX-RS 2.0 implementation. So I took the following steps to disable RestEasy:
1) Adding the following to my web.xml:
2) Following the discussion here, I modified my JBoss' standalone.xml, module.xml, and domain.xml to remove all references to JAXRS1.1 / RestEasy.
3) This led to another error: "java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor" which I resolved by adding the following to my pom.xml:
So finally my app deploys without errors but now I cannot seem to access any of my Jersey resources. Jetty 8 works fine, however. I also was able to run Jersey 1.x without having to take steps #2 and #3 but I would prefer to use Jersey 2.x if possible.
Additionally I've also tried creating a jboss-deployment-structure.xml file, but then I encounter the previous errors like "java.lang.NoSuchMethodError: javax.ws.rs.core.Application.getProperties()Ljava/util/Map;"
<?xml version="1.0" encoding="UTF-8"?>
Has anyone had any luck with Jboss and Jersey 2.x? Any help or guidance would be appreciated.