11 Replies Latest reply on Jan 19, 2010 2:31 AM by Nikolay Elenkov

    Error injecting TimerService

    Nikolay Elenkov Master

      I was about to try the new EJB 3.1 Timer features, but I am getting this error on JBoss 6.0 M1:


      java.lang.RuntimeException: Error resolving property asyncTest against base null
           org.jboss.weld.el.AbstractWeldELResolver.getValue(AbstractWeldELResolver.java:120)
           org.jboss.weld.integration.webtier.jsf.ForwardingELResolver.getValue(ForwardingELResolver.java:51)
           javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)
           com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
      ...
      caused by
      java.lang.RuntimeException: Error looking up java:/comp/env/weldtest.weldjsf.AsyncTest/timerService in JNDI
           org.jboss.weld.injection.spi.helpers.AbstractResourceServices.resolveResource(AbstractResourceServices.java:38)
           org.jboss.weld.util.Beans.injectEEFields(Beans.java:692)
           org.jboss.weld.bean.ManagedBean$1$1.proceed(ManagedBean.java:218)
           org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:51)
      ...
      



      The code is pretty standard:


      @Named
      @Stateless
      public class AsyncTest {
      
          @Resource
          private TimerService timerService;
      ...
      }
      



      Is this a bug in Weld or I am missing something?