8 Replies Latest reply on Jan 19, 2016 12:02 PM by sasi Kiran

    JBoss EAP 6.3.0 Spring MVC deployment failure

    Jozsef Horvath Newbie

      Greetings,

       

      I'm having some serious issues while deploying a Sping MVC (Maven) Web app to JBoss EAP 6.3 through eclipse luna (JBoss Tools (Luna). Until I don't use any frameworks deployment goes fine and I can access my webapps. In the moment I add a framework dependency I get the following deployment log:

      EAP 6.3.0 Deployment log error

      11:13:51,747 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015876: Starting deployment of "SampleWEB.war" (runtime-name: "SampleWEB.war")

      11:13:52,254 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.deployment.unit."SampleWEB.war".DEPENDENCIES: org.jboss.msc.service.StartException in service jboss.deployment.unit."SampleWEB.war".DEPENDENCIES: JBAS018733: Failed to process phase DEPENDENCIES of deployment "SampleWEB.war"

          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [jboss-as-server-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]

          at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.8.0_11]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.8.0_11]

          at java.lang.Thread.run(Unknown Source) [rt.jar:1.8.0_11]

      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: org.jboss.as.server.deployment.DeploymentUnitProcessingException: java.lang.NullPointerException

          at org.jboss.as.jaxrs.deployment.JaxrsSpringProcessor.deploy(JaxrsSpringProcessor.java:207)

          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [jboss-as-server-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]

          ... 5 more

      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: java.lang.NullPointerException

          at org.jboss.as.jaxrs.deployment.JaxrsSpringProcessor.getResteasySpringVirtualFile(JaxrsSpringProcessor.java:137)

          at org.jboss.as.jaxrs.deployment.JaxrsSpringProcessor.deploy(JaxrsSpringProcessor.java:203)

          ... 6 more

      Caused by: java.lang.NullPointerException

          at org.jboss.as.jaxrs.deployment.JaxrsSpringProcessor.getResteasySpringVirtualFile(JaxrsSpringProcessor.java:106)

          ... 7 more

       

      11:13:52,296 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment SampleWEB.war (runtime-name: SampleWEB.war) in 30ms

      11:13:52,298 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report

      JBAS014777:   Services which failed to start:      service jboss.deployment.unit."SampleWEB.war".DEPENDENCIES

            service jboss.deployment.unit."SampleWEB.war".DEPENDENCIES

      I tried to search for this error but couldn't find anything related. I found solutions for the error code but they were completely different. Any idea what is going wrong in here? The same issue occurs with the most basic application created with maven. In the moment I add springframework (core, web, webmvc) and start using them, I get this error.

        • 1. Re: JBoss EAP 6.3.0 Spring MVC deployment failure
          Mustafa Musaji Novice

          How are you adding the dependencies to your project? Could you upload the jboss-deployment-structure.xml and the module.xml for the module itself?

          • 2. Re: Re: JBoss EAP 6.3.0 Spring MVC deployment failure
            Jozsef Horvath Newbie

            Thank you for your response. I'm adding dependencies using pom.xml (It's a maven project). For

            <dependencies>
              <!-- Spring dependencies -->
              <dependency>
                   <groupId>org.springframework</groupId>
                   <artifactId>spring-core</artifactId>
                   <version>${spring.version}</version>
              </dependency>
              <dependency>
                   <groupId>org.springframework</groupId>
                   <artifactId>spring-web</artifactId>
                   <version>${spring.version}</version>
              </dependency>
              <dependency>
                   <groupId>org.springframework</groupId>
                   <artifactId>spring-webmvc</artifactId>
                   <version>${spring.version}</version>
              </dependency>
              <!-- Unit testing dependencies -->
              <dependency>
                   <groupId>junit</groupId>
                   <artifactId>junit</artifactId>
                   <version>3.8.1</version>
                   <scope>test</scope>
              </dependency>
              <!-- Logging dependencies -->
              <dependency>
                   <groupId>commons-logging</groupId>
                   <artifactId>commons-logging</artifactId>
                   <version>1.2</version>
              </dependency>
              <!-- Javax (Not yet sure if required) -->
              <dependency>
                   <groupId>javax.servlet</groupId>
                   <artifactId>javax.servlet-api</artifactId>
                   <version>3.0.1</version>
              <scope>provided</scope>
              </dependency>
            </dependencies>
            
            

            The resolved dependencies are under a lib folder inside WEB-INF in the compiled .war file. All of them. However it seems like JBoss can't process Spring's DispatcherServlet. If I remove the following entry from the web.xml the deployment succeeds, but the application doesn't.

            <servlet>
                 <servlet-name>dispatcher</servlet-name>
                 <servlet-class>
                   org.springframework.web.servlet.DispatcherServlet
                 </servlet-class>
                 <load-on-startup>1</load-on-startup>
            </servlet>
            
            

            By removing the servlet-class the upper mentioned error does not appear and the deployment succeeds. The application however won't work. As for jboss-deployment-structure.xml, I am not using it at the moment. This is my first time working under JBoss application server, but I'll take a look at this xml.

             

            @Edit: After looking at the deployment-structure documentation I believe I don't need this functionality. I'm trying to deploy a wimple war not an ear where I would encounter ClassLoading problems. To give me details here's the server.log entry for the failed deployment:

            server.log

            22:23:53,172 INFO  [org.jboss.as.repository] (management-handler-thread - 1) JBAS014900: Content added at location C:\JBoss Application Server\jboss-eap-6.3\standalone\data\content\51\c2adf662911a9a26d5329a69fb2a2f5d94e0f1\content

            22:23:53,172 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of "HelloWorld.war" (runtime-name: "HelloWorld.war")

            22:23:53,641 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.unit."HelloWorld.war".DEPENDENCIES: org.jboss.msc.service.StartException in service jboss.deployment.unit."HelloWorld.war".DEPENDENCIES: JBAS018733: Failed to process phase DEPENDENCIES of deployment "HelloWorld.war"

              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [jboss-as-server-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]

              at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.8.0_11]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.8.0_11]

              at java.lang.Thread.run(Unknown Source) [rt.jar:1.8.0_11]

            Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: org.jboss.as.server.deployment.DeploymentUnitProcessingException: java.lang.NullPointerException

              at org.jboss.as.jaxrs.deployment.JaxrsSpringProcessor.deploy(JaxrsSpringProcessor.java:207)

              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [jboss-as-server-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]

              ... 5 more

            Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: java.lang.NullPointerException

              at org.jboss.as.jaxrs.deployment.JaxrsSpringProcessor.getResteasySpringVirtualFile(JaxrsSpringProcessor.java:137)

              at org.jboss.as.jaxrs.deployment.JaxrsSpringProcessor.deploy(JaxrsSpringProcessor.java:203)

              ... 6 more

            Caused by: java.lang.NullPointerException

              at org.jboss.as.jaxrs.deployment.JaxrsSpringProcessor.getResteasySpringVirtualFile(JaxrsSpringProcessor.java:106)

              ... 7 more

             

             

            22:23:53,641 ERROR [org.jboss.as.server] (management-handler-thread - 1) JBAS015870: Deploy of deployment "HelloWorld.war" was rolled back with the following failure message:

            {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"HelloWorld.war\".DEPENDENCIES" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"HelloWorld.war\".DEPENDENCIES: JBAS018733: Failed to process phase DEPENDENCIES of deployment \"HelloWorld.war\"

                Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: org.jboss.as.server.deployment.DeploymentUnitProcessingException: java.lang.NullPointerException

                Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: java.lang.NullPointerException

                Caused by: java.lang.NullPointerException"}}

            22:23:53,688 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015877: Stopped deployment HelloWorld.war (runtime-name: HelloWorld.war) in 46ms

            22:23:53,688 INFO  [org.jboss.as.controller] (management-handler-thread - 1) JBAS014774: Service status report

            JBAS014777:   Services which failed to start:      service jboss.deployment.unit."HelloWorld.war".DEPENDENCIES

            Those NullPointerExceptions are really bothersome for me.
            I've tried to deploy my application in the following ways:

            1. From Eclipse Luna
            2. From Command Line with mvn -X clean package org.jboss.as.plugins:jboss-as-maven-plugin:7.6.Final:deploy (By adding jboss-as-maven-plugin to pom.xml under build configuration)
            3. From Admin page through browser
            4. Through file system

            Well all of these results in the very same server.log message as I provided upper. The very same application depoys to GlassFish, Tomcat, Weblogic without any issues, so I don't think the problem is application related.

            • 3. Re: Re: JBoss EAP 6.3.0 Spring MVC deployment failure
              Mustafa Musaji Novice

              I think you need to add a springmvc-resteasy.xml perhaps? Take a look at the JAX-RS Spring MVC (section 40.2) in the following documentation.

               

              RESTEasy JAX-RS

              • 4. Re: JBoss EAP 6.3.0 Spring MVC deployment failure
                Jozsef Horvath Newbie

                I highly doubt. Resteasy has nothing to do with my application and it doesn't need it. Those exceptions arise within JBoss itself. I just don't think that resteasy is a required dependency for my project when I don't use it at all (and my app works on other app servers - glassfish, tomcat, weblogic).

                • 5. Re: Re: JBoss EAP 6.3.0 Spring MVC deployment failure
                  Mitesh Manani Newbie

                  Hello,

                   

                  i could generate the Exact error but on WildFly 9.0.0 Alpha 2. It can be a case what i have build WildFly using wrong version of Code. But i made sure i pulled it latest (master) repo from Git (Both Parent Aggregator and Core Aggregator). But the same works perfectly with Jboss EAP 6.2@@@@@

                   

                  2014-11-04 19:11:40,352 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.unit."openstores-core.war".DEPENDENCIES: org.jboss.msc.service.StartException in service jboss.deployment.unit."openstores-core.war".DEPENDENCIES: WFLYSRV0153: Failed to process phase DEPENDENCIES of deployment "openstores-core.war"

                    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:163) [wildfly-server-1.0.0.Alpha9.jar:1.0.0.Alpha9]

                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]

                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]

                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_71]

                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_71]

                    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_71]

                  Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: org.jboss.as.server.deployment.DeploymentUnitProcessingException: java.lang.NullPointerException

                    at org.jboss.as.jaxrs.deployment.JaxrsSpringProcessor.deploy(JaxrsSpringProcessor.java:203)

                    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:156) [wildfly-server-1.0.0.Alpha9.jar:1.0.0.Alpha9]

                    ... 5 more

                  Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: java.lang.NullPointerException

                    at org.jboss.as.jaxrs.deployment.JaxrsSpringProcessor.getResteasySpringVirtualFile(JaxrsSpringProcessor.java:133)

                    at org.jboss.as.jaxrs.deployment.JaxrsSpringProcessor.deploy(JaxrsSpringProcessor.java:199)

                    ... 6 more

                  Caused by: java.lang.NullPointerException

                    at org.jboss.as.jaxrs.deployment.JaxrsSpringProcessor.getResteasySpringVirtualFile(JaxrsSpringProcessor.java:103)

                    ... 7 more

                  • 6. Re: JBoss EAP 6.3.0 Spring MVC deployment failure
                    Jay SenSharma Master

                    Hello,

                     

                       Do you have any space included in the EAP6.3 installation path?   If yes then remove that space. Means Install EAP 6.3 in  a PATH which does not include Space.

                      I was able to reproduce the same error and reported as part of   [WFLY-4075] If the WildFly installation directory path contains space then JaxrsSpringProcessor causes NullPointerExcept…

                    • 7. Re: JBoss EAP 6.3.0 Spring MVC deployment failure
                      Jay SenSharma Master

                      Please Ignore above.

                       

                      The issue was not because of space in the path.  It was due to a WAR which i was testing with the following context-param.  as a test case i used http://www.mkyong.com/wp-content/uploads/2011/07/RESTEasyt-Spring-Integration-Example.zip

                       

                      <context-param>
                                       <param-name>org.jboss.as.jaxrs.enableSpringIntegration</param-name>
                                  <param-value>true</param-value>
                          </context-param>
                      • 8. Re: JBoss EAP 6.3.0 Spring MVC deployment failure
                        sasi Kiran Newbie

                        Hi Jay SenSharma,

                         

                        Im facing the same issue and i don't have this

                        <context-param>
                                        <param-name>org.jboss.as.jaxrs.enableSpringIntegration</param-name>
                                   <param-value>true</param-value>
                          

                        </context-param

                         

                        in my web.xml but still im getting the issue.