[jboss-user] [EJB 3.0] - Re: NullPointerException in JavaEEComponentHelper with JBoss

japase do-not-reply at jboss.com
Tue Apr 7 06:55:38 EDT 2009


Hi again,

It took some time, but finally I could manage to test one of the suggested workarrounds.

EJBs in our application are automatically generated, so I can't easily rename the jar files, but I could manage to customize our code generator to use the 'mappedName' attribute.
Unfortunately it still fails, but this time with another exception:

anonymous wrote : 
  | 12:33:25,959 ERROR [AbstractKernelController] Error installing to Real: name=vfs
  | file:/E:/ifs_home_WS/jboss-5.1.0.Beta1/server/dev/deploy/ifsapp.ear/ state=PreRe
  | al mode=Manual requiredState=Real
  | org.jboss.deployers.spi.DeploymentException: Error deploying administrateuserpro
  | files-ejb.jar: null
  |         at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:196)
  |         at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:99)
  |         at org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer.internal
  | Deploy(AbstractVFSRealDeployer.java:45)
  |         at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(
  | AbstractRealDeployer.java:50)
  |         at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(Deployer
  | Wrapper.java:171)
  |         at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(Deployer
  | sImpl.java:1439)
  |         at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFi
  | rst(DeployersImpl.java:1157)
  |         at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFi
  | rst(DeployersImpl.java:1210)
  |         at org.jboss.deployers.plugins.deployers.DeployersImpl.install(Deployers
  | Impl.java:1098)
  |         at org.jboss.dependency.plugins.AbstractControllerContext.install(Abstra
  | ctControllerContext.java:348)
  |         at org.jboss.dependency.plugins.AbstractController.install(AbstractContr
  | oller.java:1598)
  |         at org.jboss.dependency.plugins.AbstractController.incrementState(Abstra
  | ctController.java:934)
  |         at org.jboss.dependency.plugins.AbstractController.resolveContexts(Abstr
  | actController.java:1062)
  |         at org.jboss.dependency.plugins.AbstractController.resolveContexts(Abstr
  | actController.java:984)
  |         at org.jboss.dependency.plugins.AbstractController.change(AbstractContro
  | ller.java:822)
  |         at org.jboss.dependency.plugins.AbstractController.change(AbstractContro
  | ller.java:553)
  |         at org.jboss.deployers.plugins.deployers.DeployersImpl.process(Deployers
  | Impl.java:781)
  |         at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeploye
  | rImpl.java:698)
  |         at org.jboss.system.server.profileservice.repository.MainDeployerAdapter
  | .process(MainDeployerAdapter.java:117)
  |         at org.jboss.system.server.profileservice.repository.ProfileDeployAction
  | .install(ProfileDeployAction.java:59)
  |         at org.jboss.system.server.profileservice.repository.AbstractProfileActi
  | on.install(AbstractProfileAction.java:53)
  |         at org.jboss.system.server.profileservice.repository.AbstractProfileServ
  | ice.install(AbstractProfileService.java:355)
  |         at org.jboss.dependency.plugins.AbstractControllerContext.install(Abstra
  | ctControllerContext.java:348)
  |         at org.jboss.dependency.plugins.AbstractController.install(AbstractContr
  | oller.java:1598)
  |         at org.jboss.dependency.plugins.AbstractController.incrementState(Abstra
  | ctController.java:934)
  |         at org.jboss.dependency.plugins.AbstractController.resolveContexts(Abstr
  | actController.java:1062)
  |         at org.jboss.dependency.plugins.AbstractController.resolveContexts(Abstr
  | actController.java:984)
  |         at org.jboss.dependency.plugins.AbstractController.change(AbstractContro
  | ller.java:822)
  |         at org.jboss.dependency.plugins.AbstractController.change(AbstractContro
  | ller.java:553)
  |         at org.jboss.system.server.profileservice.repository.AbstractProfileServ
  | ice.activateProfile(AbstractProfileService.java:310)
  |         at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(
  | ProfileServiceBootstrap.java:241)
  |         at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:
  | 461)
  |         at org.jboss.Main.boot(Main.java:216)
  |         at org.jboss.Main$1.run(Main.java:546)
  |         at java.lang.Thread.run(Thread.java:619)
  | Caused by: java.lang.NullPointerException
  |         at org.jboss.ejb3.session.ProxyDeployer.hasJNDIBinding(ProxyDeployer.jav
  | a:98)
  |         at org.jboss.ejb3.session.SessionContainer.hasJNDIBinding(SessionContain
  | er.java:696)
  |         at org.jboss.injection.AbstractHandler.addJNDIDependency(AbstractHandler
  | .java:77)
  |         at org.jboss.injection.EJBRemoteHandler.ejbRefDependency(EJBRemoteHandle
  | r.java:134)
  |         at org.jboss.injection.EJBRemoteHandler.handleFieldAnnotations(EJBRemote
  | Handler.java:393)
  |         at org.jboss.injection.InjectionUtil.processFieldAnnotations(InjectionUt
  | il.java:160)
  |         at org.jboss.injection.InjectionUtil.processAnnotations(InjectionUtil.ja
  | va:197)
  |         at org.jboss.ejb3.EJBContainer.processMetadata(EJBContainer.java:590)
  |         at org.jboss.ejb3.Ejb3Deployment.processEJBContainerMetadata(Ejb3Deploym
  | ent.java:418)
  |         at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:526)
  |         at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:189)
  |         ... 34 more
  | 

I have tested the application in 4.3 and it works.

An example of how the EJB declaration looks like:


  | @Stateless(name="UserProfileService")
  | public class UserProfileServiceBean extends FndImplementationBean implements UserProfileServiceLocal { ...
  | 

And how we refer to the same EJB; the original code:


  | @EJB private UserProfileServiceLocal userProfileService;
  | 

and now, after introducing the 'mappedName' attribute:


  | @EJB(mappedName="ifsapp/UserProfileService/local") private UserProfileServiceLocal userProfileService;
  | 

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4223992#4223992

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4223992



More information about the jboss-user mailing list