title: Because of one All deployed are failing
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/8611777/java-lang-nosuchmethoderror-javax-servlet-servletcontext-getcontextpathljava">java.lang.NoSuchMethodError: javax.servlet.ServletContext.getContextPath()Ljava/lang/String;</a>  </p>
  </blockquote>
  
  
  
  <pre><code>2012-12-12 20:35:34,047 INFO  [org.apache.catalina.core.StandardEngine] (main) Starting Servlet Engine: JBoss Web/2.1.10
  2012-12-12 20:35:34,094 INFO  [org.apache.catalina.startup.Catalina] (main) Server startup in 87 ms
  2012-12-12 20:35:34,125 INFO  [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (main) deploy, ctxPath=/invoker
  2012-12-12 20:35:34,640 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/invoker]] (main) Exception sending context initialized event to listener instance of class org.jboss.web.jsf.integration.config.JBossJSFConfigureListener
  java.lang.NoSuchMethodError: javax.servlet.ServletContext.getContextPath()Ljava/lang/String;
      at com.sun.faces.config.WebConfiguration.getServletContextName(WebConfiguration.java:250)
      at com.sun.faces.config.WebConfiguration.&lt;init&gt;(WebConfiguration.java:100)
      at com.sun.faces.config.WebConfiguration.getInstance(WebConfiguration.java:158)
      .
      .
      .
      at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:256)
      at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
      at org.jboss.Main.boot(Main.java:221)
      at org.jboss.Main$1.run(Main.java:556)
      at java.lang.Thread.run(Thread.java:662)
  2012-12-12 20:35:34,640 ERROR [org.apache.catalina.core.StandardContext] (main) Error listenerStart
  2012-12-12 20:35:34,640 ERROR [org.apache.catalina.core.StandardContext] (main) Context [/invoker] startup failed due to previous errors
  2012-12-12 20:35:34,718 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Start: name=jboss.web.deployment:war=/invoker state=Create mode=Manual requiredState=Installed
  org.jboss.deployers.spi.DeploymentException: URL file:/C:/EDM/JBoss-EAP/jboss-eap-5.1/jboss-as/server/default/deploy/http-invoker.sar/invoker.war/ deployment failed
      at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:342)
      .
      .
      .
      at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:256)
      at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
      at org.jboss.Main.boot(Main.java:221)
      at org.jboss.Main$1.run(Main.java:556)
      at java.lang.Thread.run(Thread.java:662)
  2012-12-12 20:35:34,749 INFO  [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (main) deploy, ctxPath=/jbossws
  2012-12-12 20:35:34,796 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/jbossws]] (main) Exception sending context initialized event to listener instance of class org.jboss.web.jsf.integration.config.JBossJSFConfigureListener
  java.lang.NoSuchMethodError: javax.servlet.ServletContext.getContextPath()Ljava/lang/String;
      at com.sun.faces.config.WebConfiguration.getServletContextName(WebConfiguration.java:250)
      at com.sun.faces.config.WebConfiguration.&lt;init&gt;(WebConfiguration.java:100)
      at com.sun.faces.config.WebConfiguration.getInstance(WebConfiguration.java:158)
      at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:145)
      at org.jboss.web.jsf.integration.config.JBossJSFConfigureListener.contextInitialized(JBossJSFConfigureListener.java:60)
      .
      .
      .
      at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:256)
      at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
      at org.jboss.Main.boot(Main.java:221)
      at org.jboss.Main$1.run(Main.java:556)
      at java.lang.Thread.run(Thread.java:662)
  2012-12-12 20:35:34,796 ERROR [org.apache.catalina.core.StandardContext] (main) Error listenerStart
  2012-12-12 20:35:34,796 ERROR [org.apache.catalina.core.StandardContext] (main) Context [/jbossws] startup failed due to previous errors
  2012-12-12 20:35:34,796 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Start: name=jboss.web.deployment:war=/jbossws state=Create mode=Manual requiredState=Installed
  org.jboss.deployers.spi.DeploymentException: URL file:/C:/EDM/JBoss-EAP/jboss-eap-5.1/jboss-as/server/default/deploy/jbossws.sar/jbossws-management.war/ deployment failed
      at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:342)
      .
      .
      .
      at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:256)
      at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
      at org.jboss.Main.boot(Main.java:221)
      at org.jboss.Main$1.run(Main.java:556)
      at java.lang.Thread.run(Thread.java:662)
  2012-12-12 20:35:34,796 INFO  [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (main) deploy, ctxPath=/web-console
  2012-12-12 20:35:34,827 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/web-console]] (main) Exception sending context initialized event to listener instance of class org.jboss.web.jsf.integration.config.JBossJSFConfigureListener
  java.lang.NoSuchMethodError: javax.servlet.ServletContext.getContextPath()Ljava/lang/String;
      at com.sun.faces.config.WebConfiguration.getServletContextName(WebConfiguration.java:250)
      .
      .
      .
  2012-12-12 20:35:39,199 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Real: name=vfszip:/C:/EDM/JBoss-EAP/jboss-eap-5.1/jboss-as/server/default/deploy/RDSGUIWeb.war/ state=PreReal mode=Manual requiredState=Real
  org.jboss.deployers.spi.DeploymentException: URL file:/C:/EDM/JBoss-EAP/jboss-eap-5.1/jboss-as/server/default/tmp/5j2at36-3k5zwg-han7uhp7-1-han7uyj0-9u/RDSGUIWeb.war/ deployment failed
      at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:342)
      at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:145)
      at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
      at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
      at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
      at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
      at $Proxy38.start(Unknown Source)
      at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
      at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
      at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
      at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
      at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
      at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:297)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:826)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:556)
      at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
      at org.jboss.system.ServiceController.start(ServiceController.java:460)
      at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
      at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
      at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
      at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
      at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55)
      at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1454)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1172)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1193)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1113)
      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:826)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:556)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:789)
      at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:699)
      at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
      at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
      at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
      at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:403)
      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:778)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:543)
      at org.jboss.system.server.profileservice.repository.AbstractProfileService.registerProfile(AbstractProfileService.java:308)
      at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:256)
      at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
      at org.jboss.Main.boot(Main.java:221)
      at org.jboss.Main$1.run(Main.java:556)
      at java.lang.Thread.run(Thread.java:662)
  2012-12-12 20:35:39,699 INFO  [org.jboss.system.server.profileservice.ProfileServiceBootstrap] (main) Loading profile: ProfileKey@12b7414[domain=default, server=default, name=default]
  2012-12-12 20:35:39,699 ERROR [org.jboss.system.server.profileservice.ProfileServiceBootstrap] (main) Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
  
  DEPLOYMENTS IN ERROR:
    Deployment "jboss.web.deployment:war=/web-console" is in error due to the following reason(s): org.jboss.deployers.spi.DeploymentException: URL file:/C:/EDM/JBoss-EAP/jboss-eap-5.1/jboss-as/server/default/deploy/management/console-mgr.sar/web-console.war/ deployment failed
    Deployment "jboss.web.deployment:war=/jbossws" is in error due to the following reason(s): org.jboss.deployers.spi.DeploymentException: URL file:/C:/EDM/JBoss-EAP/jboss-eap-5.1/jboss-as/server/default/deploy/jbossws.sar/jbossws-management.war/ deployment failed
    Deployment "vfszip:/C:/EDM/JBoss-EAP/jboss-eap-5.1/jboss-as/server/default/deploy/RDSGUIWeb.war/" is in error due to the following reason(s): org.jboss.deployers.spi.DeploymentException: URL file:/C:/EDM/JBoss-EAP/jboss-eap-5.1/jboss-as/server/default/tmp/5j2at36-3k5zwg-han7uhp7-1-han7uyj0-9u/RDSGUIWeb.war/ deployment failed
    Deployment "jboss.web.deployment:war=/invoker" is in error due to the following reason(s): org.jboss.deployers.spi.DeploymentException: URL file:/C:/EDM/JBoss-EAP/jboss-eap-5.1/jboss-as/server/default/deploy/http-invoker.sar/invoker.war/ deployment failed
  
  2012-12-12 20:35:39,715 INFO  [org.apache.coyote.http11.Http11Protocol] (main) Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
  2012-12-12 20:35:39,746 INFO  [org.apache.coyote.ajp.AjpProtocol] (main) Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
  2012-12-12 20:35:39,746 INFO  [org.jboss.bootstrap.microcontainer.ServerImpl] (main) JBoss (Microcontainer) [5.1.0 (build: SVNTag=JBPAPP_5_1_0 date=201009150028)] Started in 25s:322ms
  </code></pre>
  
  <p>Hi,
  I have a problem when my war file is deployed into the jboss deploy folder i.e. deployment is failing, I am sure that this is some what related to configuration and classpath issues but I am unable to figure out the exact piece which is causing the problem. </p>
  
  <p>Here is the procedure/method I followed. Actually I'm building the .WAR file by using ant build script (In eclipse). Finally my war file will not contain lib folder (which means no .jars in it internally, thats the requirement as .WAR file shall not be heavy weighted) But every .jar (including servlet-api.jar) file that is needed to .WAR is made available in the jboss classpath configurations but still I'm getting the Errors and Exceptions while deploying. Please find the log for more details (server.log info is pasted) above.</p>
  
  <p>NOTE:In my ant build script I'm not compiling/linking any classes anything internally. What I mean to say is: Even for ant file .jars are made available through ant classpath.</p>
  
  <p>Here is an abstract of my build.xml:</p>
  
  <pre><code>&lt;target name="compile" depends="clean, init"&gt;
      &lt;javac destdir="${rds.build}" debug="true" srcdir="${rds.src}"&gt;
      &lt;/javac&gt;
  &lt;/target&gt;
  
  &lt;target name="war" depends="compile, doTestLevel, doProdLevel"&gt;
    &lt;war destfile="${rds.dist.bin}/RDSGUIWeb.war" &gt;
      &lt;fileset dir="${projectRootDir}/WebContent"&gt;    
          &lt;include name="**/*"/&gt;
          &lt;exclude name="/WEB-INF/lib/**" /&gt;
      &lt;/fileset&gt;
      &lt;classes dir="${rds.build}" /&gt;
    &lt;/war&gt;
  &lt;/target&gt;
  </code></pre>
  
  <p>UPDATE: I tried to run the jboss by removing servlet-api.jar from its classpath, At this time I'll be getting something like application listener of class com.icesoft.faces.util.event.servlet.ContextEventRepeater not instantiated. In both ways (either including servlet-api.jar or not) I'm unable to succeed. Thats the reson I approached stackoverflow.</p>