1 2 Previous Next 22 Replies Latest reply on Feb 24, 2009 8:36 AM by jaikiran pai

    NullPointerException in JavaEEComponentHelper with JBoss-5.0

    James Callaghan Newbie

      Well it's official. I've now posted more to the forum in two days than I have in the last 2 years. Sorry to bug you guys again but there's not too much help out there yet on JBoss.CR1. Hope my posts, and your fine solutions, help people in the future.

      Anyway, I'm still having problems deploying. My EARs all deploy fine to JBoss5 Beta4 but I'm getting the following stack trace when deploying to JBoss5 CR1.

      15:06:22,674 DEBUG [Ejb3Deployer] Error during deploy: vfszip:/home/jim/messaging-platform/jboss-5.0.0.CR1/server/custom1/deploy/webs/10.mpee.local.20080702.1514.ear
      org.jboss.deployers.spi.DeploymentException: Error deploying 10.mpee.local.20080702.1514.ear: null
       at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:192)
       at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:95)
       at org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer.internalDeploy(AbstractVFSRealDeployer.java:45)
       at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
       at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:174)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:970)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:911)
       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1392)
       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:784)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:912)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:834)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:672)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:455)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:594)
       at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:541)
       at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:257)
       at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:135)
       at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:409)
       at org.jboss.Main.boot(Main.java:209)
       at org.jboss.Main$1.run(Main.java:544)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: java.lang.NullPointerException
       at org.jboss.ejb3.javaee.JavaEEComponentHelper.createObjectName(JavaEEComponentHelper.java:46)
       at org.jboss.ejb3.deployers.JBoss5DeploymentScope.getEjbContainer(JBoss5DeploymentScope.java:167)
       at org.jboss.ejb3.Ejb3Deployment.getEjbContainer(Ejb3Deployment.java:384)
       at org.jboss.ejb3.EJBContainer.resolveEjbContainer(EJBContainer.java:1324)
       at org.jboss.injection.AbstractHandler.addDependency(AbstractHandler.java:50)
       at org.jboss.injection.EJBRemoteHandler.ejbRefDependency(EJBRemoteHandler.java:143)
       at org.jboss.injection.EJBRemoteHandler.handleFieldAnnotations(EJBRemoteHandler.java:371)
       at org.jboss.injection.InjectionUtil.processFieldAnnotations(InjectionUtil.java:162)
       at org.jboss.injection.InjectionUtil.processAnnotations(InjectionUtil.java:199)
       at org.jboss.ejb3.EJBContainer.processMetadata(EJBContainer.java:563)
       at org.jboss.ejb3.Ejb3Deployment.processEJBContainerMetadata(Ejb3Deployment.java:392)
       at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:505)
       at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:185)
       ... 21 more


      I don't really have much more than I can add to this because I'm not really told much more in the log. I've set logging so that "org.jboss" is at DEBUG and I do have a lot of other logging but nothing that seems to relate to this issue.

      I've checked out the source of the JavaEEComponentHelper class:

      public static String createObjectName(JavaEEModule module, String unitName, String ejbName)
      {
       // TODO: currently it's only for EJB3 service
       StringBuilder sb = new StringBuilder(Ejb3Module.BASE_EJB3_JMX_NAME + ",");
       JavaEEApplication ear = module.getApplication();
       if (ear != null)
       {
       sb.append("ear=");
       sb.append(ear.getName());
       sb.append(",");
       }
       sb.append("jar=");
       sb.append(unitName);
       sb.append(",name=");
       sb.append(ejbName);
       try
       {
       ObjectName on = new ObjectName(sb.toString());
       return on.getCanonicalName();
       }
       catch (MalformedObjectNameException e)
       {
       throw new RuntimeException(e);
       }
      }


      So I believe that the JavaEEModule object that is being passed in must be null. Unfortunately I can't see where this module name is set. Is it part of the WAR or maybe an entry in application.xml?

      Again, any insight is very much appreciated.

        1 2 Previous Next