Resteasy 3 application not working on JBoss AS 7.1.1 - Gives HTTP 404 with no log message
tadhg.pearson May 28, 2014 4:50 PMI've developed a RESTful webservice using RestEasy 3.0.6 and it's Jackson 2 plugin. It works great in Jetty! But we use JBoss AS 7.1.1 AS in production and when I deploy it to JBoss, I get an 404 when I hit the APIs server URL, and no info in the logs.
I assumed that this was because of the built-in version of RestEasy 2.3.2 that ships with JBoss taking precedence over my WAR-provided version, so I created a jboss-deployment-structure.xml to exclude the subsystem like it says in the manual at Class Loading in AS7 - JBoss AS 7.0 - Project Documentation Editor
When that gave me an error parsing the XML (because it's not actually supported - see the comments in that manual entry) I tried manually excluding the modules. But this just brought me back in a loop, and now I have no errors again. It's like the exclusion is not working - or my problem was not to do with the exclusion in the first place.
When I deploy me application now, I do get the following warnings. I can't understand why
16:17:37,781 WARN [org.jboss.as.server.deployment] (MSC service thread 1-16) Class Path entry jaxb-api.jar in "/G:/java/jboss-as-7.1.1.Final/bin/content/my.war/WEB-INF/lib/jaxb-core-2.2.7.jar" does not point to a valid jar for a Class-Path reference. 16:17:37,784 WARN [org.jboss.as.server.deployment] (MSC service thread 1-16) Class Path entry jaxb-api.jar in "/G:/java/jboss-as-7.1.1.Final/bin/content/my.war/WEB-INF/lib/jaxb-impl-2.2.7.jar" does not point to a valid jar for a Class-Path reference. 16:17:37,789 WARN [org.jboss.as.server.deployment] (MSC service thread 1-16) Class Path entry jaxb-core.jar in "/G:/java/jboss-as-7.1.1.Final/bin/content/my.war/WEB-INF/lib/jaxb-impl-2.2.7.jar" does not point to a valid jar for a Class-Path reference.
My web.xml looks like this
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> <display-name>My App</display-name> <servlet> <servlet-name>my</servlet-name> <servlet-class> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class> <init-param> <param-name>javax.ws.rs.Application</param-name> <param-value>my.fqn.WebApp</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>api</servlet-name> <url-pattern>/api/*</url-pattern> </servlet-mapping> <context-param> <param-name>resteasy.providers</param-name> <param-value>my.fqn.conf.JSONProvider, my.fqn.conf.conf.ValidationExceptionMapper</param-value> </context-param> </web-app>
and my jboss-deployment-structure.xml looks like this
<jboss-deployment-structure> <deployment> <exclusions> <module name="org.jboss.resteasy.resteasy-atom-provider" /> <module name="org.jboss.resteasy.resteasy-cdi" /> <module name="org.jboss.resteasy.resteasy-jaxrs" /> <module name="org.jboss.resteasy.resteasy-jaxb-provider" /> <module name="org.jboss.resteasy.resteasy-jackson-provider" /> <module name="org.jboss.resteasy.resteasy-jsapi" /> <module name="org.jboss.resteasy.resteasy-multipart-provider" /> <module name="org.jboss.resteasy.async-http-servlet-30" /> </exclusions> </deployment> </jboss-deployment-structure>
Unfortunately, using another version of JBoss AS is not an option.
Any ideas about what I'm missing here would be greatly appreciated.
Thanks, Tadhg