4 Replies Latest reply on Jun 1, 2011 10:43 AM by Hanspeter Gisler

    EJB singletons don't work? glassfish 3.1

    Brendan Healey Master
      Hi, I'm getting this stack dump after adding seam-catch & seam-solder jars
      to my project. I've got an EJB annotated @Singleton & @Startup what seems
      to be causing the problem, but if the seam jars are removed everything is ok
      again. I'm running glassfish 3.1 and have upgraded weld to 1.1.1. Can anyone
      suggest anything? I've got some big plans for Seam 3 in the stuff I'm working
      on so just need to get past the first hurdle.

      Thanks,
      Brendan.


      INFO: Seam Solder 3.0.0.Final (build id: 3.0.0.Final)
      INFO: Preventing class org.jboss.seam.solder.resourceLoader.ResourceProvider from being installed as bean due to @Veto annotation
      INFO: Preventing class org.jboss.seam.solder.core.VersionLoggerUtil from being installed as bean due to @Veto annotation
      SEVERE: Exception while invoking class org.glassfish.ejb.startup.EjbApplication start method
      javax.ejb.EJBException: javax.ejb.CreateException: Initialization failed for Singleton AppEjb
              at com.sun.ejb.containers.AbstractSingletonContainer$SingletonContextFactory.create(AbstractSingletonContainer.java:719)
              at com.sun.ejb.containers.AbstractSingletonContainer.instantiateSingletonInstance(AbstractSingletonContainer.java:449)
              at org.glassfish.ejb.startup.SingletonLifeCycleManager.initializeSingleton(SingletonLifeCycleManager.java:216)
              at org.glassfish.ejb.startup.SingletonLifeCycleManager.initializeSingleton(SingletonLifeCycleManager.java:177)
              at org.glassfish.ejb.startup.SingletonLifeCycleManager.doStartup(SingletonLifeCycleManager.java:155)
              at org.glassfish.ejb.startup.EjbApplication.start(EjbApplication.java:177)
              at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
              at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
              at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:286)
              at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
              at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
              at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:370)
              at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
              at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
              at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1067)
              at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
              at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1247)
              at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
              at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:465)
              at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:222)
              at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
              at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
              at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:234)
              at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
              at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
              at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
              at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
              at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
              at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
              at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
              at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
              at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
              at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
              at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
              at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
              at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
              at java.lang.Thread.run(Thread.java:662)
      Caused by: javax.ejb.CreateException: Initialization failed for Singleton AppEjb
              at com.sun.ejb.containers.AbstractSingletonContainer.createSingletonEJB(AbstractSingletonContainer.java:545)
              at com.sun.ejb.containers.AbstractSingletonContainer.access$100(AbstractSingletonContainer.java:79)
              at com.sun.ejb.containers.AbstractSingletonContainer$SingletonContextFactory.create(AbstractSingletonContainer.java:717)
              ... 36 more
      Caused by: java.lang.NullPointerException
              at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)
              at org.jboss.weld.manager.BeanManagerImpl.getBean(BeanManagerImpl.java:1209)
              at org.jboss.weld.manager.BeanManagerImpl.getBean(BeanManagerImpl.java:144)
              at org.glassfish.weld.services.JCDIServiceImpl._createJCDIInjectionContext(JCDIServiceImpl.java:144)
              at org.glassfish.weld.services.JCDIServiceImpl.createJCDIInjectionContext(JCDIServiceImpl.java:121)
              at com.sun.ejb.containers.BaseContainer.createEjbInstanceAndContext(BaseContainer.java:1636)
              at com.sun.ejb.containers.AbstractSingletonContainer.createSingletonEJB(AbstractSingletonContainer.java:487)
              ... 38 more

      SEVERE: Exception while loading the app
      INFO: No timers to be deleted for id: 85600740923998208
      SEVERE: Exception while loading the app : javax.ejb.CreateException: Initialization failed for Singleton AppEjb
      javax.ejb.CreateException: Initialization failed for Singleton AppEjb
              at com.sun.ejb.containers.AbstractSingletonContainer.createSingletonEJB(AbstractSingletonContainer.java:545)
              at com.sun.ejb.containers.AbstractSingletonContainer.access$100(AbstractSingletonContainer.java:79)
              at com.sun.ejb.containers.AbstractSingletonContainer$SingletonContextFactory.create(AbstractSingletonContainer.java:717)
              at com.sun.ejb.containers.AbstractSingletonContainer.instantiateSingletonInstance(AbstractSingletonContainer.java:449)
              at org.glassfish.ejb.startup.SingletonLifeCycleManager.initializeSingleton(SingletonLifeCycleManager.java:216)
              at org.glassfish.ejb.startup.SingletonLifeCycleManager.initializeSingleton(SingletonLifeCycleManager.java:177)
              at org.glassfish.ejb.startup.SingletonLifeCycleManager.doStartup(SingletonLifeCycleManager.java:155)
              at org.glassfish.ejb.startup.EjbApplication.start(EjbApplication.java:177)
              at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
              at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
              at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:286)
              at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
              at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
              at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:370)
              at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
              at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
              at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1067)
              at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
              at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1247)
              at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
              at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:465)
              at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:222)
              at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
              at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
              at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:234)
              at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
              at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
              at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
              at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
              at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
              at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
              at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
              at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
              at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
              at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
              at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
              at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
              at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
              at java.lang.Thread.run(Thread.java:662)
      Caused by: java.lang.NullPointerException
              at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)
              at org.jboss.weld.manager.BeanManagerImpl.getBean(BeanManagerImpl.java:1209)
              at org.jboss.weld.manager.BeanManagerImpl.getBean(BeanManagerImpl.java:144)
              at org.glassfish.weld.services.JCDIServiceImpl._createJCDIInjectionContext(JCDIServiceImpl.java:144)
              at org.glassfish.weld.services.JCDIServiceImpl.createJCDIInjectionContext(JCDIServiceImpl.java:121)
              at com.sun.ejb.containers.BaseContainer.createEjbInstanceAndContext(BaseContainer.java:1636)
              at com.sun.ejb.containers.AbstractSingletonContainer.createSingletonEJB(AbstractSingletonContainer.java:487)
              ... 38 EJB