3 Replies Latest reply on Apr 12, 2010 4:59 PM by wu haixing

    Inject Logger in JBoss 6.0.x

    Alexander Bell Newbie

      Hi,


      I want to inject a logger in a SFSB:




      @Stateful
      @Local(MyManager.class)
      @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
      public class MyManagerImpl implements MyManager, Serializable {
           private @Inject org.slf4j.Logger logger;
      ...





      Unfortunately I get the following error on startup:



      10:26:33,205 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Start: name=vfsfile:/C:/projects/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_6.0_Server/deploy/JBOSS-ear.ear/_WeldBootstrapBean state=Create: org.jboss.weld.DeploymentException: Injection point has unstatisfied dependencies. Injection point: field org.j4fry.ejb.MyManagerImpl.logger; Qualifiers: [@javax.enterprise.inject.Default()]
           at org.jboss.weld.Validator.validateInjectionPoint(Validator.java:162)



      I use the latest JBoss AS 6.0.x Build.
      Do I have to include some Weld-loggeer jars?


      Alex