| Summary: | MBeanServer location is no longer compatible with EAP5 | ||
|---|---|---|---|
| Product: | [Retired] JBoss Enterprise WFK Platform 2 | Reporter: | Karel Piwko <kpiwko> |
| Component: | doc-Snowdrop-User-Guide | Assignee: | Isaac Rooskov <irooskov> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Karel Piwko <kpiwko> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 2.0.0.DR3 | CC: | maschmid, yshao |
| Target Milestone: | GA | Keywords: | Documentation |
| Target Release: | 2.1.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
The location of the MBean server has changed between versions of JBoss Enterprise Application Platform, so using the following configuration fails with deployment errors:
<bean id="mBeanServer" class="org.jboss.mx.util.MBeanServerLocator"
factory-method="locateJBoss"/>
The workaround for this issue is to use this configuration instead:
<bean id="mbeanServer"
class="org.springframework.jmx.support.MBeanServerFactoryBean">
<property name="locateExistingServerIfPossible" value="true" />
</bean>
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-06-27 12:18:36 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
New Contents:
The location of the MBean server has changed between versions of JBoss Enterprise Application Platform, so using the following configuration fails with deployment errors:
<bean id="mBeanServer" class="org.jboss.mx.util.MBeanServerLocator"
factory-method="locateJBoss"/>
The workaround for this issue is to use this configuration instead:
<bean id="mbeanServer"
class="org.springframework.jmx.support.MBeanServerFactoryBean">
<property name="locateExistingServerIfPossible" value="true" />
</bean>
This information has now been added to the Snowdrop User guide Verified. The documentation change does fix the migration problems from EAP5 to EAP6. |
Description of problem: The location of MBean Server changed between EAP5 and EAP6. Version-Release number of selected component (if applicable): How reproducible: Always when user has following snippet in the configuration <bean id="mBeanServer" class="org.jboss.mx.util.MBeanServerLocator" factory-method="locateJBoss"/> Actual results: I fails with deployment errors: 13:21:49,089 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.ra.deployer.spring-jmx-rar: org.jboss.msc.service.StartException in service jboss.ra.deployer.spring-jmx-rar: Failed to start RA deployment [spring-jmx-rar] at org.jboss.as.connector.metadata.deployment.ResourceAdapterDeploymentService.start(ResourceAdapterDeploymentService.java:101) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_27] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_27] at java.lang.Thread.run(Thread.java:662) [:1.6.0_27] Caused by: org.jboss.jca.deployers.common.DeployException: IJ020051: Unable to start org.springframework.jca.context.SpringContextResourceAdapter at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.startContext(AbstractResourceAdapterDeployer.java:350) at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:2097) at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:1020) at org.jboss.as.connector.metadata.deployment.ResourceAdapterDeploymentService$AS7RaDeployer.doDeploy(ResourceAdapterDeploymentService.java:153) at org.jboss.as.connector.metadata.deployment.ResourceAdapterDeploymentService.start(ResourceAdapterDeploymentService.java:99) ... 5 more Caused by: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.jboss.mx.util.MBeanServerLocator] for bean with name 'mBeanServer' defined in class path resource [META-INF/applicationContext.xml]; nested exception is java.lang.ClassNotFoundException: org.jboss.mx.util.MBeanServerLocator from [Module "deployment.spring-jmx-rar.rar:main" from Service Module Loader] at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1261) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:624) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:573) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1330) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:896) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:566) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425) at org.springframework.jca.context.SpringContextResourceAdapter.createApplicationContext(SpringContextResourceAdapter.java:175) at org.springframework.jca.context.SpringContextResourceAdapter.start(SpringContextResourceAdapter.java:153) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_27] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_27] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_27] at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_27] at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.startContext(AbstractResourceAdapterDeployer.java:346) ... 9 more Caused by: java.lang.ClassNotFoundException: org.jboss.mx.util.MBeanServerLocator from [Module "deployment.spring-jmx-rar.rar:main" from Service Module Loader] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103) at org.springframework.util.ClassUtils.forName(ClassUtils.java:257) at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:408) at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1282) at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1253) ... 23 more Expected results: It passes Additional info: This is a supposed workaround: <bean id="mbeanServer" class="org.springframework.jmx.support.MBeanServerFactoryBean"> <property name="locateExistingServerIfPossible" value="true" /> </bean>