11 Replies Latest reply on Jan 28, 2011 9:23 AM by vide

    Singleton bean fails to call @PreDestroy method

    vide Newbie

      Hello,

       

         I have a Singleton bean, which has one method, marked with  @PreDestroy annotation, but JBossAS 6.0.0.Final fails to call it. This Singleton bean is annotated with

        @TransactionAttribute(TransactionAttributeType.MANDATORY)

       

      but @PreDestroy method has

        @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)

       

      Problem seems to be with MANDATORY annotation, because if I change it to another type, @PreDestroy method is called successfully.

       

      [org.jboss.kernel.plugins.dependency.CreateDestroyLifecycleAction] Error during destroy for jboss.j2ee:jar=BEE.war,name=IdGeneratorBean,service=EJB3: java.lang.RuntimeException: Could not preDestroy the singleton bean instance

                at org.jboss.ejb3.singleton.impl.container.SingletonEJBInstanceManagerImpl.destroy(SingletonEJBInstanceManagerImpl.java:177) [:1.0.0-alpha-28]

                at org.jboss.ejb3.singleton.impl.container.SingletonContainer.destroy(SingletonContainer.java:152) [:1.0.0-alpha-28]

                at org.jboss.ejb3.singleton.aop.impl.AOPBasedSingletonContainer.destroy(AOPBasedSingletonContainer.java:364) [:1.0.0-alpha-28]

                at sun.reflect.GeneratedMethodAccessor314.invoke(Unknown Source) [:1.6.0_22]

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_22]

                at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_22]

                at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:60) [jboss-reflect.jar:2.2.0.GA]

                at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:168) [jboss-reflect.jar:2.2.0.GA]

                at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66) [jboss-reflect.jar:2.2.0.GA]

                at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:257) [jboss-kernel.jar:2.2.0.GA]

                at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47) [jboss-kernel.jar:2.2.0.GA]

                at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:125) [jboss-kernel.jar:2.2.0.GA]

                at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:72) [jboss-kernel.jar:2.2.0.GA]

                at org.jboss.kernel.plugins.dependency.LifecycleAction.uninstallActionInternal(LifecycleAction.java:286) [jboss-kernel.jar:2.2.0.GA]

                at org.jboss.kernel.plugins.dependency.InstallsAwareAction.uninstallAction(InstallsAwareAction.java:175) [jboss-kernel.jar:2.2.0.GA]

                at org.jboss.kernel.plugins.dependency.InstallsAwareAction.uninstallAction(InstallsAwareAction.java:42) [jboss-kernel.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleUninstallAction(SimpleControllerContextAction.java:79) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.action.AccessControllerContextAction.uninstall(AccessControllerContextAction.java:131) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractControllerContextActions.uninstall(AbstractControllerContextActions.java:58) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:385) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:2078) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1624) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1472) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1537) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1472) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1537) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1472) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1537) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1472) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1537) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1472) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:756) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:669) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.undeploy(BeanMetaDataDeployer.java:230) [:2.2.0.GA]

                at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.undeploy(BeanMetaDataDeployer.java:58) [:2.2.0.GA]

                at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalUndeploy(AbstractSimpleRealDeployer.java:69) [:2.2.0.GA]

                at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.undeploy(AbstractRealDeployer.java:117) [:2.2.0.GA]

                at org.jboss.deployers.plugins.deployers.DeployerWrapper.undeploy(DeployerWrapper.java:204) [:2.2.0.GA]

                at org.jboss.deployers.plugins.deployers.DeployersImpl.doUndeploy(DeployersImpl.java:1862) [:2.2.0.GA]

                at org.jboss.deployers.plugins.deployers.DeployersImpl.doUninstallParentLast(DeployersImpl.java:1769) [:2.2.0.GA]

                at org.jboss.deployers.plugins.deployers.DeployersImpl.doUninstallParentLast(DeployersImpl.java:1762) [:2.2.0.GA]

                at org.jboss.deployers.plugins.deployers.DeployersImpl.uninstall(DeployersImpl.java:1724) [:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:385) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:2078) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1624) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:948) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983) [:2.2.0.GA]

                at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1968) [:2.2.0.GA]

                at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1001) [:2.2.0.GA]

                at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:656) [:2.2.0.GA]

                at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106) [:6.0.0.Final]

                at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:143) [:0.2.2]

                at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.deploy(HDScanner.java:240) [:0.2.2]

                at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.complete(HDScanner.java:192) [:0.2.2]

                at org.jboss.profileservice.management.TwoPCActionWrapper.doComplete(TwoPCActionWrapper.java:57) [:0.2.2]

                at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.complete(AbstractTwoPhaseModificationAction.java:74) [:0.2.2]

                at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.prepare(AbstractTwoPhaseModificationAction.java:95) [:0.2.2]

                at org.jboss.profileservice.management.ModificationSession.prepare(ModificationSession.java:87) [:0.2.2]

                at org.jboss.profileservice.management.AbstractActionController.internalPerfom(AbstractActionController.java:234) [:0.2.2]

                at org.jboss.profileservice.management.AbstractActionController.performWrite(AbstractActionController.java:213) [:0.2.2]

                at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:150) [:0.2.2]

                at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:135) [:0.2.2]

                at org.jboss.profileservice.deployment.hotdeploy.HDScanner.scan(HDScanner.java:146) [:0.2.2]

                at org.jboss.profileservice.deployment.hotdeploy.HDScanner.run(HDScanner.java:90) [:0.2.2]

                at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [:1.6.0_22]

                at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) [:1.6.0_22]

                at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) [:1.6.0_22]

                at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) [:1.6.0_22]

                at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180) [:1.6.0_22]

                at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204) [:1.6.0_22]

                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_22]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_22]

                at java.lang.Thread.run(Thread.java:680) [:1.6.0_22]

      Caused by: java.lang.RuntimeException: java.lang.NullPointerException

                at org.jboss.ejb3.singleton.aop.impl.AOPBasedSingletonContainer.invokeCallback(AOPBasedSingletonContainer.java:1063) [:1.0.0-alpha-28]

                at org.jboss.ejb3.EJBContainer.invokePreDestroy(EJBContainer.java:1413) [:1.7.17]

                at org.jboss.ejb3.singleton.aop.impl.AOPBasedSingletonContainer.preDestroy(AOPBasedSingletonContainer.java:786) [:1.0.0-alpha-28]

                at org.jboss.ejb3.singleton.impl.container.SingletonEJBInstanceManagerImpl.destroy(SingletonEJBInstanceManagerImpl.java:173) [:1.0.0-alpha-28]

                ... 73 more

      Caused by: java.lang.NullPointerException

                at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.mandatory(CMTTxInterceptor.java:285) [:0.0.1]

                at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invoke(CMTTxInterceptor.java:203) [:0.0.1]

                at org.jboss.ejb3.tx2.aop.CMTTxInterceptorWrapper.invoke(CMTTxInterceptorWrapper.java:52) [:0.0.1]

                at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80) [jboss-aop.jar:2.2.1.GA]

                at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76) [:1.0.0.GA]

                at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80) [jboss-aop.jar:2.2.1.GA]

                at org.jboss.ejb3.core.context.CurrentInvocationContextInterceptor.invoke(CurrentInvocationContextInterceptor.java:47) [:1.7.17]

                at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80) [jboss-aop.jar:2.2.1.GA]

                at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:90) [:1.1.3]

                at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_399198826.invoke(InvocationContextInterceptor_z_setup_399198826.java) [:]

                at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80) [jboss-aop.jar:2.2.1.GA]

                at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67) [:1.0.1]

                at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80) [jboss-aop.jar:2.2.1.GA]

                at org.jboss.ejb3.singleton.aop.impl.AOPBasedSingletonContainer.invokeCallback(AOPBasedSingletonContainer.java:1059) [:1.0.0-alpha-28]

                ... 76 more

       

       

      Vidas

        • 1. Singleton bean fails to call @PreDestroy method
          jaikiran pai Master

          The spec allows only the following transaction attributes for the lifecycle methods of a singleton bean:

          EJB3.1 spec, section 4.8.3:

           

          A PostConstruct or PreDestroy method of a Singleton with container-managed transactions has transaction attribute REQUIRED, REQUIRES_NEW, or NOT_SUPPORTED (Required , RequiresNew, or NotSupported if the deployment descriptor is used to specify the transaction attribute).

           

          Having said that you shouldn't have seen a NullPointerException while using the MANDATORY attribute. Please create a JIRA here https://jira.jboss.org/browse/EJBTHREE and if possible attach a sample application which reproduces this issue.

          • 3. Singleton bean fails to call @PreDestroy method
            vide Newbie

            There is another related case:

             

              What if beans @PreDestroy method in its body calls another bean, which is allready stopped by container?

             

            In my case it throws:

             

            ...

            11:26:05,502 INFO  [org.jboss.ejb3.session.SessionSpecContainer] Stopping jboss.j2ee:jar=BEE.war,name=DataServiceBean,service=EJB3

            11:26:05,503 INFO  [org.jboss.ejb3.EJBContainer] STOPPED EJB: com.butent.bee.server.data.DataServiceBean ejbName: DataServiceBean

            11:26:05,506 INFO  [org.jboss.ejb3.session.SessionSpecContainer] Stopping jboss.j2ee:jar=BEE.war,name=IdGeneratorBean,service=EJB3

            11:26:05,507 INFO  [org.jboss.ejb3.EJBContainer] STOPPED EJB: com.butent.bee.server.data.IdGeneratorBean ejbName: IdGeneratorBean

            11:26:05,559 ERROR [org.jboss.ejb3.tx2.impl.CMTTxInterceptor] javax.ejb.EJBTransactionRolledbackException: javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: DataSourceBean!no-interface not bound]]

            11:26:05,560 WARN  [org.jboss.kernel.plugins.dependency.CreateDestroyLifecycleAction] Error during destroy for jboss.j2ee:jar=BEE.war,name=IdGeneratorBean,service=EJB3: java.lang.RuntimeException: Could not preDestroy the singleton bean instance

            ...

            • 4. Singleton bean fails to call @PreDestroy method
              jaikiran pai Master

              Are you injecting the other bean into this singleton bean? Can you please post the relevant code and the entire exception stacktrace?

              • 5. Re: Singleton bean fails to call @PreDestroy method
                vide Newbie

                I am injecting another stateless bean into this singleton bean, which in turn injects singleton bean "DataSourceBean", which is stopped too early

                 

                2011-01-28 11:26:05,502 INFO  [org.jboss.ejb3.session.SessionSpecContainer] (HDScanner) Stopping jboss.j2ee:jar=BEE.war,name=DataServiceBean,service=EJB3

                2011-01-28 11:26:05,503 INFO  [org.jboss.ejb3.EJBContainer] (HDScanner) STOPPED EJB: com.butent.bee.server.data.DataServiceBean ejbName: DataServiceBean

                2011-01-28 11:26:05,506 INFO  [org.jboss.ejb3.session.SessionSpecContainer] (HDScanner) Stopping jboss.j2ee:jar=BEE.war,name=IdGeneratorBean,service=EJB3

                2011-01-28 11:26:05,507 INFO  [org.jboss.ejb3.EJBContainer] (HDScanner) STOPPED EJB: com.butent.bee.server.data.IdGeneratorBean ejbName: IdGeneratorBean

                2011-01-28 11:26:05,559 ERROR [org.jboss.ejb3.tx2.impl.CMTTxInterceptor] (HDScanner) javax.ejb.EJBTransactionRolledbackException: javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: DataSourceBean!no-interface not bound]]

                2011-01-28 11:26:05,560 WARN  [org.jboss.kernel.plugins.dependency.CreateDestroyLifecycleAction] (HDScanner) Error during destroy for jboss.j2ee:jar=BEE.war,name=IdGeneratorBean,service=EJB3: java.lang.RuntimeException: Could not preDestroy the singleton bean instance

                          at org.jboss.ejb3.singleton.impl.container.SingletonEJBInstanceManagerImpl.destroy(SingletonEJBInstanceManagerImpl.java:177) [:1.0.0-alpha-28]

                          at org.jboss.ejb3.singleton.impl.container.SingletonContainer.destroy(SingletonContainer.java:152) [:1.0.0-alpha-28]

                          at org.jboss.ejb3.singleton.aop.impl.AOPBasedSingletonContainer.destroy(AOPBasedSingletonContainer.java:364) [:1.0.0-alpha-28]

                          at sun.reflect.GeneratedMethodAccessor844.invoke(Unknown Source) [:1.6.0_22]

                          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_22]

                          at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_22]

                          at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:60) [jboss-reflect.jar:2.2.0.GA]

                          at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:168) [jboss-reflect.jar:2.2.0.GA]

                          at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66) [jboss-reflect.jar:2.2.0.GA]

                          at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:257) [jboss-kernel.jar:2.2.0.GA]

                          at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47) [jboss-kernel.jar:2.2.0.GA]

                          at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:125) [jboss-kernel.jar:2.2.0.GA]

                          at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:72) [jboss-kernel.jar:2.2.0.GA]

                          at org.jboss.kernel.plugins.dependency.LifecycleAction.uninstallActionInternal(LifecycleAction.java:286) [jboss-kernel.jar:2.2.0.GA]

                          at org.jboss.kernel.plugins.dependency.InstallsAwareAction.uninstallAction(InstallsAwareAction.java:175) [jboss-kernel.jar:2.2.0.GA]

                          at org.jboss.kernel.plugins.dependency.InstallsAwareAction.uninstallAction(InstallsAwareAction.java:42) [jboss-kernel.jar:2.2.0.GA]

                          at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleUninstallAction(SimpleControllerContextAction.java:79) [jboss-dependency.jar:2.2.0.GA]

                          at org.jboss.dependency.plugins.action.AccessControllerContextAction.uninstall(AccessControllerContextAction.java:131) [jboss-dependency.jar:2.2.0.GA]

                          at org.jboss.dependency.plugins.AbstractControllerContextActions.uninstall(AbstractControllerContextActions.java:58) [jboss-dependency.jar:2.2.0.GA]

                          at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:385) [jboss-dependency.jar:2.2.0.GA]

                          at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:2078) [jboss-dependency.jar:2.2.0.GA]

                          at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1624) [jboss-dependency.jar:2.2.0.GA]

                          at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1472) [jboss-dependency.jar:2.2.0.GA]

                          at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1537) [jboss-dependency.jar:2.2.0.GA]

                          at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1472) [jboss-dependency.jar:2.2.0.GA]

                          at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1537) [jboss-dependency.jar:2.2.0.GA]

                          at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1472) [jboss-dependency.jar:2.2.0.GA]

                          at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1537) [jboss-dependency.jar:2.2.0.GA]

                          at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1472) [jboss-dependency.jar:2.2.0.GA]

                          at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:756) [jboss-dependency.jar:2.2.0.GA]

                          at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:669) [jboss-dependency.jar:2.2.0.GA]

                          at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.undeploy(BeanMetaDataDeployer.java:230) [:2.2.0.GA]

                          at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.undeploy(BeanMetaDataDeployer.java:58) [:2.2.0.GA]

                          at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalUndeploy(AbstractSimpleRealDeployer.java:69) [:2.2.0.GA]

                          at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.undeploy(AbstractRealDeployer.java:117) [:2.2.0.GA]

                          at org.jboss.deployers.plugins.deployers.DeployerWrapper.undeploy(DeployerWrapper.java:204) [:2.2.0.GA]

                          at org.jboss.deployers.plugins.deployers.DeployersImpl.doUndeploy(DeployersImpl.java:1862) [:2.2.0.GA]

                          at org.jboss.deployers.plugins.deployers.DeployersImpl.doUninstallParentLast(DeployersImpl.java:1769) [:2.2.0.GA]

                          at org.jboss.deployers.plugins.deployers.DeployersImpl.doUninstallParentLast(DeployersImpl.java:1762) [:2.2.0.GA]

                          at org.jboss.deployers.plugins.deployers.DeployersImpl.uninstall(DeployersImpl.java:1724) [:2.2.0.GA]

                          at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:385) [jboss-dependency.jar:2.2.0.GA]

                          at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:2078) [jboss-dependency.jar:2.2.0.GA]

                          at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1624) [jboss-dependency.jar:2.2.0.GA]

                          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:948) [jboss-dependency.jar:2.2.0.GA]

                          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.GA]

                          at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983) [:2.2.0.GA]

                          at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1968) [:2.2.0.GA]

                          at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1001) [:2.2.0.GA]

                          at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:656) [:2.2.0.GA]

                          at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106) [:6.0.0.Final]

                          at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:143) [:0.2.2]

                          at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.deploy(HDScanner.java:240) [:0.2.2]

                          at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.complete(HDScanner.java:192) [:0.2.2]

                          at org.jboss.profileservice.management.TwoPCActionWrapper.doComplete(TwoPCActionWrapper.java:57) [:0.2.2]

                          at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.complete(AbstractTwoPhaseModificationAction.java:74) [:0.2.2]

                          at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.prepare(AbstractTwoPhaseModificationAction.java:95) [:0.2.2]

                          at org.jboss.profileservice.management.ModificationSession.prepare(ModificationSession.java:87) [:0.2.2]

                          at org.jboss.profileservice.management.AbstractActionController.internalPerfom(AbstractActionController.java:234) [:0.2.2]

                          at org.jboss.profileservice.management.AbstractActionController.performWrite(AbstractActionController.java:213) [:0.2.2]

                          at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:150) [:0.2.2]

                          at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:135) [:0.2.2]

                          at org.jboss.profileservice.deployment.hotdeploy.HDScanner.scan(HDScanner.java:146) [:0.2.2]

                          at org.jboss.profileservice.deployment.hotdeploy.HDScanner.run(HDScanner.java:90) [:0.2.2]

                          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [:1.6.0_22]

                          at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) [:1.6.0_22]

                          at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) [:1.6.0_22]

                          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) [:1.6.0_22]

                          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180) [:1.6.0_22]

                          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204) [:1.6.0_22]

                          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_22]

                          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_22]

                          at java.lang.Thread.run(Thread.java:680) [:1.6.0_22]

                Caused by: java.lang.RuntimeException: javax.ejb.EJBTransactionRolledbackException: javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: DataSourceBean!no-interface not bound]]

                          at org.jboss.ejb3.singleton.aop.impl.AOPBasedSingletonContainer.invokeCallback(AOPBasedSingletonContainer.java:1063) [:1.0.0-alpha-28]

                          at org.jboss.ejb3.EJBContainer.invokePreDestroy(EJBContainer.java:1413) [:1.7.17]

                          at org.jboss.ejb3.singleton.aop.impl.AOPBasedSingletonContainer.preDestroy(AOPBasedSingletonContainer.java:786) [:1.0.0-alpha-28]

                          at org.jboss.ejb3.singleton.impl.container.SingletonEJBInstanceManagerImpl.destroy(SingletonEJBInstanceManagerImpl.java:173) [:1.0.0-alpha-28]

                          ... 71 more

                Caused by: javax.ejb.EJBTransactionRolledbackException: javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: DataSourceBean!no-interface not bound]]

                          at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.handleInCallerTx(CMTTxInterceptor.java:148) [:0.0.1]

                          at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:227) [:0.0.1]

                          at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.mandatory(CMTTxInterceptor.java:287) [:0.0.1]

                          at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invoke(CMTTxInterceptor.java:203) [:0.0.1]

                          at org.jboss.ejb3.tx2.aop.CMTTxInterceptorWrapper.invoke(CMTTxInterceptorWrapper.java:52) [:0.0.1]

                          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]

                          at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76) [:1.0.0.GA]

                          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]

                          at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42) [:1.0.3]

                          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]

                          at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:182) [:1.7.17]

                          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]

                          at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41) [:1.7.17]

                          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]

                          at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67) [:1.7.17]

                          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]

                          at org.jboss.ejb3.core.context.CurrentInvocationContextInterceptor.invoke(CurrentInvocationContextInterceptor.java:47) [:1.7.17]

                          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]

                          at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67) [:1.0.1]

                          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]

                          at org.jboss.ejb3.interceptor.EJB3TCCLInterceptor.invoke(EJB3TCCLInterceptor.java:86) [:1.7.17]

                          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]

                          at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:323) [:1.7.17]

                          at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:156) [:1.7.17]

                          at org.jboss.ejb3.nointerface.impl.invocationhandler.NoInterfaceViewInvocationHandler.invokeEndpoint(NoInterfaceViewInvocationHandler.java:143) [:6.0.0.Final]

                          at org.jboss.ejb3.nointerface.impl.invocationhandler.NoInterfaceViewInvocationHandler.access$000(NoInterfaceViewInvocationHandler.java:54) [:6.0.0.Final]

                          at org.jboss.ejb3.nointerface.impl.invocationhandler.NoInterfaceViewInvocationHandler$1.invoke(NoInterfaceViewInvocationHandler.java:103) [:6.0.0.Final]

                          at org.jboss.ejb3.sis.reflect.InterceptorInvocationHandler$1.proceed(InterceptorInvocationHandler.java:84) [:1.0.0-alpha-1]

                          at org.jboss.ejb3.sis.InterceptorAssembly$1.proceed(InterceptorAssembly.java:82) [:1.0.0-alpha-1]

                          at org.jboss.ejb3.nointerface.impl.async.AsyncClientInterceptor.invoke(AsyncClientInterceptor.java:119) [:6.0.0.Final]

                          at org.jboss.ejb3.sis.InterceptorAssembly$1.proceed(InterceptorAssembly.java:74) [:1.0.0-alpha-1]

                          at org.jboss.ejb3.nointerface.impl.invocationhandler.ObjectMethodsInterceptor.invoke(ObjectMethodsInterceptor.java:78) [:6.0.0.Final]

                          at org.jboss.ejb3.sis.InterceptorAssembly$1.proceed(InterceptorAssembly.java:74) [:1.0.0-alpha-1]

                          at org.jboss.ejb3.sis.InterceptorAssembly.invoke(InterceptorAssembly.java:90) [:1.0.0-alpha-1]

                          at org.jboss.ejb3.sis.reflect.InterceptorInvocationHandler.invoke(InterceptorInvocationHandler.java:110) [:1.0.0-alpha-1]

                          at org.jboss.ejb3.nointerface.impl.invocationhandler.NoInterfaceViewInvocationHandler.invoke(NoInterfaceViewInvocationHandler.java:115) [:6.0.0.Final]

                          at org.jboss.ejb3.proxy.javassist.JavassistInvocationHandlerAdapter.invoke(JavassistInvocationHandlerAdapter.java:71) [:1.0.0-alpha-1]

                          at com.butent.bee.server.data.QueryServiceBean_$$_javassist_88.isDbTable(QueryServiceBean_$$_javassist_88.java)

                          at com.butent.bee.server.data.IdGeneratorBean.destroy(IdGeneratorBean.java:47)

                          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_22]

                          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_22]

                          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_22]

                          at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_22]

                          at org.jboss.ejb3.interceptors.aop.LifecycleCallbackBeanMethodInterceptor.invoke(LifecycleCallbackBeanMethodInterceptor.java:69) [:1.1.3]

                          at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80) [jboss-aop.jar:2.2.1.GA]

                          at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:56) [:1.7.17]

                          at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80) [jboss-aop.jar:2.2.1.GA]

                          at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42) [:1.0.3]

                          at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80) [jboss-aop.jar:2.2.1.GA]

                          at org.jboss.ejb3.singleton.aop.impl.ConstructionInvocationContextAdapter.proceed(ConstructionInvocationContextAdapter.java:106) [:1.0.0-alpha-28]

                          at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:247) [:0.0.1]

                          at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.requiresNew(CMTTxInterceptor.java:392) [:0.0.1]

                          at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invoke(CMTTxInterceptor.java:211) [:0.0.1]

                          at org.jboss.ejb3.tx2.aop.CMTTxInterceptorWrapper.invoke(CMTTxInterceptorWrapper.java:52) [:0.0.1]

                          at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80) [jboss-aop.jar:2.2.1.GA]

                          at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76) [:1.0.0.GA]

                          at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80) [jboss-aop.jar:2.2.1.GA]

                          at org.jboss.ejb3.core.context.CurrentInvocationContextInterceptor.invoke(CurrentInvocationContextInterceptor.java:47) [:1.7.17]

                          at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80) [jboss-aop.jar:2.2.1.GA]

                          at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:90) [:1.1.3]

                          at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_537068416.invoke(InvocationContextInterceptor_z_setup_537068416.java) [:]

                          at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80) [jboss-aop.jar:2.2.1.GA]

                          at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67) [:1.0.1]

                          at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80) [jboss-aop.jar:2.2.1.GA]

                          at org.jboss.ejb3.singleton.aop.impl.AOPBasedSingletonContainer.invokeCallback(AOPBasedSingletonContainer.java:1059) [:1.0.0-alpha-28]

                          ... 74 more

                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: DataSourceBean!no-interface 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.stateless.StatelessContainer.createBeanContext(StatelessContainer.java:139) [:1.7.17]

                          at org.jboss.ejb3.pool.AbstractPool.createBeanContext(AbstractPool.java:94) [:1.7.17]

                          at org.jboss.ejb3.pool.AbstractPool.create(AbstractPool.java:81) [:1.7.17]

                          at org.jboss.ejb3.InfinitePool.get(InfinitePool.java:62) [:1.7.17]

                          at org.jboss.ejb3.InfinitePool.get(InfinitePool.java:57) [:1.7.17]

                          at org.jboss.ejb3.pool.ThreadlocalPool.create(ThreadlocalPool.java:54) [:1.7.17]

                          at org.jboss.ejb3.pool.ThreadlocalPool.get(ThreadlocalPool.java:86) [:1.7.17]

                          at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:58) [:1.7.17]

                          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]

                          at org.jboss.ejb3.core.context.SessionInvocationContextAdapter.proceed(SessionInvocationContextAdapter.java:95) [:1.7.17]

                          at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:223) [:0.0.1]

                          ... 137 more

                Caused by: javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: DataSourceBean!no-interface not bound]]

                          at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1356) [:5.0.5.Final]

                          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:819) [:5.0.5.Final]

                          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:835) [:5.0.5.Final]

                          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688) [:5.0.5.Final]

                          at javax.naming.InitialContext.lookup(InitialContext.java:392) [:1.6.0_22]

                          at org.jboss.injection.injector.EEInjector.lookup(EEInjector.java:153) [:1.0.0-alpha-6]

                          at org.jboss.injection.injector.EEInjector.inject(EEInjector.java:133) [:1.0.0-alpha-6]

                          at org.jboss.injection.injector.EEInjector.inject(EEInjector.java:82) [:1.0.0-alpha-6]

                          ... 158 more

                Caused by: javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: DataSourceBean!no-interface not bound]

                          at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1356) [:5.0.5.Final]

                          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:819) [:5.0.5.Final]

                          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688) [:5.0.5.Final]

                          at javax.naming.InitialContext.lookup(InitialContext.java:392) [:1.6.0_22]

                          at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1350) [:5.0.5.Final]

                          ... 165 more

                Caused by: javax.naming.NameNotFoundException: DataSourceBean!no-interface not bound

                          at org.jnp.server.NamingServer.getBinding(NamingServer.java:771) [:5.0.5.Final]

                          at org.jnp.server.NamingServer.getBinding(NamingServer.java:779) [:5.0.5.Final]

                          at org.jnp.server.NamingServer.getObject(NamingServer.java:785) [:5.0.5.Final]

                          at org.jnp.server.NamingServer.lookup(NamingServer.java:443) [:5.0.5.Final]

                          at org.jnp.server.NamingServer.lookup(NamingServer.java:399) [:5.0.5.Final]

                          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:728) [:5.0.5.Final]

                          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688) [:5.0.5.Final]

                          at javax.naming.InitialContext.lookup(InitialContext.java:392) [:1.6.0_22]

                          at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1350) [:5.0.5.Final]

                          ... 169 more

                 

                Vidas

                • 6. Singleton bean fails to call @PreDestroy method
                  Nicklas Karlsson Master

                  One would think that for injected stuff, the container could keep track on what is referenced where but for general teardown, I think there is always the risk that something has already been destroyed.

                  • 7. Singleton bean fails to call @PreDestroy method
                    vide Newbie

                      Maybe general solution could be, that container executes @PreDestroy methods first, and after then starts stopping EJB's?

                    • 8. Singleton bean fails to call @PreDestroy method
                      jaikiran pai Master

                      That should have worked. I suspect it's this bug which is causing this issue https://issues.jboss.org/browse/EJBTHREE-2227. Can you try the workaround mentioned in that other thread?

                      • 9. Singleton bean fails to call @PreDestroy method
                        vide Newbie

                          Workaround wouldn't help, because now I get another error, related to directly injected bean. "SystemBean" is injected in "IdGeneratorBean" and is called in PreDestroy method. But according to log, it is stopped before "IdGeneratorBean" calls PreDestroy, so, we get NPE here. It is random issue, because sometimes "IdGeneratorBean" is stopping before others. In such cases everything works fine.

                         

                         

                        14:07:56,973 INFO  [org.jboss.ejb3.session.SessionSpecContainer] Stopping jboss.j2ee:jar=BEE.war,name=SystemBean,service=EJB3

                        14:07:56,974 INFO  [org.jboss.ejb3.EJBContainer] STOPPED EJB: com.butent.bee.server.data.SystemBean ejbName: SystemBean

                        14:07:56,978 INFO  [org.jboss.ejb3.session.SessionSpecContainer] Stopping jboss.j2ee:jar=BEE.war,name=DataServiceBean,service=EJB3

                        14:07:56,979 INFO  [org.jboss.ejb3.EJBContainer] STOPPED EJB: com.butent.bee.server.data.DataServiceBean ejbName: DataServiceBean

                        14:07:56,982 INFO  [org.jboss.ejb3.session.SessionSpecContainer] Stopping jboss.j2ee:jar=BEE.war,name=UiHolderBean,service=EJB3

                        14:07:56,983 INFO  [org.jboss.ejb3.EJBContainer] STOPPED EJB: com.butent.bee.server.ui.UiHolderBean ejbName: UiHolderBean

                        14:07:56,986 INFO  [org.jboss.ejb3.session.SessionSpecContainer] Stopping jboss.j2ee:jar=BEE.war,name=IdGeneratorBean,service=EJB3

                        14:07:56,986 INFO  [org.jboss.ejb3.EJBContainer] STOPPED EJB: com.butent.bee.server.data.IdGeneratorBean ejbName: IdGeneratorBean

                        14:07:56,989 WARN  [org.jboss.kernel.plugins.dependency.CreateDestroyLifecycleAction] Error during destroy for jboss.j2ee:jar=BEE.war,name=IdGeneratorBean,service=EJB3: java.lang.RuntimeException: Could not preDestroy the singleton bean instance

                                  at org.jboss.ejb3.singleton.impl.container.SingletonEJBInstanceManagerImpl.destroy(SingletonEJBInstanceManagerImpl.java:177) [:1.0.0-alpha-28]

                                  at org.jboss.ejb3.singleton.impl.container.SingletonContainer.destroy(SingletonContainer.java:152) [:1.0.0-alpha-28]

                                  at org.jboss.ejb3.singleton.aop.impl.AOPBasedSingletonContainer.destroy(AOPBasedSingletonContainer.java:364) [:1.0.0-alpha-28]

                                  at sun.reflect.GeneratedMethodAccessor844.invoke(Unknown Source) [:1.6.0_22]

                                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_22]

                                  at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_22]

                                  at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:60) [jboss-reflect.jar:2.2.0.GA]

                                  at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:168) [jboss-reflect.jar:2.2.0.GA]

                                  at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66) [jboss-reflect.jar:2.2.0.GA]

                                  at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:257) [jboss-kernel.jar:2.2.0.GA]

                                  at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47) [jboss-kernel.jar:2.2.0.GA]

                                  at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:125) [jboss-kernel.jar:2.2.0.GA]

                                  at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:72) [jboss-kernel.jar:2.2.0.GA]

                                  at org.jboss.kernel.plugins.dependency.LifecycleAction.uninstallActionInternal(LifecycleAction.java:286) [jboss-kernel.jar:2.2.0.GA]

                                  at org.jboss.kernel.plugins.dependency.InstallsAwareAction.uninstallAction(InstallsAwareAction.java:175) [jboss-kernel.jar:2.2.0.GA]

                                  at org.jboss.kernel.plugins.dependency.InstallsAwareAction.uninstallAction(InstallsAwareAction.java:42) [jboss-kernel.jar:2.2.0.GA]

                                  at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleUninstallAction(SimpleControllerContextAction.java:79) [jboss-dependency.jar:2.2.0.GA]

                                  at org.jboss.dependency.plugins.action.AccessControllerContextAction.uninstall(AccessControllerContextAction.java:131) [jboss-dependency.jar:2.2.0.GA]

                                  at org.jboss.dependency.plugins.AbstractControllerContextActions.uninstall(AbstractControllerContextActions.java:58) [jboss-dependency.jar:2.2.0.GA]

                                  at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:385) [jboss-dependency.jar:2.2.0.GA]

                                  at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:2078) [jboss-dependency.jar:2.2.0.GA]

                                  at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1624) [jboss-dependency.jar:2.2.0.GA]

                                  at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1472) [jboss-dependency.jar:2.2.0.GA]

                                  at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1537) [jboss-dependency.jar:2.2.0.GA]

                                  at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1472) [jboss-dependency.jar:2.2.0.GA]

                                  at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1537) [jboss-dependency.jar:2.2.0.GA]

                                  at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1472) [jboss-dependency.jar:2.2.0.GA]

                                  at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1537) [jboss-dependency.jar:2.2.0.GA]

                                  at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1472) [jboss-dependency.jar:2.2.0.GA]

                                  at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:756) [jboss-dependency.jar:2.2.0.GA]

                                  at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:669) [jboss-dependency.jar:2.2.0.GA]

                                  at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.undeploy(BeanMetaDataDeployer.java:230) [:2.2.0.GA]

                                  at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.undeploy(BeanMetaDataDeployer.java:58) [:2.2.0.GA]

                                  at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalUndeploy(AbstractSimpleRealDeployer.java:69) [:2.2.0.GA]

                                  at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.undeploy(AbstractRealDeployer.java:117) [:2.2.0.GA]

                                  at org.jboss.deployers.plugins.deployers.DeployerWrapper.undeploy(DeployerWrapper.java:204) [:2.2.0.GA]

                                  at org.jboss.deployers.plugins.deployers.DeployersImpl.doUndeploy(DeployersImpl.java:1862) [:2.2.0.GA]

                                  at org.jboss.deployers.plugins.deployers.DeployersImpl.doUninstallParentLast(DeployersImpl.java:1769) [:2.2.0.GA]

                                  at org.jboss.deployers.plugins.deployers.DeployersImpl.doUninstallParentLast(DeployersImpl.java:1762) [:2.2.0.GA]

                                  at org.jboss.deployers.plugins.deployers.DeployersImpl.uninstall(DeployersImpl.java:1724) [:2.2.0.GA]

                                  at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:385) [jboss-dependency.jar:2.2.0.GA]

                                  at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:2078) [jboss-dependency.jar:2.2.0.GA]

                                  at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1624) [jboss-dependency.jar:2.2.0.GA]

                                  at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:948) [jboss-dependency.jar:2.2.0.GA]

                                  at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.GA]

                                  at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983) [:2.2.0.GA]

                                  at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1968) [:2.2.0.GA]

                                  at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1001) [:2.2.0.GA]

                                  at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:656) [:2.2.0.GA]

                                  at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106) [:6.0.0.Final]

                                  at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:143) [:0.2.2]

                                  at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.deploy(HDScanner.java:240) [:0.2.2]

                                  at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.complete(HDScanner.java:192) [:0.2.2]

                                  at org.jboss.profileservice.management.TwoPCActionWrapper.doComplete(TwoPCActionWrapper.java:57) [:0.2.2]

                                  at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.complete(AbstractTwoPhaseModificationAction.java:74) [:0.2.2]

                                  at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.prepare(AbstractTwoPhaseModificationAction.java:95) [:0.2.2]

                                  at org.jboss.profileservice.management.ModificationSession.prepare(ModificationSession.java:87) [:0.2.2]

                                  at org.jboss.profileservice.management.AbstractActionController.internalPerfom(AbstractActionController.java:234) [:0.2.2]

                                  at org.jboss.profileservice.management.AbstractActionController.performWrite(AbstractActionController.java:213) [:0.2.2]

                                  at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:150) [:0.2.2]

                                  at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:135) [:0.2.2]

                                  at org.jboss.profileservice.deployment.hotdeploy.HDScanner.scan(HDScanner.java:146) [:0.2.2]

                                  at org.jboss.profileservice.deployment.hotdeploy.HDScanner.run(HDScanner.java:90) [:0.2.2]

                                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [:1.6.0_22]

                                  at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) [:1.6.0_22]

                                  at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) [:1.6.0_22]

                                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) [:1.6.0_22]

                                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180) [:1.6.0_22]

                                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204) [:1.6.0_22]

                                  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_22]

                                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_22]

                                  at java.lang.Thread.run(Thread.java:680) [:1.6.0_22]

                        Caused by: java.lang.RuntimeException: javax.ejb.EJBException: java.lang.NullPointerException

                                  at org.jboss.ejb3.singleton.aop.impl.AOPBasedSingletonContainer.invokeCallback(AOPBasedSingletonContainer.java:1063) [:1.0.0-alpha-28]

                                  at org.jboss.ejb3.EJBContainer.invokePreDestroy(EJBContainer.java:1413) [:1.7.17]

                                  at org.jboss.ejb3.singleton.aop.impl.AOPBasedSingletonContainer.preDestroy(AOPBasedSingletonContainer.java:786) [:1.0.0-alpha-28]

                                  at org.jboss.ejb3.singleton.impl.container.SingletonEJBInstanceManagerImpl.destroy(SingletonEJBInstanceManagerImpl.java:173) [:1.0.0-alpha-28]

                                  ... 71 more

                        Caused by: javax.ejb.EJBException: java.lang.NullPointerException

                                  at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:183) [:0.0.1]

                                  at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:251) [:0.0.1]

                                  at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.requiresNew(CMTTxInterceptor.java:392) [:0.0.1]

                                  at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invoke(CMTTxInterceptor.java:211) [:0.0.1]

                                  at org.jboss.ejb3.tx2.aop.CMTTxInterceptorWrapper.invoke(CMTTxInterceptorWrapper.java:52) [:0.0.1]

                                  at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80) [jboss-aop.jar:2.2.1.GA]

                                  at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76) [:1.0.0.GA]

                                  at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80) [jboss-aop.jar:2.2.1.GA]

                                  at org.jboss.ejb3.core.context.CurrentInvocationContextInterceptor.invoke(CurrentInvocationContextInterceptor.java:47) [:1.7.17]

                                  at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80) [jboss-aop.jar:2.2.1.GA]

                                  at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:90) [:1.1.3]

                                  at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_537068416.invoke(InvocationContextInterceptor_z_setup_537068416.java) [:]

                                  at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80) [jboss-aop.jar:2.2.1.GA]

                                  at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67) [:1.0.1]

                                  at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80) [jboss-aop.jar:2.2.1.GA]

                                  at org.jboss.ejb3.singleton.aop.impl.AOPBasedSingletonContainer.invokeCallback(AOPBasedSingletonContainer.java:1059) [:1.0.0-alpha-28]

                                  ... 74 more

                        Caused by: java.lang.NullPointerException

                                  at org.jboss.ejb3.nointerface.impl.invocationhandler.NoInterfaceViewInvocationHandler.invokeEndpoint(NoInterfaceViewInvocationHandler.java:143) [:6.0.0.Final]

                                  at org.jboss.ejb3.nointerface.impl.invocationhandler.NoInterfaceViewInvocationHandler.access$000(NoInterfaceViewInvocationHandler.java:54) [:6.0.0.Final]

                                  at org.jboss.ejb3.nointerface.impl.invocationhandler.NoInterfaceViewInvocationHandler$1.invoke(NoInterfaceViewInvocationHandler.java:103) [:6.0.0.Final]

                                  at org.jboss.ejb3.sis.reflect.InterceptorInvocationHandler$1.proceed(InterceptorInvocationHandler.java:84) [:1.0.0-alpha-1]

                                  at org.jboss.ejb3.sis.InterceptorAssembly$1.proceed(InterceptorAssembly.java:82) [:1.0.0-alpha-1]

                                  at org.jboss.ejb3.nointerface.impl.async.AsyncClientInterceptor.invoke(AsyncClientInterceptor.java:119) [:6.0.0.Final]

                                  at org.jboss.ejb3.sis.InterceptorAssembly$1.proceed(InterceptorAssembly.java:74) [:1.0.0-alpha-1]

                                  at org.jboss.ejb3.nointerface.impl.invocationhandler.ObjectMethodsInterceptor.invoke(ObjectMethodsInterceptor.java:78) [:6.0.0.Final]

                                  at org.jboss.ejb3.sis.InterceptorAssembly$1.proceed(InterceptorAssembly.java:74) [:1.0.0-alpha-1]

                                  at org.jboss.ejb3.sis.InterceptorAssembly.invoke(InterceptorAssembly.java:90) [:1.0.0-alpha-1]

                                  at org.jboss.ejb3.sis.reflect.InterceptorInvocationHandler.invoke(InterceptorInvocationHandler.java:110) [:1.0.0-alpha-1]

                                  at org.jboss.ejb3.nointerface.impl.invocationhandler.NoInterfaceViewInvocationHandler.invoke(NoInterfaceViewInvocationHandler.java:115) [:6.0.0.Final]

                                  at org.jboss.ejb3.proxy.javassist.JavassistInvocationHandlerAdapter.invoke(JavassistInvocationHandlerAdapter.java:71) [:1.0.0-alpha-1]

                                  at com.butent.bee.server.data.SystemBean_$$_javassist_315.getDbName(SystemBean_$$_javassist_315.java)

                                  at com.butent.bee.server.data.IdGeneratorBean.destroy(IdGeneratorBean.java:51)

                                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_22]

                                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_22]

                                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_22]

                                  at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_22]

                                  at org.jboss.ejb3.interceptors.aop.LifecycleCallbackBeanMethodInterceptor.invoke(LifecycleCallbackBeanMethodInterceptor.java:69) [:1.1.3]

                                  at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80) [jboss-aop.jar:2.2.1.GA]

                                  at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:56) [:1.7.17]

                                  at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80) [jboss-aop.jar:2.2.1.GA]

                                  at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42) [:1.0.3]

                                  at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80) [jboss-aop.jar:2.2.1.GA]

                                  at org.jboss.ejb3.singleton.aop.impl.ConstructionInvocationContextAdapter.proceed(ConstructionInvocationContextAdapter.java:106) [:1.0.0-alpha-28]

                                  at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:247) [:0.0.1]

                                  ... 88 more

                         

                        Vidas

                        • 10. Singleton bean fails to call @PreDestroy method
                          jaikiran pai Master

                          Okay, please create a separate EJBTHREE JIRA (since this one is a dependency issue) and I'll take a look. If possible, please do attach an easily reproducible application.

                          • 11. Singleton bean fails to call @PreDestroy method
                            vide Newbie

                            Tried to make simple test case - no luck. Reproduced only the case, you mentioned previously https://issues.jboss.org/browse/EJBTHREE-2227 . But in real application the last posted stack trace happens quite often. And I noticed, that order, in which container is stopping beans, changes often, but in my simple test case beans are stopped all the time in the same order.

                             

                            Vidas