zoukankan      html  css  js  c++  java
  • java.lang.NoClassDefFoundError: Ljavax/enterprise/inject/spi/BeanManager;

    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

  • 相关阅读:
    socket:套接字
    hashlib 加密
    面向对象总结
    类的内置方法
    反射
    类中的三个装饰器方法
    text
    模块
    练习1
    内置函数
  • 原文地址:https://www.cnblogs.com/Hackerman/p/7801123.html
Copyright © 2011-2022 走看看