JBoss 5.1.0GA:“java.lang.IllegalStateException:Null beanMetaData”和“java.lang.RuntimeException:初始化bean容器失败”

时间:2009-10-19 23:52:43

标签: java jboss message jboss5.x ibm-mq

我正在尝试部署一个ear文件,最初是为Jboss 4.0.3 SP1编写的。

涉及“升级”:

  • 使用javax.annotation.PostConstruct
  • 将activateConfig更改为activationConfig
  • 确保bean实现导入javax.jms.MessageListener

我相信以下堆栈跟踪是由ejb文件中的MDB(唯一的)触发的。

10:42:37,350 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/C:/opt/jboss-5.1.0.GA/server/default/deploy/my-service.ear/ state=PreReal mode=Manual requiredState=Real
org.jboss.deployers.spi.DeploymentException: Error deploying my-service-ejb.jar: 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.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
        at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
        at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
        at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
        at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
        at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
        at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
        at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
        at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
        at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
        at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:362)
        at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        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:253)
        at org.jboss.ejb3.mdb.MessagingContainer.<init>(MessagingContainer.java:87)
        at org.jboss.ejb3.mdb.MDB.<init>(MDB.java:63)
        at org.jboss.ejb3.Ejb3AnnotationHandler.getMDB(Ejb3AnnotationHandler.java:336)
        at org.jboss.ejb3.Ejb3AnnotationHandler.getContainers(Ejb3AnnotationHandler.java:215)
        at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:718)
        at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:669)
        at org.jboss.ejb3.Ejb3Deployment.deployUrl(Ejb3Deployment.java:651)
        at org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:614)
        at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:491)
        at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:182)
        ... 29 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:194)
        at org.jboss.ejb3.EJBContainer.<init>(EJBContainer.java:249)
        ... 39 more
Caused by: java.lang.NullPointerException
        at org.jboss.ejb3.interceptors.metadata.BeanInterceptorMetaDataBridge.setupMetaDataLists(BeanInterceptorMetaDataBridge.java:268)
        ... 44 more

只是想知道是否有人可以建议看什么。

3 个答案:

答案 0 :(得分:1)

应该很奇怪,但请尝试查看您的项目是否缺少某些库。

我在这里做同样的事情,我试图在谷歌找到一些答案,没有什么可以帮助我。

然后,当我再次查看我的项目并看到有一些libs丢失时。当我添加它时,它可以工作。

答案 1 :(得分:1)

我在尝试部署由MAVEN创建的耳朵时遇到此错误 问题很简单:一个* -ejb.jar被声明为EAR模块,也被声明为其他模块中的依赖项。这导致在EAR包中有2 * -ear.jar,一个在ROOT文件夹中,另一个在lib文件夹中。

答案 2 :(得分:0)

我在修复一些arquillian测试时遇到过这种情况,这就是我在这个页面上的结果:(。当你有一个嵌入式类作为键的实体类时,似乎抛出了这个错误:

@Entity
@Table(name = "Xyz")
public class Xyz  implements Serializable
{
    @EmbeddedId
    private XyzPK id;
...
}

我的测试部署缺少类XyzPK,我得到了这个奇怪的“Null beannMetaData”错误。一旦我添加它就可以了。