[jboss-jira] [JBoss JIRA] Commented: (EJBTHREE-1969) EJB3 deployments lead to java.lang.IllegalStateException: Null beannMetaData
jaikiran pai (JIRA)
jira-events at lists.jboss.org
Sun Dec 13 06:43:30 EST 2009
[ https://jira.jboss.org/jira/browse/EJBTHREE-1969?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12499603#action_12499603 ]
jaikiran pai commented on EJBTHREE-1969:
----------------------------------------
The .ear is packaged as follows:
.ear
|
|--- ejb.jar
|--- web.war
|--- lib
| |--- some utility jars
| |--- some jars containing beans
The ejb.jar has references to beans deployed in jar(s) in the .ear/lib folder. This leads to the deployer throwing:
2009-12-13 14:02:03,661 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Real: name=vfszip:/jboss-5.0.0.GA/server/default/deploy/myapp.ear/ state=PreReal mode=Manual requiredState=Real
org.jboss.deployers.spi.DeploymentException: Error deploying rhevm.ear: failed to initialize bean container
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.internalDeploy(AbstractVFSRealDeployer.java:45)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
...
at org.jboss.system.server.profileservice.repository.AbstractProfileService.registerProfile(AbstractProfileService.java:308)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:256)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
at org.jboss.Main.boot(Main.java:221)
at org.jboss.Main$1.run(Main.java:556)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.RuntimeException: failed to initialize bean container
at org.jboss.ejb3.EJBContainer.<init>(EJBContainer.java:255)
at org.jboss.ejb3.session.SessionContainer.<init>(SessionContainer.java:119)
at org.jboss.ejb3.service.ServiceContainer.<init>(ServiceContainer.java:122)
at org.jboss.ejb3.Ejb3AnnotationHandler.getServiceContainer(Ejb3AnnotationHandler.java:267)
at org.jboss.ejb3.Ejb3AnnotationHandler.getContainers(Ejb3AnnotationHandler.java:225)
at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:734)
at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:685)
at org.jboss.ejb3.Ejb3Deployment.deployUrl(Ejb3Deployment.java:667)
at org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:630)
at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:507)
at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:182)
... 33 more
Caused by: java.lang.IllegalStateException: Null beannMetaData
at org.jboss.ejb3.interceptors.metadata.BeanInterceptorMetaDataBridge.setupMetaDataLists(BeanInterceptorMetaDataBridge.java:315)
at org.jboss.ejb3.interceptors.metadata.BeanInterceptorMetaDataBridge.initialise(BeanInterceptorMetaDataBridge.java:235)
at org.jboss.ejb3.interceptors.metadata.BeanInterceptorMetaDataBridge.<init>(BeanInterceptorMetaDataBridge.java:138)
at org.jboss.ejb3.interceptors.metadata.AdditiveBeanInterceptorMetaDataBridge.<init>(AdditiveBeanInterceptorMetaDataBridge.java:48)
at org.jboss.ejb3.aop.BeanContainer.initialize(BeanContainer.java:195)
at org.jboss.ejb3.EJBContainer.<init>(EJBContainer.java:251)
... 43 more
Caused by: java.lang.NullPointerException
The real issue here is a bug in the EJB3Deployer which has been fixed in JBPAPP-2934/JBAS-7004. With the bug fix in JBPAPP-2934/JBAS-7004, there shouldn't be any NPE as reported in this exception stacktrace.
However, an important point to remember which packaging is that "auto-detection" of EJBs through annotation scanning will *not* be done in jars packaged in the "lib" folder of the EAR. So if it's not explicitly marked as an ejb-module in the application.xml, such EJBs will never be deployed.
> EJB3 deployments lead to java.lang.IllegalStateException: Null beannMetaData
> -----------------------------------------------------------------------------
>
> Key: EJBTHREE-1969
> URL: https://jira.jboss.org/jira/browse/EJBTHREE-1969
> Project: EJB 3.0
> Issue Type: Bug
> Affects Versions: 1.1.22
> Reporter: jaikiran pai
> Assignee: jaikiran pai
> Attachments: helloWorld2Bad.ear, helloWorld2Good.ear
>
>
> There has been more than one instance where users have reported issues around EJB3 deployments which leads to exception like this:
> Caused by: java.lang.IllegalStateException: Null beannMetaData
> at org.jboss.ejb3.interceptors.metadata.BeanInterceptorMetaDataBridge.setupMetaDataLists(BeanInterceptorMetaDataBridge.java:315)
> at org.jboss.ejb3.interceptors.metadata.BeanInterceptorMetaDataBridge.initialise(BeanInterceptorMetaDataBridge.java:235)
> at org.jboss.ejb3.interceptors.metadata.BeanInterceptorMetaDataBridge.(BeanInterceptorMetaDataBridge.java:138)
> at org.jboss.ejb3.interceptors.metadata.AdditiveBeanInterceptorMetaDataBridge.(AdditiveBeanInterceptorMetaDataBridge.java:48)
> at org.jboss.ejb3.aop.BeanContainer.initialize(BeanContainer.java:194)
> at org.jboss.ejb3.EJBContainer.(EJBContainer.java:249)
> One such forum thread discussion is referenced in this JIRA. The issue appears to be around the way the deployment has been packaged. This needs more investigation and a fix (or an explanation about why this happens and the correct way to package the culprit application).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list