10 Replies Latest reply on Jun 2, 2011 10:32 PM by racumin

    JBoss AS 6 NullPointerException when deploying an exploded WAR

    racumin Newbie

      Hi Im using JBoss AS6 and I have a WAR file. If I use admin console and deploy it (not exploded), it runs smoothly with no errors. But if I deployed it in exploded mode, it produces a NullPointerException. Here is the trace:

       

       

      2011-05-26 11:01:50,401 INFO  [org.rhq.core.pc.inventory.CreateResourceRunner] (ResourceFactory.executor-1) Creating resource through report: CreateResourceReport: ResourceType=[ResourceType[id=0, category=Service, name=Web Application (WAR), plugin=JBossAS5]], ResourceKey=[null]

      2011-05-26 11:01:51,000 INFO  [org.jboss.profileservice.management.upload.remoting.DeployHandler] (ResourceContainer.invoker.nonDaemon-16) invoke, payload: {DeploymentTargetID=names=[vfs:///home/applications/jboss-6.0.0.Final/server/default/deploy/ac-server-1.0.0.war]}, parameter: start

      2011-05-26 11:02:01,878 INFO  [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (ResourceContainer.invoker.nonDaemon-16) deploy, ctxPath=/ac-server-1.0.0

      2011-05-26 11:02:01,943 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/ac-server-1.0.0]] (ResourceContainer.invoker.nonDaemon-16) Set web app root system property: 'webapp.root' = [/home/applications/jboss-6.0.0.Final/server/default/deploy/ac-server-1.0.0.war/]

      2011-05-26 11:02:01,943 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/ac-server-1.0.0]] (ResourceContainer.invoker.nonDaemon-16) Initializing log4j from [/home/applications/jboss-6.0.0.Final/server/default/deploy/ac-server-1.0.0.war/WEB-INF/log4j.xml]

      2011-05-26 11:02:01,980 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/ac-server-1.0.0]] (ResourceContainer.invoker.nonDaemon-16) Initializing Spring root WebApplicationContext

      2011-05-26 11:02:10,693 ERROR [org.rhq.plugins.jbossas5.deploy.LocalDeployer] (ResourceContainer.invoker.nonDaemon-16) Error deploying application for request [CreateResourceReport: ResourceType=[ResourceType[id=0, category=Service, name=Web Application (WAR), plugin=JBossAS5]], ResourceKey=[null]].: java.lang.NullPointerException

                at org.rhq.plugins.jbossas5.deploy.AbstractDeployer.deploy(AbstractDeployer.java:131) [jopr-jboss-as-5-plugin-3.0.0.jar:3.0.0]

                at org.rhq.plugins.jbossas5.helper.CreateChildResourceFacetDelegate.createContentBasedResource(CreateChildResourceFacetDelegate.java:124) [jopr-jboss-as-5-plugin-3.0.0.jar:3.0.0]

                at org.rhq.plugins.jbossas5.helper.CreateChildResourceFacetDelegate.createResource(CreateChildResourceFacetDelegate.java:56) [jopr-jboss-as-5-plugin-3.0.0.jar:3.0.0]

                at org.rhq.plugins.jbossas5.ApplicationServerComponent.createResource(ApplicationServerComponent.java:304) [jopr-jboss-as-5-plugin-3.0.0.jar:3.0.0]

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_20]

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_20]

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_20]

                at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_20]

                at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525) [:3.0.0]

                at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [:1.6.0_20]

                at java.util.concurrent.FutureTask.run(FutureTask.java:138) [:1.6.0_20]

                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_20]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_20]

                at java.lang.Thread.run(Thread.java:619) [:1.6.0_20]

       

       

      2011-05-26 11:02:10,699 WARN  [org.rhq.core.pc.inventory.CreateResourceRunner] (ResourceFactory.executor-1) Throwable was found in creation report for request [1]: java.lang.NullPointerException - Enable DEBUG logging to see the stack trace.

      2011-05-26 11:02:10,699 INFO  [org.rhq.core.pc.inventory.CreateResourceRunner] (ResourceFactory.executor-1) Sending create response to server: CreateResourceResponse[RequestId=1, Status=Failure]

       

       

      But when I refresh the admin console, my WAR file was deployed even though the error occurred. What causes this problem?

       

      Thanks!