用CDI創建一個示例項目,與站點CDI Sample一樣,但試圖在Jboss 6中部署它,得到低於error.Is是否需要包含任何其他lib文件來解決此問題問題?Jboss 6 - 部署CDI的bean失敗
Lib jars:
javaee-api-7.0.jar
javax.inject-1.jar
Deployment Error: 2015-02-12 12:25:21,852 INFO [org.jboss.ejb3.deployers.JBossASKernel] (WorkerThread#0[192.168.10.119:61928]) and supplies: 2015-02-12 12:25:21,852 INFO [org.jboss.ejb3.deployers.JBossASKernel] (WorkerThread#0[192.168.10.119:61928]) jndi:HelloObserver 2015-02-12 12:25:21,852 INFO [org.jboss.ejb3.deployers.JBossASKernel] (WorkerThread#0[192.168.10.119:61928]) Added bean(jboss.j2ee:ear=J2eeObserver.ear,jar=J2eeObserver-ejb.jar,name=HelloObserver,service=EJB3) to KernelDeployment of: J2eeObserver-ejb.jar 2015-02-12 12:25:22,048 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (WorkerThread#0[192.168.10.119:61928]) Error installing to Create: name=vfs:///E:/jboss-6.1.0.Final/server/default/deploy/J2eeObserver.ear_WeldBootstrapBean state=Configured: java.lang.NullPointerException at org.jboss.weld.util.ApiAbstraction.annotationTypeForName(ApiAbstraction.java:86) [:6.1.0.Final] at org.jboss.weld.ejb.EJBApiAbstraction.<init>(EJBApiAbstraction.java:36) [:6.1.0.Final] at org.jboss.weld.bootstrap.BeanDeployment.<init>(BeanDeployment.java:100) [:6.1.0.Final] at org.jboss.weld.bootstrap.WeldBootstrap$DeploymentVisitor.visit(WeldBootstrap.java:185) [:6.1.0.Final] at org.jboss.weld.bootstrap.WeldBootstrap$DeploymentVisitor.visit(WeldBootstrap.java:197) [:6.1.0.Final] ......
2015-02-12 12:25:22,074 WARN [org.jboss.profileservice.management.upload.remoting.DeployHandler] (WorkerThread#0[192.168.10.119:61928]) Failed to complete command: [start] for deployment: names=[J2eeObserver.ear]: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
DEPLOYMENTS MISSING DEPENDENCIES: Deployment "jboss-injector:topLevelUnit=J2eeObserver.ear,unit=J2eeObserver-ejb.jar,bean=HelloObserver,interceptor=org.jboss.weld.integration.ejb.SessionBeanInterceptor" is missing the following dependencies: Dependency "<UNKNOWN jboss-injector:topLevelUnit=J2eeObserver.ear,unit=J2eeObserver-ejb.jar,bean=HelloObserver,interceptor=org.jboss.weld.integration.ejb.SessionBeanInterceptor>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'jboss-switchboard:appName=J2eeObserver,module=J2eeObserver-ejb,name=HelloObserver' **")
開始時的Jboss 6時使用JBoss AS 6.即使JavaEE的-API-6.0.jar嘗試,但仍然得到同樣的異常。應用程序正在部署,如果我從耳朵中刪除了bean.xml文件,但該應用程序不工作。注意:同樣的耳朵在野蠻8 – Jeevanantham 2015-02-13 11:15:25
正常工作正如我所說。不要使用AS 6.它因爲AS 7而被放棄,因此完全是越野車,沒有社區。所以試試AS 7.1.1或EAP 6.3 – 2015-02-13 12:04:58