7 Replies Latest reply on Dec 1, 2011 4:38 AM by asoldano

    EJB web service endpoint registration NPE

    whitingjr

      Hi,

        I have an JEE application based on JEE5 spec. Bundled are some ejb3 SLSB. One is annotated with webservice. When AS7 starts up it is throwing an error when it attempts to register the endpoint.

      In webservices/server-integration/src/main/java/org/jboss/as/webservices/deployers/WSIntegrationProcessorJAXRPC_EJB.java the newEjbEndpoint(final PortComponentMetaData portComponentMD, final EEModuleDescription moduleDescription, final Set<String> securityRoles) method gets the interface class name by calling portComponentMD.getServiceEndpointInterface().

      The value returned is null. So this null passed on the next line to sessionBean.addWebserviceEndpointView(seiIfaceClassName)  causes the following NullPointerException stack trace.

       

      18:03:11,599 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.subunit."specj.ear"."specj.jar".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."specj.ear"."specj.jar".PARSE: Failed to process phase PARSE of subdeployment "specj.jar" of deployment "specj.ear"

          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) [jboss-as-server-7.1.0.Alpha2-SNAPSHOT.jar:7.1.0.Alpha2-SNAPSHOT]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [:1.6.0_20]

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

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

      Caused by: java.lang.NullPointerException

          at org.jboss.as.ejb3.component.EJBViewDescription.hashCode(EJBViewDescription.java:120)

          at java.util.HashMap.put(HashMap.java:389) [:1.6.0_20]

          at java.util.HashSet.add(HashSet.java:217) [:1.6.0_20]

          at org.jboss.as.ejb3.component.EJBComponentDescription.registerView(EJBComponentDescription.java:838)

          at org.jboss.as.ejb3.component.EJBComponentDescription.registerView(EJBComponentDescription.java:832)

          at org.jboss.as.ejb3.component.session.SessionBeanComponentDescription.addWebserviceEndpointView(SessionBeanComponentDescription.java:176)

          at org.jboss.as.webservices.deployers.WSIntegrationProcessorJAXRPC_EJB.newEjbEndpoint(WSIntegrationProcessorJAXRPC_EJB.java:101)

          at org.jboss.as.webservices.deployers.WSIntegrationProcessorJAXRPC_EJB.createJaxrpcDeployment(WSIntegrationProcessorJAXRPC_EJB.java:91)

          at org.jboss.as.webservices.deployers.WSIntegrationProcessorJAXRPC_EJB.deploy(WSIntegrationProcessorJAXRPC_EJB.java:76)

          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.1.0.Alpha2-SNAPSHOT.jar:7.1.0.Alpha2-SNAPSHOT]

          ... 5 more

       

      18:03:11,810 INFO  [org.jboss.as.server.controller] (Remoting "burtha02-wireless:MANAGEMENT" task-4) Deployment of "specj.ear" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.subunit.\"specj.ear\".\"specj.jar\".PARSE" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"specj.ear\".\"specj.jar\".PARSE: Failed to process phase PARSE of subdeployment \"specj.jar\" of deployment \"specj.ear\""}}

      18:03:11,821 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) Stopped deployment specj.jar in 10ms

      18:03:11,822 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) Stopped deployment specj-ejb-suppliersession.war in 11ms

      18:03:11,822 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) Stopped deployment supplier.war in 11ms

      18:03:11,828 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) Stopped deployment specj.war in 17ms

      18:03:11,831 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-7) Stopped deployment specj.ear in 20ms

      18:03:11,832 INFO  [org.jboss.as.controller] (Remoting "burtha02-wireless:MANAGEMENT" task-4) JBAS014774: Service status report

      JBAS014777:   Services which failed to start:      service jboss.deployment.subunit."specj.ear"."specj.jar".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."specj.ear"."specj.jar".PARSE: Failed to process phase PARSE of subdeployment "specj.jar" of deployment "specj.ear"

       

      I am using a as7 build from master branch. As of 22 Tue 2011.

       

      Jeremy

        • 1. Re: EJB web service endpoint registration NPE
          mp911de

          Hi Jeremy,

          using a JBoss AS which is built from a dev trunk might be not such a good idea...nevertheless it looks like, there is a problem resolving the ServiceEndpointInterface. Either specify the annotation property endpointInterface or post some code.

           

          Best regards,

          Mark

          • 2. Re: EJB web service endpoint registration NPE
            jaikiran

            Jeremy Whiting wrote:

             

            Hi,

              I have an JEE application based on JEE5 spec. Bundled are some ejb3 SLSB. One is annotated with webservice. When AS7 starts up it is throwing an error when it attempts to register the endpoint.

            In webservices/server-integration/src/main/java/org/jboss/as/webservices/deployers/WSIntegrationProcessorJAXRPC_EJB.java the newEjbEndpoint(final PortComponentMetaData portComponentMD, final EEModuleDescription moduleDescription, final Set<String> securityRoles) method gets the interface class name by calling portComponentMD.getServiceEndpointInterface().

            The value returned is null. So this null passed on the next line to sessionBean.addWebserviceEndpointView(seiIfaceClassName)  causes the following NullPointerException stack trace.

             

            That null check should happen at some place for sure - for a better exception. I'm not sure why the WS metadata is returning null in first place. Please file a JIRA.

            • 3. Re: EJB web service endpoint registration NPE
              whitingjr

              Hi Jaikiran,

                JIRA raised.

               

              https://issues.jboss.org/browse/AS7-2759

               

              Jeremy

              • 4. Re: EJB web service endpoint registration NPE
                asoldano

                Thanks Jeremy. Any chance you can provide more info on the deployment (ws endpoint annotations, descriptors if any, etc.) If you could even provide the deployment for reproducing this issue, that would be great.

                • 5. Re: EJB web service endpoint registration NPE
                  whitingjr

                  Hi Alessio,

                  I am creating a test case to replicate the exception. When complete I'll attach it to the JIRA.

                   

                  Jeremy

                  • 6. Re: EJB web service endpoint registration NPE
                    whitingjr

                    Hi Alessio,

                      I have added a sample project to the JIRA which replicates the issue when deployed.

                     

                    It looks like the endpoint deployer is not detecting when the ejb jar descriptor file does not have an entry for the ejb. Which is valid when the descriptor file can define other things like MDBs.

                     

                    Jeremy

                    • 7. Re: EJB web service endpoint registration NPE
                      asoldano

                      Thanks Jeremy,

                      we'll have a look and fix the issue.