@ApplicationPath with JAX-RS doesn't seem to work
agoncal Oct 26, 2010 3:44 PMThis post is a substract of http://community.jboss.org/message/566856
Hi,
I'm using JBoss 6-M5 and developping a RESTful EJB with the @Path annotation. I try to avoid XML as much as I can. So, to have access to my REST resources, I have no web.xml and I use the following code :
@ApplicationPath("rs")
public class ApplicationConfig extends Application {
}
This way, any URL with rs/* will be interpreted as a RESTful resource. This works fine with GlassFish, but with JBoss I have the following exception :
15:51:09,578 INFO [org.jboss.web.tomcat.service.deployers.TomcatDeployment] deploy, ctxPath=/demo15
15:51:09,593 ERROR [org.apache.catalina.core.StandardContext] Context [/demo15] startup failed due to previous errors: java.lang.IllegalArgumentException: Invalid <url-pattern> rs/* in filter mapping
at org.apache.catalina.core.StandardContext.validateFilterMap(StandardContext.java:2033) [:6.0.0.20100911-M5]
at org.apache.catalina.core.StandardContext.addFilterMap(StandardContext.java:1973) [:6.0.0.20100911-M5]
at org.jboss.web.tomcat.service.deployers.JBossContextConfig.processWebMetaData(JBossContextConfig.java:328) [:6.0.0.20100911-M5]
at org.jboss.web.tomcat.service.deployers.JBossContextConfig.applicationWebConfig(JBossContextConfig.java:211) [:6.0.0.20100911-M5]
at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:409) [:6.0.0.20100911-M5]
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:182) [:6.0.0.20100911-M5]
at org.jboss.web.tomcat.service.deployers.JBossContextConfig.lifecycleEvent(JBossContextConfig.java:206) [:6.0.0.20100911-M5]
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:115) [:6.0.0.20100911-M5]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3773) [:6.0.0.20100911-M5]
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:299) [:6.0.0.20100911-M5]
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:138) [:6.0.0.20100911-M5]
at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461) [:6.0.0.20100911-M5]
at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118) [:6.0.0.20100911-M5]
at org.jboss.web.deployers.WebModule.start(WebModule.java:95) [:6.0.0.20100911-M5]
Any idea on where this could come from ?
Thanks,
Antonio