2 Replies Latest reply on Nov 12, 2015 10:18 AM by maboth

    Caused by: java.lang.NullPointerException

    siddharth.rudra31

      Hello Everyone,

       

      I am migrating an application from JBoss 4.2 to JBoss as 7. I build the deployment files and  added them into standalone/deployment directory. When I started the server I am getting below stacktrace :

       

      16:52:36,518 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.subunit."ReportEngineWeb.ear"."ReportEngineWeb.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."ReportEngineWeb.ear"."ReportEngineWeb.war".INSTALL: JBAS018733: Failed to process phase INSTALL of subdeployment "ReportEngineWeb.war" of deployment "ReportEngineWeb.ear"

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

        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(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_60]

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

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

      Caused by: java.lang.NullPointerException

        at org.jboss.wsf.stack.cxf.metadata.MetadataBuilder.createDDEndpoint(MetadataBuilder.java:213)

        at org.jboss.wsf.stack.cxf.metadata.MetadataBuilder.build(MetadataBuilder.java:83)

        at org.jboss.wsf.stack.cxf.deployment.aspect.DescriptorDeploymentAspect.generateMetadataFromDeployment(DescriptorDeploymentAspect.java:135)

        at org.jboss.wsf.stack.cxf.deployment.aspect.DescriptorDeploymentAspect.start(DescriptorDeploymentAspect.java:68)

        at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:74)

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

        ... 5 more

       

      I tried to follow this link NullPointerException during deployment of a CXF webservice end point in JBoss EAP6 - Red Hat Customer Portal , and no use.I got stuck at this situation.Please help me on this. I am also attaching my server.log file. Please find it. Sorry If I talking something wrong as I am a newbie to JBoss. Thanks in advance.

        • 1. Re: Caused by: java.lang.NullPointerException
          maboth

          The reason for this NullPointerException is, that the WebService implementaion class

          does not have a WebService or WebServiceProvider annotation.

          Unfortunately JBoss does not print the name of the bad implementation class.


          If your implementation class still has such annotation, then the reason is,

          that you have two instances of the same annotation class in different class loaders.

          Sometimes class loading in JBoss is a nightmare. So it could be possible that you

          have one instance of the annotaion javax.jws.WebService in the Java system classloader

          and another instance of the same annotation interface in the JBoss module classloader.

          This class loader constellation results in the same NullPointerException.

          The best JBoss solution is to remove javax packages from the Java classpath.

          A second solution is to add javax packages to the system property "jboss.modules.system.pkgs"

          like

          -Djboss.modules.system.pkgs=javax.ejb,javax.jws,javax.xml,javax.interceptor,javax.annotation

          The second solution is what I have done.

           

          Martin Both