0 Replies Latest reply on May 27, 2016 12:20 PM by rikgig

    JBoss AS 7 : problem using the CDI class

    rikgig

      Hi all

       

      I have a small J2EE application that uses Jaxb, jax-rs, jax-ws and CDI.

       

      When deployed on Glassfish or latest WebLogic, everything works ok.

      I've been fighting with a JBoss AS 7 deployment for 2 days. Now the REST ans WS system works and so does the dependency injection. But for one specific service that uses a factory to create sub-services, my call to CDI.current().select(MySubService.class).get(); fails with this error:

       

      org.jboss.resteasy.spi.UnhandledException: java.lang.NoClassDefFoundError: javax/enterprise/inject/spi/CDI

       

      Then I tried something else I read from the JBoss forum:

          BeanManager manager = CDI.current().getBeanManager();

       

      Now this line generates the same error.

       

      I'm using a JBoss AS 7.1.1, and I've update Resteasy on my JBoss installation to the latest version (3.0.17).

       

      My jboss-deployment-structure.xml looks like:

      <?xml version="1.0"?>

       

      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">

          <deployment>

              <dependencies>

                  <module name="org.jboss.resteasy.resteasy-yaml-provider" services="import"/>

              </dependencies>

          </deployment>

      </jboss-deployment-structure>

       

      An empty web.xml and beans.xml are also supplied.

      Anyway idea anyone? I'm out of options.

       

      Thank you!

      Eric.