4 Replies Latest reply on Aug 2, 2013 8:36 AM by Tomaz Cerar

    Facing error during deployment of war file in jboss7

    sumit kadian Newbie

      When I am deploying the war file in jboss . then i getting following error

       

      =====================================================================================

      15:24:58,871 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/app]] (ServerService Thread Pool -- 70) JBWEB000287: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener: java.lang.NoSuchMethodError: org.springframework.util.ReflectionUtils.makeAccessible(Ljava/lang/reflect/Constructor;)V

          at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:125) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]

          at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:104) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]

          at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:234) [spring.jar:2.0.5]

          at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187) [spring.jar:2.0.5]

          at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49) [spring.jar:2.0.5]

          at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3339) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

          at org.apache.catalina.core.StandardContext.start(StandardContext.java:3777) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

          at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:156) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

          at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

          at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_25]

          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_25]

          at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_25]

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

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

          at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]

          at org.jboss.threads.JBossThread.run(JBossThread.java:122)


      15:24:59,023 ERROR [org.apache.catalina.core] (ServerService Thread Pool -- 70) JBWEB001103: Error detected during context /app start, will stop it

      15:24:59,048 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/app]] (ServerService Thread Pool -- 70) Closing Spring root WebApplicationContext

      15:24:59,057 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 70) MSC000001: Failed to start service jboss.web.deployment.default-host./app: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./app: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context

          at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:96)

          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_25]

          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_25]

          at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_25]

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

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

          at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]

          at org.jboss.threads.JBossThread.run(JBossThread.java:122)

      Caused by: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context

          at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:161)

          at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60)

          at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93)



      --

      ==========================================================================================



      Please tell me how to solve this issue.


      Thanks & Regards,

      Sumit Kadian

        • 1. Re: Facing error during deployment of war file in jboss7
          Tomaz Cerar Master

          Hi,

           

          it apears you have Spring 3 and 2 jars in your lib.

           

          remove spring2 jars(spring.jar) and it should work

           

           

           

          --

          tomaz

          • 2. Re: Facing error during deployment of war file in jboss7
            sumit kadian Newbie

            Hi tomaz.

             

            As you can see below are the contents of WEB-INF/lib of the war. Its having only spring.jar.

             

            ==========================================

            [root@server lib]# ll *spring* | awk '{print $NF}'

            org.springframework.asm-3.0.5.RELEASE.jar

            org.springframework.asm-sources-3.0.6.RELEASE.jar

            org.springframework.beans-3.0.5.RELEASE.jar

            org.springframework.beans-sources-3.0.6.RELEASE.jar

            org.springframework.context-3.0.5.RELEASE.jar

            org.springframework.context-sources-3.0.6.RELEASE.jar

            org.springframework.context.support-3.0.5.RELEASE.jar

            org.springframework.context.support-sources-3.0.6.RELEASE.jar

            org.springframework.core-3.0.5.RELEASE.jar

            org.springframework.core-sources-3.0.6.RELEASE.jar

            org.springframework.expression-3.0.5.RELEASE.jar

            org.springframework.expression-sources-3.0.6.RELEASE.jar

            spring.jar

            struts2-spring-plugin-2.1.6.jar

             

            ==============================================

             

             

            Pl tell me how to proceed to resovle the problem

            • 3. Re: Facing error during deployment of war file in jboss7
              Stephen Coy Master

              As Tomaz Cerar said, remove "spring.jar".

               

              In addition, you should remove the org.springframework.*-sources-3.0.6.jar files from your built artifact. They are harmless, but will increase build and deployment times and size.

              • 4. Re: Facing error during deployment of war file in jboss7
                Tomaz Cerar Master

                problem is that you have spring 2 and spring 3 jars in lib

                sumit kadian wrote:

                 

                ==========================================

                [root@server lib]# ll *spring* | awk '{print $NF}'

                org.springframework.asm-3.0.5.RELEASE.jar

                org.springframework.asm-sources-3.0.6.RELEASE.jar <-- remove no need for sources

                org.springframework.beans-3.0.5.RELEASE.jar

                org.springframework.beans-sources-3.0.6.RELEASE.jar <-- remove no need for sources

                org.springframework.context-3.0.5.RELEASE.jar

                org.springframework.context-sources-3.0.6.RELEASE.jar <-- remove no need for sources

                org.springframework.context.support-3.0.5.RELEASE.jar

                org.springframework.context.support-sources-3.0.6.RELEASE.jar <-- remove no need for sources

                org.springframework.core-3.0.5.RELEASE.jar <-- this is spring core jar, same as it was for version two called spring.jar

                org.springframework.core-sources-3.0.6.RELEASE.jar <-- remove no need for sources

                org.springframework.expression-3.0.5.RELEASE.jar

                org.springframework.expression-sources-3.0.6.RELEASE.jar <-- remove no need for sources

                spring.jar <-- remove this as this is version two of spring, version 3 you have as part of org.springframework.core-3.0.5.RELEASE

                struts2-spring-plugin-2.1.6.jar

                 

                ==============================================

                 

                also i am not sure why you have 3.0.6 source jars there but 3.0.5 classes...

                 

                --

                tomaz