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

    EJB web service endpoint registration NPE

    Jeremy Whiting Expert

      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