Bug 749170 - MBeanServer location is no longer compatible with EAP5
Summary: MBeanServer location is no longer compatible with EAP5
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise WFK Platform 2
Classification: Retired
Component: doc-Snowdrop-User-Guide
Version: 2.0.0.DR3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 2.1.0
Assignee: Isaac Rooskov
QA Contact: Karel Piwko
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-26 11:38 UTC by Karel Piwko
Modified: 2015-08-06 05:54 UTC (History)
2 users (show)

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>
Clone Of:
Environment:
Last Closed: 2013-06-27 12:18:36 UTC
Type: ---


Attachments (Terms of Use)

Description Karel Piwko 2011-10-26 11:38:19 UTC
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>

Comment 1 Rebecca Newton 2012-03-13 02:24:20 UTC
    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>

Comment 8 Isaac Rooskov 2012-11-21 05:01:59 UTC
This information has now been added to the Snowdrop User guide

Comment 10 Karel Piwko 2012-11-26 12:15:21 UTC
Verified. The documentation change does fix the migration problems from EAP5 to EAP6.


Note You need to log in before you can comment on or make changes to this bug.