CDI Beans模块部署失败:无法启动owb上下文

时间:2015-01-18 15:06:56

标签: java-8 junit4 eclipse-luna openejb tomee

我有一个Maven项目。构建运行正常,包括测试。但是当我仅使用Eclipse Luna运行测试时,测试失败了:

javax.enterprise.event.ObserverException: Caught Exception while handling event object with type : org.apache.webbeans.portable.events.discovery.AfterBeanDiscoveryImpl
...
Caused by: java.lang.AbstractMethodError: org.apache.webbeans.container.InjectableBeanManager.getInjectionTargetFactory(Ljavax/enterprise/inject/spi/AnnotatedType;)Ljavax/enterprise/inject/spi/InjectionTargetFactory;
    at com.sun.faces.util.cdi11.CDIUtilImpl.createHelperBean(CDIUtilImpl.java:76)
    at com.sun.faces.flow.FlowCDIExtension.afterBeanDiscovery(FlowCDIExtension.java:120)
    ... 60 more
INFO - Undeploying app: .../classpath.ear
org.apache.openejb.OpenEJBException: Creating application failed: /home/schnikow/projects/barbuchon2/BarbuchonKernel-2.0r0b-SNAPSHOT/classpath.ear: couldn't start owb context

(full stack trace is too long, I can provide it if needed)

我在启动配置中添加了所需的JVM参数(-javaagent:/usr/devel/apache-tomee-webprofile-1.7.1/lib/openejb-javaagent.jar)。我可能会错过一些微不足道的东西,但我不知道,是什么。

我使用在Java 8虚拟机上运行的Eclipse Luna和Tomee嵌入式EJB容器。

1 个答案:

答案 0 :(得分:0)

似乎你使用mojarra,它是CDI 1.0兼容版本还是1.1(只有TomEE 2兼容CDI 1.1 / 1.2)