Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-2248

singleton time bean starts with uninitialized EJBs

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • None
    • ejb3_1
    • None

    Description

      During the deployment of a (large) EAR the following problem occurs. In one of the JARs a singleton EJB is included which has a method annotated with @Schedule. The time out for this schedule is every minute. This singleton has references to other EJBS in the project. But at deployment the singleton is loaded before the referenced EJBs are added registered in JNDI. When the time out of the singleton occurs a NullPointerException is thrown because the container isn't able to inject the other EJBs.

      2011-05-12 13:21:01,201 ERROR [org.jboss.ejb3.timerservice.mk2.task.TimerTask] (pool-99-thread-3) Error during retyring timeout for timer: [id=2d8011ca-66e3-4746-a035-3fa2b5a68263 timedObjectId=jboss.j2ee:ear=ht-ear-1.8.0-SNAPSHOT.ear,jar=ht-system.jar,name=BatchExecutor,service=EJB3 auto-timer?:true persistent?:true timerService=org.jboss.ejb3.timerservice.mk2.TimerServiceImpl@1d261c7e initialExpiration=2011-05-10 00:00:00.0 intervalDuration(in milli sec)=0 nextExpiration=Tue May 10 16:03:00 CEST 2011 timerState=RETRY_TIMEOUT: javax.ejb.EJBException: java.lang.NullPointerException
          at org.jboss.ejb3.singleton.impl.container.SingletonEJBInstanceManagerImpl.create(SingletonEJBInstanceManagerImpl.java:137) [:1.0.0-alpha-28]
          at org.jboss.ejb3.singleton.impl.container.SingletonEJBInstanceManagerImpl.get(SingletonEJBInstanceManagerImpl.java:152) [:1.0.0-alpha-28]
          at org.jboss.ejb3.singleton.impl.container.SingletonContainer.invoke(SingletonContainer.java:201) [:1.0.0-alpha-28]
          at org.jboss.ejb3.singleton.aop.impl.AOPBasedSingletonContainer.callTimeout(AOPBasedSingletonContainer.java:886) [:1.0.0-alpha-28]
          at org.jboss.ejb3.timerservice.mk2.task.CalendarTimerTask.callTimeout(CalendarTimerTask.java:80) [:1.0.0-alpha-13]
          at org.jboss.ejb3.timerservice.mk2.task.TimerTask.run(TimerTask.java:127) [:1.0.0-alpha-13]
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [:1.6.0_24]
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [:1.6.0_24]
          at java.util.concurrent.FutureTask.run(FutureTask.java:138) [:1.6.0_24]
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98) [:1.6.0_24]
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206) [:1.6.0_24]
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]
          at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]
      Caused by: org.jboss.injection.manager.spi.InjectionException: javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: ConfigDAO not bound]]
          at org.jboss.injection.injector.EEInjector.inject(EEInjector.java:87) [:1.0.0-alpha-6]
          at org.jboss.injection.manager.core.DefaultInjectionContext.proceed(DefaultInjectionContext.java:58) [:1.0.0-alpha-6]
          at org.jboss.injection.manager.core.DefaultInjectionManager.inject(DefaultInjectionManager.java:58) [:1.0.0-alpha-6]
          at org.jboss.injection.manager.core.DefaultInjectionManager.inject(DefaultInjectionManager.java:64) [:1.0.0-alpha-6]
          at org.jboss.ejb3.injection.InjectionInvocation.invokeTarget(InjectionInvocation.java:140) [:1.7.17]
          at org.jboss.ejb3.injection.InjectionInvocation.invokeNext(InjectionInvocation.java:125) [:1.7.17]
          at org.jboss.ejb3.core.context.CurrentInvocationContextInterceptor.invoke(CurrentInvocationContextInterceptor.java:47) [:1.7.17]
          at org.jboss.ejb3.injection.InjectionInvocation.invokeNext(InjectionInvocation.java:116) [:1.7.17]
          at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67) [:1.0.1]
          at org.jboss.ejb3.injection.InjectionInvocation.invokeNext(InjectionInvocation.java:116) [:1.7.17]
          at org.jboss.ejb3.EJBContainer.injectBeanContext(EJBContainer.java:1363) [:1.7.17]
          at org.jboss.ejb3.singleton.aop.impl.AOPBasedSingletonContainer.postConstruct(AOPBasedSingletonContainer.java:759) [:1.0.0-alpha-28]
          at org.jboss.ejb3.singleton.impl.container.SingletonEJBInstanceManagerImpl.create(SingletonEJBInstanceManagerImpl.java:133) [:1.0.0-alpha-28]
          ... 13 more

      Attachments

        Activity

          People

            jaikiran Jaikiran Pai (Inactive)
            chriswesdorp Chris Wesdorp (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: