[
http://jira.jboss.com/jira/browse/EJBTHREE-534?page=all ]
Carlo de Wolf resolved EJBTHREE-534.
------------------------------------
Resolution: Deferred
Assignee: Carlo de Wolf
Embeddable Container fails if javax.management.MBeanServerFactory is
loaded from jboss-ejb3-all.jar
---------------------------------------------------------------------------------------------------
Key: EJBTHREE-534
URL:
http://jira.jboss.com/jira/browse/EJBTHREE-534
Project: EJB 3.0
Issue Type: Bug
Components: EJB3 Extensions
Affects Versions: EJB 3.0 RC6 - PFD
Environment: Windows XP, JDK 1.5.0 update 6
Reporter: Matthias Germann
Assigned To: Carlo de Wolf
It's not possible to deploy a stateless session Bean to the embeddable EJB 3.0
container if the "javax.manangement.MBeanServerFactory" class is loaded from
jboss-ejb3-all.jar instead of sun's rt.jar.
The problem is that "javax.management.MBeanServerFactory" calls the
getInstance() method of the "org.jboss.mx.server.ServerConfig" class to
initialize a static member. This method fails because the
"org.jboss.mx.server.JBossMXServerConfig" class is not included in
jboss-ejb3-all.jar
See the following stack trace:
INFO 25-04 15:34:58,343 (MCKernelAbstraction.java:install:79) -installing bean:
jboss.j2ee:jar=test-classes,name=SimpleStatelessServiceBean,service=EJB3 with
dependencies:
INFO 25-04 15:34:58,750 (EJBContainer.java:start:558) -STARTED EJB:
com.unisys.insieme.testing.junit.SimpleStatelessServiceBean ejbName:
SimpleStatelessServiceBean
ERROR 25-04 15:34:58,875 (AbstractController.java:incrementState:350) -Error installing
to Start: name=jboss.j2ee:jar=test-classes,name=SimpleStatelessServiceBean,service=EJB3
sta
te=Create
java.lang.ExceptionInInitializerError
at org.jboss.mx.util.MBeanServerLocator.locateJBoss(MBeanServerLocator.java:114)
at org.jboss.ejb3.EjbTimerUtil.getTimerService(EjbTimerUtil.java:46)
at org.jboss.ejb3.stateless.StatelessContainer.start(StatelessContainer.java:81)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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.KernelControllerContextActions.dispatchJoinPoint(KernelControllerContextActions.java:100)
at
org.jboss.kernel.plugins.dependency.KernelControllerContextActions$LifecycleAction.installAction(KernelControllerContextActions.java:583)
at
org.jboss.kernel.plugins.dependency.KernelControllerContextActions$KernelControllerContextAction.install(KernelControllerContextActions.java:175)
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:593)
at
org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:346)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:438)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:379)
at
org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:225)
at
org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:151)
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:86)
at org.jboss.ejb3.Ejb3Deployment.registerEJBContainer(Ejb3Deployment.java:437)
at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:484)
at
org.jboss.ejb3.embedded.EJB3StandaloneDeployer.start(EJB3StandaloneDeployer.java:450)
at
com.unisys.insieme.testing.environment.JBossBeanContainer.<init>(JBossBeanContainer.java:86)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at
com.unisys.insieme.testing.environment.BeanContainer.getInstance(BeanContainer.java:38)
at com.unisys.insieme.testing.junit.EjbTestCase.setUp(EjbTestCase.java:26)
at
com.unisys.insieme.testing.junit.CustomerServiceBeanTest.setUp(CustomerServiceBeanTest.java:25)
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(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.maven.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:242)
at org.apache.maven.surefire.battery.JUnitBattery.execute(JUnitBattery.java:216)
at org.apache.maven.surefire.Surefire.executeBattery(Surefire.java:215)
at org.apache.maven.surefire.Surefire.run(Surefire.java:163)
at org.apache.maven.surefire.Surefire.run(Surefire.java:87)
at org.apache.maven.surefire.Surefire.run(Surefire.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.maven.surefire.SurefireBooter.main(SurefireBooter.java:785)
Caused by: org.jboss.util.NestedRuntimeException: Cannot load class
org.jboss.mx.server.JBossMXServerConfig; - nested throwable:
(java.lang.ClassNotFoundException: org.jboss.mx.ser
ver.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)
... 59 more
Caused by: java.lang.ClassNotFoundException: org.jboss.mx.server.JBossMXServerConfig
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
org.apache.maven.surefire.IsolatedClassLoader.loadClass(IsolatedClassLoader.java:85)
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)
... 61 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira