1 Reply Latest reply on Oct 16, 2008 2:38 PM by Samuel Santos

    Problem with Embeddable EJB 3.0 and MBeans

    Samuel Santos Newbie

      I've some MBeans deployed in an EJB file JAR. MBeans are deployed through @Service annotations.

      When running JBoss 4.2.2 my MBeans are correctly deployed as the entire EAR file.
      When using Embeddable EJB 3.0 to unit test my app I'm having some difficulties with MBeans.

      I use Maven and TestNG for running my unit tests.
      I'm starting the container with the following code:

      private static void startupEmbeddedJboss() {
       try {
       EJB3StandaloneBootstrap.boot(null);
       EJB3StandaloneBootstrap.deployXmlResource("security-beans.xml");
       deployer = EJB3StandaloneBootstrap.createDeployer();
       deployer.getArchivesByResource().add("log4j.xml");
       deployer.getArchivesByResource().add("META-INF/persistence.xml");
       deployer.getDeployDirs().add(makeURLForDir("target/classes"));
       deployer.getDeployDirs().add(makeURLForDir("target/test-classes"));
       deployer.create();
       deployer.start();
       } catch (Exception e) {
       LOGGER.error(e.getMessage(), e);
       }
      }
      


      The output stacktrace is:
      -------------------------------------------------------
       T E S T S
      -------------------------------------------------------
      Running TestSuite
      SLF4J: This version of SLF4J requires log4j version 1.2.12 or later. See also http://www.slf4j.org/codes.html#log4j_version
      19:49:19,328 INFO [BaseTest] startupEmbeddedJboss
      WARN 15-10 19:49:19,817 (BeanSchemaBinding.java:init:233) -You should use the 2.0 version of the Microcontainer xml. xmlns='urn:jboss:bean-deployer:2.0'
      lookup
       UserTransaction: org.jboss.ejb3.embedded.UserTransactionImpl
      19:49:21,829 INFO [ImageHandlerServiceMBean] Create
      19:49:21,845 INFO [ImageHandlerServiceMBean] Start
      WARN 15-10 19:49:21,845 (JBossTimerServiceFactory.java:restoreTimerService:112) -TIMER SERVICE IS NOT INSTALLED
      lookup
       UserTransaction: org.jboss.ejb3.embedded.UserTransactionImpl
       ImageHandlerServiceMBean: org.jnp.interfaces.NamingContext
      lookup
       UserTransaction: org.jboss.ejb3.embedded.UserTransactionImpl
       ImageHandlerServiceMBean: org.jnp.interfaces.NamingContext
      WARN 15-10 19:49:22,255 (Log4JLogger.java:warn:104) -Persistence provider caller does not implements the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null.
      WARN 15-10 19:49:23,536 (JBossTimerServiceFactory.java:restoreTimerService:112) -TIMER SERVICE IS NOT INSTALLED
      WARN 15-10 19:49:23,549 (JBossTimerServiceFactory.java:restoreTimerService:112) -TIMER SERVICE IS NOT INSTALLED
      WARN 15-10 19:49:23,566 (JBossTimerServiceFactory.java:restoreTimerService:112) -TIMER SERVICE IS NOT INSTALLED
      WARN 15-10 19:49:23,580 (JBossTimerServiceFactory.java:restoreTimerService:112) -TIMER SERVICE IS NOT INSTALLED
      WARN 15-10 19:49:23,596 (JBossTimerServiceFactory.java:restoreTimerService:112) -TIMER SERVICE IS NOT INSTALLED
      WARN 15-10 19:49:23,628 (JBossTimerServiceFactory.java:restoreTimerService:112) -TIMER SERVICE IS NOT INSTALLED
      WARN 15-10 19:49:23,644 (JBossTimerServiceFactory.java:restoreTimerService:112) -TIMER SERVICE IS NOT INSTALLED
      WARN 15-10 19:49:23,681 (JBossTimerServiceFactory.java:restoreTimerService:112) -TIMER SERVICE IS NOT INSTALLED
      WARN 15-10 19:49:23,714 (JBossTimerServiceFactory.java:restoreTimerService:112) -TIMER SERVICE IS NOT INSTALLED
      WARN 15-10 19:49:23,729 (JBossTimerServiceFactory.java:restoreTimerService:112) -TIMER SERVICE IS NOT INSTALLED
      WARN 15-10 19:49:23,748 (JBossTimerServiceFactory.java:restoreTimerService:112) -TIMER SERVICE IS NOT INSTALLED
      WARN 15-10 19:49:23,762 (JBossTimerServiceFactory.java:restoreTimerService:112) -TIMER SERVICE IS NOT INSTALLED
      WARN 15-10 19:49:23,817 (JBossTimerServiceFactory.java:restoreTimerService:112) -TIMER SERVICE IS NOT INSTALLED
      WARN 15-10 19:49:23,823 (JBossTimerServiceFactory.java:restoreTimerService:112) -TIMER SERVICE IS NOT INSTALLED
      19:49:23,841 INFO [EventProcessorServiceMBean] Create
      19:49:23,841 INFO [EventProcessorServiceMBean] Start
      WARN 15-10 19:49:23,842 (JBossTimerServiceFactory.java:restoreTimerService:112) -TIMER SERVICE IS NOT INSTALLED
      javax.management.InstanceAlreadyExistsException: com.foo.bar:service=ImageHandlerService
       at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:453)
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1484)
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:963)
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:917)
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:312)
       at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:482)
       at org.jboss.ejb3.MCKernelAbstraction.installMBean(MCKernelAbstraction.java:143)
       at org.jboss.ejb3.service.ServiceContainer.registerManagementInterface(ServiceContainer.java:431)
       at org.jboss.ejb3.service.ServiceContainer.start(ServiceContainer.java:147)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:55)
       at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:107)
       at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:75)
       at org.jboss.kernel.plugins.dependency.LifecycleAction.installAction(LifecycleAction.java:115)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.install(KernelControllerContextAction.java:100)
       at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:226)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:709)
       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:429)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:538)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:472)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:274)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:177)
       at org.jboss.kernel.plugins.dependency.AbstractKernelController.install(AbstractKernelController.java:79)
       at org.jboss.kernel.plugins.dependency.AbstractKernelController.install(AbstractKernelController.java:73)
       at org.jboss.ejb3.MCKernelAbstraction.install(MCKernelAbstraction.java:131)
       at org.jboss.ejb3.Ejb3Deployment.registerEJBContainer(Ejb3Deployment.java:281)
       at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:328)
       at org.jboss.ejb3.embedded.EJB3StandaloneDeployer.start(EJB3StandaloneDeployer.java:478)
       at com.foo.bar.core.business.BaseTest.startupEmbeddedJboss(BaseTest.java:99)
       at com.foo.bar.core.business.BaseTest.setUpSuite(BaseTest.java:46)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:580)
       at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:398)
       at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:145)
       at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:82)
       at org.testng.SuiteRunner.privateRun(SuiteRunner.java:278)
       at org.testng.SuiteRunner.run(SuiteRunner.java:198)
       at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:821)
       at org.testng.TestNG.runSuitesLocally(TestNG.java:788)
       at org.testng.TestNG.run(TestNG.java:708)
       at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:62)
       at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:141)
       at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
       at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
      java.lang.RuntimeException: Problem registering @Management interface for @Service class com.foo.bar.core.services.imaging.ImageHandlerServiceMBean
       at org.jboss.ejb3.service.ServiceContainer.registerManagementInterface(ServiceContainer.java:437)
       at org.jboss.ejb3.service.ServiceContainer.start(ServiceContainer.java:147)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:55)
       at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:107)
       at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:75)
       at org.jboss.kernel.plugins.dependency.LifecycleAction.installAction(LifecycleAction.java:115)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.install(KernelControllerContextAction.java:100)
       at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:226)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:709)
       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:429)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:538)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:472)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:274)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:177)
       at org.jboss.kernel.plugins.dependency.AbstractKernelController.install(AbstractKernelController.java:79)
       at org.jboss.kernel.plugins.dependency.AbstractKernelController.install(AbstractKernelController.java:73)
       at org.jboss.ejb3.MCKernelAbstraction.install(MCKernelAbstraction.java:131)
       at org.jboss.ejb3.Ejb3Deployment.registerEJBContainer(Ejb3Deployment.java:281)
       at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:328)
       at org.jboss.ejb3.embedded.EJB3StandaloneDeployer.start(EJB3StandaloneDeployer.java:478)
       at com.foo.bar.core.business.BaseTest.startupEmbeddedJboss(BaseTest.java:99)
       at com.foo.bar.core.business.BaseTest.setUpSuite(BaseTest.java:46)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:580)
       at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:398)
       at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:145)
       at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:82)
       at org.testng.SuiteRunner.privateRun(SuiteRunner.java:278)
       at org.testng.SuiteRunner.run(SuiteRunner.java:198)
       at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:821)
       at org.testng.TestNG.runSuitesLocally(TestNG.java:788)
       at org.testng.TestNG.run(TestNG.java:708)
       at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:62)
       at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:141)
       at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
       at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
      Caused by: java.lang.RuntimeException: javax.management.InstanceAlreadyExistsException: com.foo.bar:service=ImageHandlerService
       at org.jboss.ejb3.MCKernelAbstraction.installMBean(MCKernelAbstraction.java:154)
       at org.jboss.ejb3.service.ServiceContainer.registerManagementInterface(ServiceContainer.java:431)
       ... 49 more
      Caused by: javax.management.InstanceAlreadyExistsException: com.foo.bar:service=ImageHandlerService
       at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:453)
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1484)
      19:49:24,013 INFO [ImageHandlerServiceMBean] Stop
      19:49:24,013 INFO [ImageHandlerServiceMBean] Destroy
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:963)
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:917)
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:312)
       at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:482)
       at org.jboss.ejb3.MCKernelAbstraction.installMBean(MCKernelAbstraction.java:143)
       ... 50 more
      javax.management.InstanceAlreadyExistsException: com.foo.bar:service=SMSSenderService
       at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:453)
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1484)
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:963)
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:917)
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:312)
       at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:482)
       at org.jboss.ejb3.MCKernelAbstraction.installMBean(MCKernelAbstraction.java:143)
       at org.jboss.ejb3.service.ServiceContainer.registerManagementInterface(ServiceContainer.java:431)
       at org.jboss.ejb3.service.ServiceContainer.start(ServiceContainer.java:147)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:55)
       at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:107)
       at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:75)
       at org.jboss.kernel.plugins.dependency.LifecycleAction.installAction(LifecycleAction.java:115)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.install(KernelControllerContextAction.java:100)
       at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:226)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:709)
       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:429)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:538)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:472)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:274)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:177)
       at org.jboss.kernel.plugins.dependency.AbstractKernelController.install(AbstractKernelController.java:79)
       at org.jboss.kernel.plugins.dependency.AbstractKernelController.install(AbstractKernelController.java:73)
       at org.jboss.ejb3.MCKernelAbstraction.install(MCKernelAbstraction.java:131)
       at org.jboss.ejb3.Ejb3Deployment.registerEJBContainer(Ejb3Deployment.java:281)
       at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:328)
       at org.jboss.ejb3.embedded.EJB3StandaloneDeployer.start(EJB3StandaloneDeployer.java:478)
       at com.foo.bar.core.business.BaseTest.startupEmbeddedJboss(BaseTest.java:99)
       at com.foo.bar.core.business.BaseTest.setUpSuite(BaseTest.java:46)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:580)
       at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:398)
       at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:145)
       at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:82)
       at org.testng.SuiteRunner.privateRun(SuiteRunner.java:278)
       at org.testng.SuiteRunner.run(SuiteRunner.java:198)
       at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:821)
       at org.testng.TestNG.runSuitesLocally(TestNG.java:788)
       at org.testng.TestNG.run(TestNG.java:708)
       at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:62)
       at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:141)
       at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
       at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
      java.lang.RuntimeException: Problem registering @Management interface for @Service class com.foo.bar.core.services.sms.SMSSenderServiceMBean
       at org.jboss.ejb3.service.ServiceContainer.registerManagementInterface(ServiceContainer.java:437)
       at org.jboss.ejb3.service.ServiceContainer.start(ServiceContainer.java:147)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:55)
       at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:107)
       at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:75)
       at org.jboss.kernel.plugins.dependency.LifecycleAction.installAction(LifecycleAction.java:115)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.install(KernelControllerContextAction.java:100)
       at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:226)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:709)
       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:429)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:538)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:472)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:274)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:177)
       at org.jboss.kernel.plugins.dependency.AbstractKernelController.install(AbstractKernelController.java:79)
       at org.jboss.kernel.plugins.dependency.AbstractKernelController.install(AbstractKernelController.java:73)
       at org.jboss.ejb3.MCKernelAbstraction.install(MCKernelAbstraction.java:131)
       at org.jboss.ejb3.Ejb3Deployment.registerEJBContainer(Ejb3Deployment.java:281)
       at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:328)
       at org.jboss.ejb3.embedded.EJB3StandaloneDeployer.start(EJB3StandaloneDeployer.java:478)
       at com.foo.bar.core.business.BaseTest.startupEmbeddedJboss(BaseTest.java:99)
       at com.foo.bar.core.business.BaseTest.setUpSuite(BaseTest.java:46)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:580)
       at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:398)
       at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:145)
       at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:82)
       at org.testng.SuiteRunner.privateRun(SuiteRunner.java:278)
       at org.testng.SuiteRunner.run(SuiteRunner.java:198)
       at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:821)
       at org.testng.TestNG.runSuitesLocally(TestNG.java:788)
       at org.testng.TestNG.run(TestNG.java:708)
       at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:62)
       at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:141)
       at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
       at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
      Caused by: java.lang.RuntimeException: javax.management.InstanceAlreadyExistsException: com.foo.bar:service=SMSSenderService
       at org.jboss.ejb3.MCKernelAbstraction.installMBean(MCKernelAbstraction.java:154)
       at org.jboss.ejb3.service.ServiceContainer.registerManagementInterface(ServiceContainer.java:431)
       ... 49 more
      Caused by: javax.management.InstanceAlreadyExistsException: com.foo.bar:service=SMSSenderService
       at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:453)
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1484)
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:963)
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:917)
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:312)
       at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:482)
       at org.jboss.ejb3.MCKernelAbstraction.installMBean(MCKernelAbstraction.java:143)
       ... 50 more
      lookup
       eventService: $Proxy44
       News: org.jnp.interfaces.NamingContext
       configService: $Proxy43
       Core: org.jnp.interfaces.NamingContext
       advertisementService: $Proxy42
       UserTransaction: org.jboss.ejb3.embedded.UserTransactionImpl
       statisticsService: $Proxy46
       ConfigurationsServiceMBean: org.jnp.interfaces.NamingContext
      lookup
       eventService: $Proxy44
       News: org.jnp.interfaces.NamingContext
       configService: $Proxy43
       Core: org.jnp.interfaces.NamingContext
       advertisementService: $Proxy42
       UserTransaction: org.jboss.ejb3.embedded.UserTransactionImpl
       statisticsService: $Proxy46
       ConfigurationsServiceMBean: org.jnp.interfaces.NamingContext
      19:49:24,055 INFO [AdvertisementServiceBean] Post Construct Called!!
      19:49:24,056 ERROR [AdvertisementServiceBean] Erro getting ImageHandlerService.
      java.lang.RuntimeException: Error creating MBeanProxy: com.foo.bar:service=ImageHandlerService
       at org.jboss.mx.util.MBeanProxyExt.init(MBeanProxyExt.java:415)
       at org.jboss.mx.util.MBeanProxyExt.<init>(MBeanProxyExt.java:99)
       at org.jboss.mx.util.MBeanProxyExt.create(MBeanProxyExt.java:394)
       at org.jboss.mx.util.MBeanProxyExt.create(MBeanProxyExt.java:349)
       at org.jboss.mx.util.MBeanProxyExt.create(MBeanProxyExt.java:324)
       at com.foo.bar.core.business.AdvertisementServiceBean.init(AdvertisementServiceBean.java:248)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.ejb3.interceptor.LifecycleInvocationContextImpl.proceed(LifecycleInvocationContextImpl.java:159)
       at org.jboss.ejb3.interceptor.LifecycleInterceptorHandler.postConstruct(LifecycleInterceptorHandler.java:109)
       at org.jboss.ejb3.EJBContainer.invokePostConstruct(EJBContainer.java:505)
       at org.jboss.ejb3.AbstractPool.create(AbstractPool.java:112)
       at org.jboss.ejb3.ThreadlocalPool.get(ThreadlocalPool.java:48)
       at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:54)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
       at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:102)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:211)
       at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:79)
       at $Proxy42.getModuleById(Unknown Source)
       at com.foo.bar.core.business.AdvertisementServiceTest.insertAdvertisement(AdvertisementServiceTest.java:49)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:580)
       at org.testng.internal.Invoker.invokeMethod(Invoker.java:478)
       at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:617)
       at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:885)
       at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)
       at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:110)
       at org.testng.TestRunner.runWorkers(TestRunner.java:712)
       at org.testng.TestRunner.privateRun(TestRunner.java:582)
       at org.testng.TestRunner.run(TestRunner.java:477)
       at org.testng.SuiteRunner.runTest(SuiteRunner.java:324)
       at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:319)
       at org.testng.SuiteRunner.privateRun(SuiteRunner.java:292)
       at org.testng.SuiteRunner.run(SuiteRunner.java:198)
       at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:821)
       at org.testng.TestNG.runSuitesLocally(TestNG.java:788)
       at org.testng.TestNG.run(TestNG.java:708)
       at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:62)
       at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:141)
       at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
       at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
      Caused by: javax.management.InstanceNotFoundException: com.foo.bar:service=ImageHandlerService
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1094)
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBeanInfo(DefaultMBeanServerInterceptor.java:1372)
       at com.sun.jmx.mbeanserver.JmxMBeanServer.getMBeanInfo(JmxMBeanServer.java:880)
       at org.jboss.mx.util.MBeanProxyExt.init(MBeanProxyExt.java:407)
       ... 56 more
      ERROR 15-10 19:49:24,056 (AdvertisementServiceBean.java:init:251) -Erro getting ImageHandlerService.
      java.lang.RuntimeException: Error creating MBeanProxy: com.foo.bar:service=ImageHandlerService
       at org.jboss.mx.util.MBeanProxyExt.init(MBeanProxyExt.java:415)
       at org.jboss.mx.util.MBeanProxyExt.<init>(MBeanProxyExt.java:99)
       at org.jboss.mx.util.MBeanProxyExt.create(MBeanProxyExt.java:394)
       at org.jboss.mx.util.MBeanProxyExt.create(MBeanProxyExt.java:349)
       at org.jboss.mx.util.MBeanProxyExt.create(MBeanProxyExt.java:324)
       at com.foo.bar.core.business.AdvertisementServiceBean.init(AdvertisementServiceBean.java:248)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.ejb3.interceptor.LifecycleInvocationContextImpl.proceed(LifecycleInvocationContextImpl.java:159)
       at org.jboss.ejb3.interceptor.LifecycleInterceptorHandler.postConstruct(LifecycleInterceptorHandler.java:109)
       at org.jboss.ejb3.EJBContainer.invokePostConstruct(EJBContainer.java:505)
       at org.jboss.ejb3.AbstractPool.create(AbstractPool.java:112)
       at org.jboss.ejb3.ThreadlocalPool.get(ThreadlocalPool.java:48)
       at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:54)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
       at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:102)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:211)
       at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:79)
       at $Proxy42.getModuleById(Unknown Source)
       at com.foo.bar.core.business.AdvertisementServiceTest.insertAdvertisement(AdvertisementServiceTest.java:49)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:580)
       at org.testng.internal.Invoker.invokeMethod(Invoker.java:478)
       at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:617)
       at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:885)
       at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)
       at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:110)
       at org.testng.TestRunner.runWorkers(TestRunner.java:712)
       at org.testng.TestRunner.privateRun(TestRunner.java:582)
       at org.testng.TestRunner.run(TestRunner.java:477)
       at org.testng.SuiteRunner.runTest(SuiteRunner.java:324)
       at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:319)
       at org.testng.SuiteRunner.privateRun(SuiteRunner.java:292)
       at org.testng.SuiteRunner.run(SuiteRunner.java:198)
       at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:821)
       at org.testng.TestNG.runSuitesLocally(TestNG.java:788)
       at org.testng.TestNG.run(TestNG.java:708)
       at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:62)
       at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:141)
       at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
       at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
      Caused by: javax.management.InstanceNotFoundException: com.foo.bar:service=ImageHandlerService
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1094)
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBeanInfo(DefaultMBeanServerInterceptor.java:1372)
       at com.sun.jmx.mbeanserver.JmxMBeanServer.getMBeanInfo(JmxMBeanServer.java:880)
       at org.jboss.mx.util.MBeanProxyExt.init(MBeanProxyExt.java:407)
       ... 56 more
      19:49:24,687 INFO [BaseTest] shutdownEmbeddedJboss
      WARN 15-10 19:49:24,691 (LifecycleAction.java:uninstallAction:152) -Error during stop
      java.lang.RuntimeException: javax.management.InstanceNotFoundException: com.foo.bar:service=ImageHandlerService
       at org.jboss.ejb3.MCKernelAbstraction.uninstallMBean(MCKernelAbstraction.java:180)
       at org.jboss.ejb3.service.ServiceContainer.stop(ServiceContainer.java:166)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:55)
       at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:107)
       at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:75)
       at org.jboss.kernel.plugins.dependency.LifecycleAction.uninstallAction(LifecycleAction.java:137)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.uninstall(KernelControllerContextAction.java:144)
       at org.jboss.dependency.plugins.AbstractControllerContextActions.uninstall(AbstractControllerContextActions.java:58)
       at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:236)
       at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:723)
       at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:685)
       at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:613)
       at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:223)
       at org.jboss.ejb3.MCKernelAbstraction.uninstall(MCKernelAbstraction.java:188)
       at org.jboss.ejb3.Ejb3Deployment.stop(Ejb3Deployment.java:501)
       at org.jboss.ejb3.embedded.EJB3StandaloneDeployer.stop(EJB3StandaloneDeployer.java:512)
       at com.foo.bar.core.business.BaseTest.shutdownEmbeddedJboss(BaseTest.java:107)
       at com.foo.bar.core.business.BaseTest.tearDownSuite(BaseTest.java:55)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:580)
       at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:398)
       at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:145)
       at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:82)
       at org.testng.SuiteRunner.privateRun(SuiteRunner.java:309)
       at org.testng.SuiteRunner.run(SuiteRunner.java:198)
       at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:821)
       at org.testng.TestNG.runSuitesLocally(TestNG.java:788)
       at org.testng.TestNG.run(TestNG.java:708)
       at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:62)
       at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:141)
       at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
       at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
      Caused by: javax.management.InstanceNotFoundException: com.foo.bar:service=ImageHandlerService
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1094)
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBeanInfo(DefaultMBeanServerInterceptor.java:1372)
       at com.sun.jmx.mbeanserver.JmxMBeanServer.getMBeanInfo(JmxMBeanServer.java:880)
       at org.jboss.ejb3.MCKernelAbstraction.uninstallMBean(MCKernelAbstraction.java:171)
       ... 44 more
      WARN 15-10 19:49:24,692 (LifecycleAction.java:uninstallAction:152) -Error during stop
      java.lang.RuntimeException: javax.management.InstanceNotFoundException: com.foo.bar:service=SMSSenderService
       at org.jboss.ejb3.MCKernelAbstraction.uninstallMBean(MCKernelAbstraction.java:180)
       at org.jboss.ejb3.service.ServiceContainer.stop(ServiceContainer.java:166)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:55)
       at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:107)
       at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:75)
       at org.jboss.kernel.plugins.dependency.LifecycleAction.uninstallAction(LifecycleAction.java:137)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.uninstall(KernelControllerContextAction.java:144)
       at org.jboss.dependency.plugins.AbstractControllerContextActions.uninstall(AbstractControllerContextActions.java:58)
       at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:236)
       at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:723)
       at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:685)
       at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:613)
       at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:223)
       at org.jboss.ejb3.MCKernelAbstraction.uninstall(MCKernelAbstraction.java:188)
       at org.jboss.ejb3.Ejb3Deployment.stop(Ejb3Deployment.java:501)
       at org.jboss.ejb3.embedded.EJB3StandaloneDeployer.stop(EJB3StandaloneDeployer.java:512)
       at com.foo.bar.core.business.BaseTest.shutdownEmbeddedJboss(BaseTest.java:107)
       at com.foo.bar.core.business.BaseTest.tearDownSuite(BaseTest.java:55)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:580)
       at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:398)
       at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:145)
       at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:82)
       at org.testng.SuiteRunner.privateRun(SuiteRunner.java:309)
       at org.testng.SuiteRunner.run(SuiteRunner.java:198)
       at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:821)
       at org.testng.TestNG.runSuitesLocally(TestNG.java:788)
       at org.testng.TestNG.run(TestNG.java:708)
       at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:62)
       at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:141)
       at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
       at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
      Caused by: javax.management.InstanceNotFoundException: com.foo.bar:service=SMSSenderService
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1094)
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBeanInfo(DefaultMBeanServerInterceptor.java:1372)
       at com.sun.jmx.mbeanserver.JmxMBeanServer.getMBeanInfo(JmxMBeanServer.java:880)
       at org.jboss.ejb3.MCKernelAbstraction.uninstallMBean(MCKernelAbstraction.java:171)
       ... 44 more
      WARN 15-10 19:49:24,695 (LifecycleAction.java:uninstallAction:152) -Error during stop
      java.lang.RuntimeException: javax.management.InstanceNotFoundException: com.foo.bar:service=SMSSenderService
       at org.jboss.ejb3.MCKernelAbstraction.uninstallMBean(MCKernelAbstraction.java:180)
       at org.jboss.ejb3.service.ServiceContainer.stop(ServiceContainer.java:166)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:55)
       at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:107)
       at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:75)
       at org.jboss.kernel.plugins.dependency.LifecycleAction.uninstallAction(LifecycleAction.java:137)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.uninstall(KernelControllerContextAction.java:144)
       at org.jboss.dependency.plugins.AbstractControllerContextActions.uninstall(AbstractControllerContextActions.java:58)
       at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:236)
       at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:723)
       at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:685)
       at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:613)
       at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:664)
       at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:613)
       at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:223)
       at org.jboss.ejb3.MCKernelAbstraction.uninstallMBean(MCKernelAbstraction.java:176)
       at org.jboss.ejb3.service.ServiceContainer.stop(ServiceContainer.java:166)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:55)
       at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:107)
       at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:75)
       at org.jboss.kernel.plugins.dependency.LifecycleAction.uninstallAction(LifecycleAction.java:137)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.uninstall(KernelControllerContextAction.java:144)
       at org.jboss.dependency.plugins.AbstractControllerContextActions.uninstall(AbstractControllerContextActions.java:58)
       at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:236)
       at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:723)
       at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:685)
       at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:613)
       at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:664)
       at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:613)
       at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:223)
       at org.jboss.ejb3.MCKernelAbstraction.uninstall(MCKernelAbstraction.java:188)
       at org.jboss.ejb3.Ejb3Deployment.stop(Ejb3Deployment.java:501)
       at org.jboss.ejb3.embedded.EJB3StandaloneDeployer.stop(EJB3StandaloneDeployer.java:512)
       at com.foo.bar.core.business.BaseTest.shutdownEmbeddedJboss(BaseTest.java:107)
       at com.foo.bar.core.business.BaseTest.tearDownSuite(BaseTest.java:55)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:580)
       at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:398)
       at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:145)
       at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:82)
       at org.testng.SuiteRunner.privateRun(SuiteRunner.java:309)
       at org.testng.SuiteRunner.run(SuiteRunner.java:198)
       at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:821)
       at org.testng.TestNG.runSuitesLocally(TestNG.java:788)
       at org.testng.TestNG.run(TestNG.java:708)
       at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:62)
       at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:141)
       at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
       at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
      Caused by: javax.management.InstanceNotFoundException: com.foo.bar:service=SMSSenderService
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1094)
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBeanInfo(DefaultMBeanServerInterceptor.java:1372)
       at com.sun.jmx.mbeanserver.JmxMBeanServer.getMBeanInfo(JmxMBeanServer.java:880)
       at org.jboss.ejb3.MCKernelAbstraction.uninstallMBean(MCKernelAbstraction.java:171)
       ... 66 more
      19:49:24,697 INFO [EventProcessorServiceMBean] Stop
      19:49:24,698 INFO [EventProcessorServiceMBean] Destroy
      WARN 15-10 19:49:24,704 (LifecycleAction.java:uninstallAction:152) -Error during stop
      java.lang.RuntimeException: javax.management.InstanceNotFoundException: com.foo.bar:service=ImageHandlerService
       at org.jboss.ejb3.MCKernelAbstraction.uninstallMBean(MCKernelAbstraction.java:180)
       at org.jboss.ejb3.service.ServiceContainer.stop(ServiceContainer.java:166)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:55)
       at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:107)
       at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:75)
       at org.jboss.kernel.plugins.dependency.LifecycleAction.uninstallAction(LifecycleAction.java:137)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.uninstall(KernelControllerContextAction.java:144)
       at org.jboss.dependency.plugins.AbstractControllerContextActions.uninstall(AbstractControllerContextActions.java:58)
       at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:236)
       at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:723)
       at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:685)
       at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:613)
       at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:223)
       at org.jboss.ejb3.MCKernelAbstraction.uninstall(MCKernelAbstraction.java:188)
       at org.jboss.ejb3.Ejb3Deployment.stop(Ejb3Deployment.java:501)
       at org.jboss.ejb3.embedded.EJB3StandaloneDeployer.stop(EJB3StandaloneDeployer.java:512)
       at com.foo.bar.core.business.BaseTest.shutdownEmbeddedJboss(BaseTest.java:107)
       at com.foo.bar.core.business.BaseTest.tearDownSuite(BaseTest.java:55)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:580)
       at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:398)
       at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:145)
       at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:82)
       at org.testng.SuiteRunner.privateRun(SuiteRunner.java:309)
       at org.testng.SuiteRunner.run(SuiteRunner.java:198)
       at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:821)
       at org.testng.TestNG.runSuitesLocally(TestNG.java:788)
       at org.testng.TestNG.run(TestNG.java:708)
       at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:62)
       at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:141)
       at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
       at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
      Caused by: javax.management.InstanceNotFoundException: com.foo.bar:service=ImageHandlerService
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1094)
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBeanInfo(DefaultMBeanServerInterceptor.java:1372)
       at com.sun.jmx.mbeanserver.JmxMBeanServer.getMBeanInfo(JmxMBeanServer.java:880)
       at org.jboss.ejb3.MCKernelAbstraction.uninstallMBean(MCKernelAbstraction.java:171)
       ... 44 more
      19:49:24,699 INFO [EventProcessorServiceMBean] Thread Shutdown. Exiting.
      Tests run: 23, Failures: 1, Errors: 0, Skipped: 6, Time elapsed: 6.237 sec <<< FAILURE!
      
      Results :
      
      Failed tests:
       insertAdvertisement(com.foo.bar.core.business.AdvertisementServiceTest)
      
      Tests run: 23, Failures: 1, Errors: 0, Skipped: 6
      
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] There are test failures.
      


      Any ideas?
      Thanks!