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;的更多相关文章

  1. maven的坑: Exception in thread "pool-1-thread-1" java.lang.NoClassDefFoundError: org/eclipse/aether/spi/connector/Transfer$State

    搭建ReboletricSample的环境: 搭建完成,执行的时候报错: Exception in thread "main" java.lang.NoClassDefFoundE ...

  2. java.lang.NoClassDefFoundError: com/google/inject/Injector

    报错如下: 解决方案: <dependency> <groupId>com.google.inject</groupId> <artifactId>gu ...

  3. java.lang.NoClassDefFoundError: Ljavax/transaction/TransactionManager

    网上下载一个 jta.jar包 放到项目 的WebRoot 的lib文件夹下,解决.

  4. 报错:java.lang.NoClassDefFoundError: com/google/inject/Injector

    使用testng report,导入jar包:reportng.jar和velocity-dep-1.4.jar后,执行脚本,报错如下: 缺少依赖的jar包:guice-4.0.jar 导入依赖的ja ...

  5. 解决Could not open Hibernate Session for transaction; nested exception is java.lang.NoClassDefFoundError: org/hibernate/engine/transaction/spi/TransactionContext

    我使用的是5.2.8的hibernate的jar包,运行的时候却报错Could not open Hibernate Session for transaction; nested exception ...

  6. mybatis + log4j2 问题 java.lang.NoClassDefFoundError: org/apache/logging/log4j/spi/AbstractLoggerWrapper

    root cause java.lang.NoClassDefFoundError: org/apache/logging/log4j/spi/AbstractLoggerWrapper 网上资料比较 ...

  7. spring boot 启动报 java.lang.NoClassDefFoundError: ch/qos/logback/core/spi/LifeCycle 错误

    Failed to instantiate SLF4J LoggerFactory Reported exception: java.lang.NoClassDefFoundError: ch/qos ...

  8. maven命令行创建web项目报错:java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils

    早上一上班就想新建一个web项目玩玩,没想到一敲命令创建就失败了,真是出师不利.各种折腾无果,当然我也可以用eclipse直接创建的,就是不甘心被这破问题给耍了.刚刚才发现问题原因,这个结果我也是醉了 ...

  9. Caused by: java.lang.NoClassDefFoundError: freemarker/cache/TemplateLoader

    1.错误描写叙述 usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -he ...

随机推荐

  1. 重置outlook 2010

    1.进入 D:\program files\mirosoft office\ioffice14 2.outlook /importprf .\.prf 3.账号问题可以-->控制面板--> ...

  2. 解决windows10 启动蓝屏 ntfs file system

    启动 --> 疑难解答 -->高级工具 --> 命令行--> chkdsk /x /f c: cd c: ok ^_-

  3. eclipes设置默认注释作者

    打开Perfences首选项页,搜索Template,找到Java>> Code Style >> Code Template功能,在打开的树中,找到Comments.Type ...

  4. Hystrix的一个坑,queue中的run方法没有被执行?

    今天学的时候随手测了一下Hystrix的queue的异步执行,发现执行queue之后,还没有打印run方法中的内容,程序就结束了: import com.netflix.hystrix.Hystrix ...

  5. linux RAID10测试

    mdadm命令用于管理系统软件RAID硬盘阵列,格式为:"mdadm [模式] <RAID设备名称> [选项] [成员设备名称]". mdadm命令能够在Linux系统 ...

  6. Python 多进程教程

    Python2.6版本中新添了multiprocessing模块.它最初由Jesse Noller和Richard Oudkerk定义在PEP 371中.就像你能通过threading模块衍生线程一样 ...

  7. Python接通图灵机器人

    图灵机器人 图灵机器人特别low,问答水平并不高. import requests print("你好,我是图灵机器人") while 1: s = input() resp = ...

  8. 【LeetCode】93. Restore IP Addresses

    Restore IP Addresses Given a string containing only digits, restore it by returning all possible val ...

  9. Spring3 MVC请求参数获取的几种方法[转]

    Spring3 MVC请求参数获取的几种方法 Spring3 MVC请求参数获取的几种方法 一.      通过@PathVariabl获取路径中的参数 @RequestMapping(value=& ...

  10. TFS 切换登录用户的方法[转]

    来自:http://blog.csdn.net/tiangaojie123abc/article/details/12121929 方法一 用VS2010开发项目,一直困扰着我的是不知道怎么去切换TF ...