码迷,mamicode.com
首页 > 编程语言 > 详细

java.lang.NoClassDefFoundError: Ljavax/enterprise/inject/spi/BeanManager;

时间:2017-11-07 22:02:15      阅读:195      评论:0      收藏:0      [点我收藏+]

标签:color   contain   any   manage   sam   inject   depend   with   str   

java.lang.NoClassDefFoundError: Ljavax/enterprise/inject/spi/BeanManager;

删除Struts2-cdi-plug 的插件的jar包,以及struts2插件的jar包。

 

 

question:

When I build this test application and deploy to Tomcat 7, page loading attempt gives
java.lang.ClassNotFoundException: javax.enterprise.context.spi.Contextual
I tried adding dependency for cdi-api. ClassNotFoundException goes away but then I get javax.naming.NameNotFoundException: Name [BeanManager] is not bound in this Context. Unable to find [BeanManager].
I have the same problem with my own Vaadin 7 application using cdiutils. Any help would be appreciated.

 

ask:

Tomcat doesn‘t provide a CDI container per se. Surely you can include one manually but it‘s easier just to deploy to a Java EE compatible web app server such as TomEE: http://tomee.apache.org/apache-tomee.html

 

java.lang.NoClassDefFoundError: Ljavax/enterprise/inject/spi/BeanManager;

标签:color   contain   any   manage   sam   inject   depend   with   str   

原文地址:http://www.cnblogs.com/Hackerman/p/7801123.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!