Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-964

Deploying a simple Servlet 3.0 RESTEasy application into Tomcat 7 fails

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 3.0.5.Final
    • None
    • None
    • None

    Description

      Following the documentation for installing a RESTEasy application into a Servlet 3.0 container (http://docs.jboss.org/resteasy/docs/3.0.4.Final/userguide/html_single/index.html#d4e111) I am unable to get a working application without specifically listing my resources in my javax.ws.rs.core.Application implementation.

      Invoking tomcat7:run in the sample project (attached):

      Apache Maven 3.0.4 (r1232337; 2012-01-17 01:44:56-0700)
      Maven home: C:\Develop\SpringSource\apache-maven-3.0.4
      Java version: 1.7.0_05, vendor: Oracle Corporation
      Java home: C:\Develop\JDK7\jre
      Default locale: en_US, platform encoding: Cp1252
      OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
      [INFO] Scanning for projects...
      [INFO]
      [INFO] ------------------------------------------------------------------------
      [INFO] Building re3tc7fail 0-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] >>> tomcat7-maven-plugin:2.1:run (default-cli) @ re3tc7fail >>>
      [INFO]
      [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ re3tc7fail ---
      [debug] execute contextualize
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] skip non existing resourceDirectory C:\Develop\FLPI\Projects\jlebc-re3tc7fail\src\main\resources
      [INFO]
      [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ re3tc7fail ---
      [INFO] Compiling 2 source files to C:\Develop\FLPI\Projects\jlebc-re3tc7fail\target\classes
      [INFO]
      [INFO] <<< tomcat7-maven-plugin:2.1:run (default-cli) @ re3tc7fail <<<
      [INFO]
      [INFO] --- tomcat7-maven-plugin:2.1:run (default-cli) @ re3tc7fail ---
      [INFO] Running war on http://localhost:8080/re3tc7fail
      [INFO] Creating Tomcat server configuration at C:\Develop\FLPI\Projects\jlebc-re3tc7fail\target\tomcat
      [INFO] create webapp with contextPath: /re3tc7fail
      Oct 14, 2013 12:05:30 PM org.apache.coyote.AbstractProtocol init
      INFO: Initializing ProtocolHandler ["http-bio-8080"]
      Oct 14, 2013 12:05:30 PM org.apache.catalina.core.StandardService startInternal
      INFO: Starting service Tomcat
      Oct 14, 2013 12:05:30 PM org.apache.catalina.core.StandardEngine startInternal
      INFO: Starting Servlet Engine: Apache Tomcat/7.0.37
      Oct 14, 2013 12:05:32 PM org.jboss.resteasy.logging.impl.Slf4jLogger info
      INFO: Deploying javax.ws.rs.core.Application: class net.jlebc.re3tc7fail.Application
      Oct 14, 2013 12:05:32 PM org.jboss.resteasy.logging.impl.Slf4jLogger warn
      WARNING: Provider class org.jboss.resteasy.plugins.providers.DefaultTextPlain is already registered.  2nd registration is being ignored.
      Oct 14, 2013 12:05:32 PM org.jboss.resteasy.logging.impl.Slf4jLogger warn
      WARNING: Provider class org.jboss.resteasy.plugins.interceptors.encoding.GZIPEncodingInterceptor is already registered.  2nd registration is being ignored.
      Oct 14, 2013 12:05:32 PM org.jboss.resteasy.logging.impl.Slf4jLogger warn
      WARNING: Provider class org.jboss.resteasy.plugins.interceptors.encoding.AcceptEncodingGZIPInterceptor is already registered.  2nd registration is being ignored.
      Oct 14, 2013 12:05:32 PM org.jboss.resteasy.logging.impl.Slf4jLogger warn
      WARNING: Provider class org.jboss.resteasy.plugins.interceptors.encoding.GZIPDecodingInterceptor is already registered.  2nd registration is being ignored.
      Oct 14, 2013 12:05:32 PM org.jboss.resteasy.logging.impl.Slf4jLogger warn
      WARNING: Provider class org.jboss.resteasy.plugins.providers.StringTextStar is already registered.  2nd registration is being ignored.
      Oct 14, 2013 12:05:32 PM org.jboss.resteasy.logging.impl.Slf4jLogger warn
      WARNING: Provider class org.jboss.resteasy.plugins.providers.FormUrlEncodedProvider is already registered.  2nd registration is being ignored.
      Oct 14, 2013 12:05:32 PM org.jboss.resteasy.logging.impl.Slf4jLogger warn
      WARNING: Provider class org.jboss.resteasy.plugins.providers.DataSourceProvider is already registered.  2nd registration is being ignored.
      Oct 14, 2013 12:05:32 PM org.jboss.resteasy.logging.impl.Slf4jLogger warn
      WARNING: Provider class org.jboss.resteasy.plugins.providers.DocumentProvider is already registered.  2nd registration is being ignored.
      Oct 14, 2013 12:05:32 PM org.jboss.resteasy.logging.impl.Slf4jLogger warn
      WARNING: Provider class org.jboss.resteasy.plugins.providers.FileProvider is already registered.  2nd registration is being ignored.
      Oct 14, 2013 12:05:32 PM org.jboss.resteasy.logging.impl.Slf4jLogger warn
      WARNING: Provider class org.jboss.resteasy.plugins.providers.JaxrsFormProvider is already registered.  2nd registration is being ignored.
      Oct 14, 2013 12:05:32 PM org.jboss.resteasy.logging.impl.Slf4jLogger warn
      WARNING: Provider class org.jboss.resteasy.plugins.providers.SerializableProvider is already registered.  2nd registration is being ignored.
      Oct 14, 2013 12:05:32 PM org.jboss.resteasy.logging.impl.Slf4jLogger warn
      WARNING: Provider class org.jboss.resteasy.plugins.interceptors.encoding.AcceptEncodingGZIPFilter is already registered.  2nd registration is being ignored.
      Oct 14, 2013 12:05:32 PM org.jboss.resteasy.logging.impl.Slf4jLogger warn
      WARNING: Provider class org.jboss.resteasy.plugins.providers.SourceProvider is already registered.  2nd registration is being ignored.
      Oct 14, 2013 12:05:32 PM org.jboss.resteasy.logging.impl.Slf4jLogger warn
      WARNING: Provider class org.jboss.resteasy.plugins.providers.IIOImageProvider is already registered.  2nd registration is being ignored.
      Oct 14, 2013 12:05:32 PM org.jboss.resteasy.logging.impl.Slf4jLogger warn
      WARNING: Provider class org.jboss.resteasy.plugins.providers.ReaderProvider is already registered.  2nd registration is being ignored.
      Oct 14, 2013 12:05:32 PM org.jboss.resteasy.logging.impl.Slf4jLogger warn
      WARNING: Provider class org.jboss.resteasy.plugins.providers.InputStreamProvider is already registered.  2nd registration is being ignored.
      Oct 14, 2013 12:05:32 PM org.apache.catalina.core.ApplicationContext log
      SEVERE: StandardWrapper.Throwable
      java.lang.NullPointerException
              at org.jboss.resteasy.spi.metadata.ResourceConstructor.<init>(ResourceConstructor.java:24)
              at org.jboss.resteasy.spi.metadata.ResourceBuilder$ResourceConstructorBuilder.<init>(ResourceBuilder.java:424)
              at org.jboss.resteasy.spi.metadata.ResourceBuilder$ResourceClassBuilder.constructor(ResourceBuilder.java:96)
              at org.jboss.resteasy.spi.metadata.ResourceBuilder.constructor(ResourceBuilder.java:681)
              at org.jboss.resteasy.plugins.server.resourcefactory.POJOResourceFactory.registered(POJOResourceFactory.java:41)
              at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:207)
              at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:193)
              at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:179)
              at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:156)
              at org.jboss.resteasy.core.ResourceMethodRegistry.addPerRequestResource(ResourceMethodRegistry.java:75)
              at org.jboss.resteasy.spi.ResteasyDeployment.registration(ResteasyDeployment.java:400)
              at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:241)
              at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:112)
              at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36)
              at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
              at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
              at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
              at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5033)
              at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5317)
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
              at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
              at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
              at java.util.concurrent.FutureTask.run(FutureTask.java:166)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
              at java.lang.Thread.run(Thread.java:722)
      
      Oct 14, 2013 12:05:32 PM org.apache.catalina.core.StandardContext loadOnStartup
      SEVERE: Servlet /re3tc7fail threw load() exception
      java.lang.NullPointerException
              at org.jboss.resteasy.spi.metadata.ResourceConstructor.<init>(ResourceConstructor.java:24)
              at org.jboss.resteasy.spi.metadata.ResourceBuilder$ResourceConstructorBuilder.<init>(ResourceBuilder.java:424)
              at org.jboss.resteasy.spi.metadata.ResourceBuilder$ResourceClassBuilder.constructor(ResourceBuilder.java:96)
              at org.jboss.resteasy.spi.metadata.ResourceBuilder.constructor(ResourceBuilder.java:681)
              at org.jboss.resteasy.plugins.server.resourcefactory.POJOResourceFactory.registered(POJOResourceFactory.java:41)
              at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:207)
              at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:193)
              at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:179)
              at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:156)
              at org.jboss.resteasy.core.ResourceMethodRegistry.addPerRequestResource(ResourceMethodRegistry.java:75)
              at org.jboss.resteasy.spi.ResteasyDeployment.registration(ResteasyDeployment.java:400)
              at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:241)
              at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:112)
              at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36)
              at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
              at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
              at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
              at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5033)
              at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5317)
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
              at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
              at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
              at java.util.concurrent.FutureTask.run(FutureTask.java:166)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
              at java.lang.Thread.run(Thread.java:722)
      
      Oct 14, 2013 12:05:32 PM org.apache.coyote.AbstractProtocol start
      INFO: Starting ProtocolHandler ["http-bio-8080"]
      

      Attachments

        Activity

          People

            patriot1burke@gmail.com Bill Burke (Inactive)
            dweomer5 Jacob Blain Christen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: