8 Replies Latest reply on Dec 10, 2007 12:24 PM by Damian Harvey

    Unable to bootstrap testNG...

    Fijai Cairo Newbie

      I'm trying to run the basic testng cases generated by seam-gen and I get the errors embedded below. Besides modifying build.xml to get the target to run, I haven't changed any test related stuff.
      My project is just a vanilla Seam 2(cvs 09/24/07) project on AS 4.2 and jdk 1.5_07. I saw a few other posts about a problem like mine but what I gathered was that, the users were running Java 6 which had some incompatibilities with jboss-embedded-all.

      
      compiletest:
       [javac] Compiling 121 source files to /Users/goldfinger/Projects/Test-Build
       [javac] Note: Some input files use unchecked or unsafe operations.
       [javac] Note: Recompile with -Xlint:unchecked for details.
      
      copytestclasses:
      
      buildtest:
       [copy] Copying 1 file to /Users/goldfinger/Projects/Test-Build/META-INF
       [copy] Copying 1 file to /Users/goldfinger/Projects/Test-Build
      
      test:
       [testng] [Parser] Running:
       [testng] /Users/goldfinger/Projects/Test-Build/AccountServicesTest.xml
       [testng] /Users/goldfinger/Projects/Test-Build/BalancesActionTest.xml
       [testng] /Users/goldfinger/Projects/Test-Build/ControlPanelTest.xml
       [testng] /Users/goldfinger/Projects/Test-Build/HistoryActionTest.xml
       [testng] /Users/goldfinger/Projects/Test-Build/PositionsActionTest.xml
       [testng] /Users/goldfinger/Projects/Test-Build/RegisterTest.xml
       [testng] /Users/goldfinger/Projects/Test-Build/RequestStatusTest.xml
       [testng] /Users/goldfinger/Projects/Test-Build/UserHelperTest.xml
       [testng] /Users/goldfinger/Projects/Test-Build/UserProfileActionTest.xml
       [testng] /Users/goldfinger/Projects/Test-Build/WsodGatewayTest.xml
      
       [testng] WARN 26-09 17:23:13,677 [org.jboss.mx.loading.UnifiedLoaderRepository3.addClassLoader():675] Tried to add non-URLClassLoader. Ignored
       [testng] ERROR 26-09 17:23:13,690 [org.jboss.dependency.plugins.AbstractController.incrementState():350] Error installing to Start: name=JMXKernel state=Create
       [testng] java.lang.NoSuchMethodError: org.jboss.system.ServiceController.setKernel(Lorg/jboss/kernel/Kernel;)V
       [testng] at org.jboss.embedded.adapters.JMXKernel.start(JMXKernel.java:160)
       [testng] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       [testng] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       [testng] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       [testng] at java.lang.reflect.Method.invoke(Method.java:585)
       [testng] at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:55)
       [testng] at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:107)
       [testng] at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
       [testng] at org.jboss.kernel.plugins.dependency.KernelControllerContextActions.dispatchJoinPoint(KernelControllerContextActions.java:100)
       [testng] at org.jboss.kernel.plugins.dependency.KernelControllerContextActions$LifecycleAction.installAction(KernelControllerContextActions.java:582)
       [testng] at org.jboss.kernel.plugins.dependency.KernelControllerContextActions$KernelControllerContextAction.install(KernelControllerContextActions.java:175)
       [testng] at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
       [testng] at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:226)
       [testng] at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:593)
       [testng] at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:346)
       [testng] at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:438)
       [testng] at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:379)
       [testng] at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:225)
       [testng] at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:151)
       [testng] at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBean(AbstractKernelDeployer.java:291)
       [testng] at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBeans(AbstractKernelDeployer.java:261)
       [testng] at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deploy(AbstractKernelDeployer.java:117)
       [testng] at org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer.deploy(BeanXMLDeployer.java:95)
       [testng] at org.jboss.embedded.Bootstrap.deployBaseBootstrapUrl(Bootstrap.java:150)
       [testng] at org.jboss.embedded.Bootstrap.bootstrapURL(Bootstrap.java:162)
       [testng] at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:201)
       [testng] at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:214)
       [testng] at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:11)
       [testng] at org.jboss.seam.mock.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:968)
       [testng] at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:893)
       [testng] at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
       [testng] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       [testng] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       [testng] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       [testng] at java.lang.reflect.Method.invoke(Method.java:585)
       [testng] at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:604)
       [testng] at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:394)
       [testng] at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:142)
       [testng] at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:79)
       [testng] at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:165)
       [testng] at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:103)
       [testng] at org.testng.TestRunner.runWorkers(TestRunner.java:678)
       [testng] at org.testng.TestRunner.privateRun(TestRunner.java:624)
       [testng] at org.testng.TestRunner.run(TestRunner.java:495)
       [testng] at org.testng.SuiteRunner.runTest(SuiteRunner.java:300)
       [testng] at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:295)
       [testng] at org.testng.SuiteRunner.privateRun(SuiteRunner.java:275)
       [testng] at org.testng.SuiteRunner.run(SuiteRunner.java:190)
       [testng] at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:792)
       [testng] at org.testng.TestNG.runSuitesLocally(TestNG.java:765)
       [testng] at org.testng.TestNG.run(TestNG.java:699)
       [testng] at org.testng.TestNG.privateMain(TestNG.java:824)
       [testng] at org.testng.TestNG.main(TestNG.java:802)
       [testng] FAILED CONFIGURATION: @BeforeClass init
       [testng] java.lang.RuntimeException: Unable to bootstrap:
       [testng] at org.jboss.embedded.Bootstrap.bootstrapURL(Bootstrap.java:167)
       [testng] at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:201)
       [testng] at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:214)
       [testng] at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:11)
       [testng] at org.jboss.seam.mock.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:968)
       [testng] at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:893)
       [testng] at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
       [testng] Caused by: org.jboss.kernel.spi.registry.KernelRegistryEntryNotFoundException: Entry not found with name: MainDeployer
       [testng] at org.jboss.kernel.plugins.registry.AbstractKernelRegistry.getEntry(AbstractKernelRegistry.java:89)
       [testng] at org.jboss.embedded.Bootstrap.bootstrapURL(Bootstrap.java:163)
       [testng] ... 28 more
       [testng] ... Removed 22 stack frames
       [testng] SKIPPED CONFIGURATION: @BeforeMethod begin
       [testng] SKIPPED CONFIGURATION: @AfterMethod end
       [testng] SKIPPED CONFIGURATION: @AfterClass cleanup
       [testng] SKIPPED: test
      
       [testng] ===============================================
       [testng] AccountServices Test
       [testng] Tests run: 1, Failures: 0, Skips: 1
       [testng] Configuration Failures: 1, Skips: 3
       [testng] ===============================================
      
      
       [testng] ===============================================
       [testng] AccountServices Tests
       [testng] Total tests run: 1, Failures: 0, Skips: 1
       [testng] Configuration Failures: 1, Skips: 3
       [testng] ===============================================
      
       [testng] FAILED CONFIGURATION: @BeforeClass init
       [testng] java.lang.RuntimeException: Unable to bootstrap:
       [testng] at org.jboss.embedded.Bootstrap.bootstrapURL(Bootstrap.java:167)
       [testng] at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:201)
       [testng] at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:214)
       [testng] at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:11)
       [testng] at org.jboss.seam.mock.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:968)
       [testng] at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:893)
       [testng] at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
       [testng] Caused by: java.lang.IllegalStateException: Already installed ServerConfig
       [testng] at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:149)
       [testng] at org.jboss.kernel.plugins.dependency.AbstractKernelController.install(AbstractKernelController.java:79)
       [testng] at org.jboss.embedded.Bootstrap.bootstrapURL(Bootstrap.java:161)
       [testng] ... 28 more
       [testng] ... Removed 22 stack frames
       [testng] SKIPPED CONFIGURATION: @BeforeMethod begin
       [testng] SKIPPED CONFIGURATION: @AfterMethod end
       [testng] SKIPPED CONFIGURATION: @AfterClass cleanup
       [testng] SKIPPED: test
      
       [testng] ===============================================
       [testng] BalancesAction Test
       [testng] Tests run: 1, Failures: 0, Skips: 1
       [testng] Configuration Failures: 1, Skips: 3
       [testng] ===============================================
      


        • 1. Re: Unable to bootstrap testNG...
          Fijai Cairo Newbie

          Anybody out there? :-)

          • 3. Re: Unable to bootstrap testNG...
            Pete Muir Master

            Have you got this working?

            • 4. Re: Unable to bootstrap testNG...
              Fijai Cairo Newbie

              Yes Sir. Thanks You helped me in another post actually.

              • 5. Re: Unable to bootstrap testNG...
                Tatyana Polnyi Newbie

                Hi
                I am experiencing the same problem. Would you please share your solution with me?

                java.lang.RuntimeException: Unable to bootstrap:
                at org.jboss.embedded.Bootstrap.bootstrapURL(Bootstrap.java:167)
                at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:201)
                at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:214)
                at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:11)
                at org.jboss.seam.mock.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:1006)
                at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:931)
                at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
                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:585)
                at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:580)
                at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:397)
                at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:145)
                at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:82)
                at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:166)
                at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:103)
                at org.testng.TestRunner.runWorkers(TestRunner.java:689)
                at org.testng.TestRunner.privateRun(TestRunner.java:566)
                at org.testng.TestRunner.run(TestRunner.java:466)
                at org.testng.SuiteRunner.runTest(SuiteRunner.java:301)
                at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:296)
                at org.testng.SuiteRunner.privateRun(SuiteRunner.java:276)
                at org.testng.SuiteRunner.run(SuiteRunner.java:191)
                at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:808)
                at org.testng.TestNG.runSuitesLocally(TestNG.java:776)
                at org.testng.TestNG.run(TestNG.java:701)
                at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:73)
                at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:124)
                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:585)
                at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
                Caused by: org.jboss.kernel.spi.registry.KernelRegistryEntryNotFoundException: Entry not found with name: MainDeployer
                at org.jboss.kernel.plugins.registry.AbstractKernelRegistry.getEntry(AbstractKernelRegistry.java:89)
                at org.jboss.embedded.Bootstrap.bootstrapURL(Bootstrap.java:163)
                ... 33 more

                ===============================================
                Custom suite
                Total tests run: 1, Failures: 0, Skips: 1
                Configuration Failures: 1, Skips: 3
                ===============================================



                • 6. Re: Unable to bootstrap testNG...
                  Pete Muir Master

                  Please start a new topic.

                  • 7. Re: Unable to bootstrap testNG...
                    Fijai Cairo Newbie

                    Hi,
                    I ended up upgrading my seam libraries, generating a new application skeleton and then importing my source back into the skeleton.

                    • 8. Re: Unable to bootstrap testNG...
                      Damian Harvey Master

                      I've just experienced the same (or similar) problem.

                      FAILED CONFIGURATION: @BeforeClass init
                      java.lang.NoSuchFieldError: mainDeployer
                       at org.jboss.seam.mock.embedded.BootstrapWrapper.createDeploymentGroup(BootstrapWrapper.java:28)
                       at org.jboss.embedded.Bootstrap.deployResourceBases(Bootstrap.java:305)
                       at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:16)
                       at org.jboss.seam.mock.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:1005)
                       at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:929)
                       at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
                      ... Removed 22 stack frames


                      I had upgraded my Seam JARs from 2.0.0.CR2 to the latest 2.0.1.SNAPSHOT (I needed the DataModel fix). If I downgrade my JARs back to 2.0.0.CR2 then the Integration tests work.

                      Short of rebuilding my project skeleton, is there any solution to this?

                      Cheers,

                      Damian.