2 Replies Latest reply: Jul 10, 2012 4:48 AM by Santhosh TR RSS

Servlet mapping specifies an unknown servlet name javax.ws.rs.core.Application

gboro54 Novice

I am trying to deploy an application with restful webservices. The application is an EAR packaged with a WAR and a JAR.  When I am deploying this however I am getting the following exception:

 

 

10:00:40,086 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-9) Context [/billing-mtd] startup failed due to previous errors: java.lang.IllegalArgumentException: Servlet mapping specifies an unknown servlet name javax.ws.rs.core.Application
          at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:2255) [jbossweb-7.0.13.Final.jar:]
          at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:2234) [jbossweb-7.0.13.Final.jar:]
          at org.jboss.as.web.deployment.JBossContextConfig.processWebMetaData(JBossContextConfig.java:449) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
          at org.jboss.as.web.deployment.JBossContextConfig.applicationWebConfig(JBossContextConfig.java:169) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
          at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:417) [jbossweb-7.0.13.Final.jar:]
          at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:182) [jbossweb-7.0.13.Final.jar:]
          at org.jboss.as.web.deployment.JBossContextConfig.lifecycleEvent(JBossContextConfig.java:162) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
          at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:115) [jbossweb-7.0.13.Final.jar:]
          at org.apache.catalina.core.StandardContext.start(StandardContext.java:3790) [jbossweb-7.0.13.Final.jar:]
          at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_27]
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_27]
          at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_27]

 

 

my web.xml

 

<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">


          <display-name>Month-to-Date Billing Process</display-name>


          <context-param>
                    <param-name>resteasy.jndi.resources</param-name>
                    <param-value>java:global/billing-mtd-ear-1.0.0.Alpha1/billing-mtd/BillingServiceInvokerImpl
                    </param-value>
          </context-param>


          <servlet-mapping>
                    <servlet-name>javax.ws.rs.core.Application</servlet-name>
                    <url-pattern>/*</url-pattern>
          </servlet-mapping>


</web-app>

 

 

 

We are using JBoss 7.1.1.

 

TIA