0 Replies Latest reply on Jan 7, 2008 12:10 PM by hamtho2

    Once again: Embedded JBoss with JDK6 and maven2

      Hi @all,

      although I read around the forum regarding the problems with Embedded JBoss and JDK6 I´m still not successful while trying to run my TestNG tests through maven2.0.8. I followed the instruction as Pete suggested at his blog (http://in.relation.to/Bloggers/EmbeddedJBossUpdate), playing around with several different versions of the embedded jboss and jdk´s.

      This is the stacktrace that appears when using the beta3-snapshot when starting the tests using maven (btw surefire-plugin 2.3 with testng 5.1)

      startUp JBoss embedded.
      DEBUG [main] (KernelFactory.java:86) - Starting JBoss Kernel construction...
      org.apache.maven.surefire.booter.SurefireExecutionException: null; nested exception is java.lang.NullPointerException: null
      java.lang.NullPointerException
       at org.apache.maven.surefire.report.AbstractTextReporter.testFailed(AbstractTextReporter.java:111)
       at org.apache.maven.surefire.report.ReporterManager.testFailed(ReporterManager.java:335)
       at org.apache.maven.surefire.report.ReporterManager.testFailed(ReporterManager.java:317)
       at org.apache.maven.surefire.testng.TestNGReporter.onTestFailure(TestNGReporter.java:100)
       at org.testng.internal.Invoker.runTestListeners(Invoker.java:1164)
       at org.testng.internal.Invoker.runTestListeners(Invoker.java:1149)
       at org.testng.internal.Invoker.handleConfigurationFailure(Invoker.java:191)
       at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:170)
       at org.testng.SuiteRunner.privateRun(SuiteRunner.java:223)
       at org.testng.SuiteRunner.run(SuiteRunner.java:145)
       at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901)
       at org.testng.TestNG.runSuitesLocally(TestNG.java:863)
       at org.apache.maven.surefire.testng.TestNGExecutor.executeTestNG(TestNGExecutor.java:69)
       at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:78)
       at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
       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:290)
       at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
      


      My test-class looks like this:

      
       @BeforeSuite
       public void startUp() throws Exception {
       System.out.println("startUp JBoss embedded.");
       if (!Bootstrap.getInstance().isStarted()) {
       System.out.println("is not started.");
       Bootstrap.getInstance().bootstrap();
       }
       deploy();
       System.out.println("startUp JBoss embedded finished.");
       }
      


      This is my maven call
      mvn test -Dsun.lang.ClassLoader.allowArraySyntax=true -Djava.endorsed.dirs="C:/Program Files/Java/jdk1.6.0_03/lib/endorsed"
      


      Unfortunately the exception does not say much about the reason. Is there anything that has to be configured or is there anything else to keep in mind? Or is there no chance to run embedded jboss with JDK6 (although some people seem to run it just fine)

      Thanks for your help

      Thomas