1 2 Previous Next 26 Replies Latest reply on Jan 25, 2013 9:57 AM by Christian Groove

    CDI/Weld(1.1.10) does not work inside an EJB Container JBoss6.1.0 & JBoss7.1. [WELD-001414]

    Christian Groove Newbie

      Dear Sirs,

       

      we a running into CDI problems, when deploying our JEE6 application.

      It is a batch-processing application, using queue's and by this MDB's

      und stateless session beans.

      We use a multi-project maven project to build and test our application.

       

      In order to test our application logic we decided to make use of CDI.

      By this, we developed a junit test client, that is designed to run

      defined test castes outside the EJB container, simply by calling

      the calculation engine, that can easily injected into your application

      context.

      The junit-mass-test runner is running thanks to Apache's delta spike and

      weld.

       

      When we wanted to deploy our server, we get the follwing error message:

       

      (line-109) 2013-01-22 09:13:39,340 INFO  [org.jboss.weld.Version] (HDScanner) WELD-000900 1.1.2 (Final)

      ....

      2013-01-22 09:15:16,706 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (HDScanner) Error installing to Start: name=vfs:///home/cgroove/Projects/asFreelancer/30_Scout24/projekte/02_AbrechnungNeu/devWorkspaceMv/eclipseDir/.metadata/.plugins/org.jboss.ide.eclipse.as.core/jboss-6.1.0.Final/deploy/as24BillingEAR.ear_WeldBootstrapBean state=Create: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [DebitStateServiceIf] with qualifiers [@Default] at injection point [[field] @Inject private de.as24.service.billing.CalculateBillingBean.debitStateSvc]

                at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:270) [:6.1.0.Final]

                at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:106) [:6.1.0.Final]

                at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:129) [:6.1.0.Final]

                at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:351) [:6.1.0.Final]

                at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:336) [:6.1.0.Final]

                at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:404) [:6.1.0.Final]

       

      The problem occurs in a stateless session bean, that uses @Inject to initialize a interface

      atrribute. The implementation resides in the ejb.jar. The Interface is located in a

      servie-jar.

       

      A similar problem was discussed in:  http://stackoverflow.com/questions/7610003/injecting-a-bean-from-a-different-jar-in-weld

      We considered also requiredments in the application.xml. The only thing wet did not followed the Qualifer approach, because

      there will be only one matching implementation class for a request on a interface.

       

      The strange thing is, when i remove the Inject and assign a null pointer, another inject will fail.

      It seems to me, that WELD seems not been initialized or looks like to be unaccessable for my

      CDI Injects.

       

      Maybe i do have to do some initialisation in a @PostConstruct methods in my sessionbean ?

      Any ideas ?

       

      Thank you for your support

      Christian

        1 2 Previous Next