Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-1739

resteasy.scan=true in web.xml causes error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 7.1.0.CR1
    • 7.0.1.Final
    • REST, Test Suite
    • None

      If I use resteasy.scan=true configuration parameter of RESTEasy like

      		war.addAsWebInfResource(
      				WebXml.get("   <servlet-mapping>\n"
      						 + "        <servlet-name>javax.ws.rs.core.Application</servlet-name>\n"
      						 + "        <url-pattern>/myjaxrs/*</url-pattern>\n"
      						 + "    </servlet-mapping>\n" 
      						 + "\n"
      						 + "    <context-param>\n"
      						 + "        <param-name>resteasy.scan</param-name>\n"
      						 + "         <param-value>true</param-value>\n"
      						 + "    </context-param>\n"
      						 + "\n"
      						 ), "web.xml");
      

      I got this error:

      14:05:50,607 INFO  [org.jboss.as.server.controller] (pool-1-thread-1) Deployed "jaxrsnoap.war"                                                                                                     
      14:05:50,893 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/jaxrsnoap]] (http--127.0.0.1-8080-1) StandardWrapper.Throwable: java.lang.NoClassDefFoundError: javax/servlet/ServletContext                                                                                                                                                                                  
              at org.scannotation.WarUrlFinder.findWebInfClassesPath(WarUrlFinder.java:56)                                                                                                               
              at org.jboss.resteasy.plugins.server.servlet.ListenerBootstrap.getScanningUrls(ListenerBootstrap.java:64) [resteasy-jaxrs-2.2.1.GA.jar:]                                                   
              at org.jboss.resteasy.plugins.server.servlet.ConfigurationBootstrap.createDeployment(ConfigurationBootstrap.java:147) [resteasy-jaxrs-2.2.1.GA.jar:]                                       
              at org.jboss.resteasy.plugins.server.servlet.ListenerBootstrap.createDeployment(ListenerBootstrap.java:32) [resteasy-jaxrs-2.2.1.GA.jar:]                                                  
              at org.jboss.resteasy.plugins.server.servlet.ServletBootstrap.createDeployment(ServletBootstrap.java:28) [resteasy-jaxrs-2.2.1.GA.jar:]                                                    
              at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:66) [resteasy-jaxrs-2.2.1.GA.jar:]                                            
              at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36) [resteasy-jaxrs-2.2.1.GA.jar:]                                                      
              at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]                                                        
              at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:952) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]                                                            
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:188) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]                                                    
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]                                                    
              at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139) [jboss-as-web-7.1.0.Alpha1-SNAPSHOT.jar:7.1.0.Alpha1-SNAPSHOT]               
              at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57) [jboss-as-web-7.1.0.Alpha1-SNAPSHOT.jar:7.1.0.Alpha1-SNAPSHOT]                                                                 
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]                                                          
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]                                                          
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]                                                      
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]                                                            
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]                                                             
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]                                       
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]                                                                
              at java.lang.Thread.run(Thread.java:662) [:1.6.0_27]                                                                                                                                       
      Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletContext from [Module "org.scannotation.scannotation:main" from local module loader @a6d51e (roots: /home/pjanouse/github/jboss-as
      /testsuite/integration/../../build/target/jboss-as-7.1.0.Alpha1-SNAPSHOT/modules)]                                                                                                                 
              at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)                                                                                                               
              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361)                                                                                         
              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333)                                                                                         
              at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310)                                                                                                
              at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103)                                                                                                       
            ... 21 more                                                                                                                                                                                 
                                                                                                                                                                                                         
      4:05:50,896 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/jaxrsnoap].[javax.ws.rs.core.Application]] (http--127.0.0.1-8080-1) Allocate exception for servlet javax.ws 
      rs.core.Application: java.lang.ClassNotFoundException: javax.servlet.ServletContext from [Module "org.scannotation.scannotation:main" from local module loader @a6d51e (roots: /home/pjanouse/gith 
      b/jboss-as/testsuite/integration/../../build/target/jboss-as-7.1.0.Alpha1-SNAPSHOT/modules)]                                                                                                       
             at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)                                                                                                                
             at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361)                                                                                          
             at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333)                                                                                          
             at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310)                                                                                                 
             at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103)                                                                                                        
             at org.scannotation.WarUrlFinder.findWebInfClassesPath(WarUrlFinder.java:56)                                                                                                                
             at org.jboss.resteasy.plugins.server.servlet.ListenerBootstrap.getScanningUrls(ListenerBootstrap.java:64) [resteasy-jaxrs-2.2.1.GA.jar:]                                                    
             at org.jboss.resteasy.plugins.server.servlet.ConfigurationBootstrap.createDeployment(ConfigurationBootstrap.java:147) [resteasy-jaxrs-2.2.1.GA.jar:]                                        
             at org.jboss.resteasy.plugins.server.servlet.ListenerBootstrap.createDeployment(ListenerBootstrap.java:32) [resteasy-jaxrs-2.2.1.GA.jar:]                                                   
             at org.jboss.resteasy.plugins.server.servlet.ServletBootstrap.createDeployment(ServletBootstrap.java:28) [resteasy-jaxrs-2.2.1.GA.jar:]                                                     
             at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:66) [resteasy-jaxrs-2.2.1.GA.jar:]                                             
             at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36) [resteasy-jaxrs-2.2.1.GA.jar:]                                                       
             at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]                                                         
             at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:952) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]                                                             
             at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:188) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]                                                     
             at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]                                                     
             at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139) [jboss-as-web-7.1.0.Alpha1-SNAPSHOT.jar:7.1.0.Alpha1-SNAPSHOT]                
             at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57) [jboss-as-web-7.1.0.Alpha1-SNAPSHOT.jar:7.1.0.Alpha1-SNAPSHOT]                                                                  
             at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]                                                           
             at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]                                                           
             at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]                                                       
             at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]                                                             
             at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]                                                              
             at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]                                        
             at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]                                                                 
             at java.lang.Thread.run(Thread.java:662) [:1.6.0_27]                                                                                                                                        
                                                                                                                                                                                                         
      4:05:50,999 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) Stopped deployment jaxrsnoap.war in 33ms                                                                               
      4:05:51,014 INFO  [org.jboss.as.server.controller] (pool-1-thread-1) Undeployed "jaxrsnoap.war"                                                                                                    
      

              sdouglas1@redhat.com Stuart Douglas (Inactive)
              pjanouse@redhat.com Pavel Janousek
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: