There have been several listings in various mailing groups (Maven and Jboss) 
related to a JbossMXserverConfig ClassNotFoundException problem when trying to 
do automated testing (usually through maven/surefire plugin).

There exists a Jboss JIRA for this subject:
http://jira.jboss.com/jira/browse/EJBTHREE-534

However, the workaround is mentioned but since RC6, this hasn't been done and 
we are at RC9 - this would lead some people to believe that the workaround 
isn't a good idea.

Has anyone looked into this and maybe found a better workaround?   As for the 
maven-surefire-plugin, I've tried forking it out and a couple other 
configurations without success.


  | <configuration>
  |  <forkMode>pertest</forkMode>
  |  <childDelegation>true</childDelegation>
  | </configuration>
  | 

Error:

  |     <error type="java.lang.RuntimeException" 
message="java.lang.ExceptionInInitializerError">java.lang.RuntimeException: 
java.lang.ExceptionInInitializerError
  |     at 
org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.boot(EJB3StandaloneBootstrap.java:391)
  |     at 
com.ghsinc.junit.EmbeddedEjb3TestCase.startupEmbeddedJboss(EmbeddedEjb3TestCase.java:25)
  |     at 
com.ghsinc.junit.EmbeddedEjb3TestCase.setUp(EmbeddedEjb3TestCase.java:17)
  |     at junit.framework.TestCase.runBare(TestCase.java:125)
  |     at junit.framework.TestResult$1.protect(TestResult.java:106)
  |     at junit.framework.TestResult.runProtected(TestResult.java:124)
  |     at junit.framework.TestResult.run(TestResult.java:109)
  |     at junit.framework.TestCase.run(TestCase.java:118)
  |     at junit.framework.TestSuite.runTest(TestSuite.java:208)
  |     at junit.framework.TestSuite.run(TestSuite.java:203)
  |     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.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:210)
  |     at 
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:135)
  |     at 
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:160)
  |     at org.apache.maven.surefire.Surefire.run(Surefire.java:81)
  |     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.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:218)
  |     at 
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:777)
  | Caused by: java.lang.ExceptionInInitializerError
  |     at 
org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.loadMBeanServer(EJB3StandaloneBootstrap.java:407)
  |     at 
org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.boot(EJB3StandaloneBootstrap.java:376)
  |     ... 23 more
  | Caused by: org.jboss.util.NestedRuntimeException: Cannot load class 
org.jboss.mx.server.JBossMXServerConfig; - nested throwable: 
(java.lang.ClassNotFoundException: org.jboss.mx.server.JBossMXServerConfig)
  |     at org.jboss.util.Classes.instantiate(Classes.java:531)
  |     at org.jboss.mx.server.ServerConfig.getInstance(ServerConfig.java:74)
  |     at 
javax.management.MBeanServerFactory.&clinit&(MBeanServerFactory.java:79)
  |     ... 25 more
  | Caused by: java.lang.ClassNotFoundException: 
org.jboss.mx.server.JBossMXServerConfig
  |     at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
  |     at java.security.AccessController.doPrivileged(Native Method)
  |     at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
  |     at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
  |     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
  |     at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
  |     at 
org.apache.maven.surefire.booter.IsolatedClassLoader.loadClass(IsolatedClassLoader.java:88)
  |     at org.jboss.util.Classes.loadClass(Classes.java:631)
  |     at org.jboss.util.Classes.loadClass(Classes.java:570)
  |     at org.jboss.util.Classes.instantiate(Classes.java:527)
  |     ... 27 more
  | </error>
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981054#3981054

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981054
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to