Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger The MBean class could not be loaded by the default loader repo

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are migrating JBOSS from 4.0.3SP1 to Wildfly 10.1.0.  Our applications are bundled in separate sars which contain standard as well as Dynamic beans.

We are getting " The MBean class could not be loaded by the default loader repository" exception caused by  "java.lang.ClassNotFoundException:". PEAdapter class is a Dynamic MBean and is present in one of the jars in the common modules under /opt/coreservices/wildfly-10.1.0.Final/modules. Here is complete stack trace:
^[[0m^[[31m15:01:30,324 ERROR [] (MSC service thread 1-6) Exception in PEController:PEControllerJmxJBossService start for peID 14132c58609742440160974fe69307e0: : The MBean class could not be loaded by the default loader repository
       at com.sun.jmx.mbeanserver.MBeanInstantiator.findClassWithDefaultLoaderRepository(
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.createMBean(
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.createMBean(
       at com.sun.jmx.mbeanserver.JmxMBeanServer.createMBean(
       at com.avaya.lifecycle.jmx.agent.PEControllerJmx._start(
       at com.sun.jmx.mbeanserver.MBeanSupport.postRegister(
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.postRegister(
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(
       at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(
       at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(
       at org.jboss.msc.service.ServiceControllerImpl$
       at java.util.concurrent.ThreadPoolExecutor.runWorker(
       at java.util.concurrent.ThreadPoolExecutor$
Caused by: java.lang.ClassNotFoundException:
       at com.sun.jmx.mbeanserver.ClassLoaderRepositorySupport.loadClass(

We are using standalone-full.xml to start our Wildfly  instance  (ccr2)
[root@puiqr710dev08 CCR]# ps -eaf|grep ccr2
xxxiq  28948  7529 21 15:17 ?        00:07:10 /opt/Xxx/CCR/jre/bin/java -verbose:class -Ddss.port=31002 -DCONTAINER_UUID=14132c5860baba870160bac5d84e084a -server -XX:NewRatio=1 -XX:+UseG1GC -XX:+UseLargePages -XX:MaxGCPauseMillis=1000 -XX:GCTimeRatio=10 -XX:+DisableExplicitGC -Ddss.thread_pool_size=24 -Xss250k -Xms256m -Xmx4096m -DUSE_DELAY1=60000 -DUSE_DELAY2=60000 -Dlog4j.configuration=file:/opt/Xxx/CCR/appserver/ -DLOG_FILE_PREFIX=DataProcessingJBoss_puiqdevdads07 -Ddss.message_lifetime=180 -Djava.awt.headless=true -Dorg.jboss.logging.Log4jService.catchSystemErr=false -classpath /opt/Xxx/CCR/jre/lib/tools.jar -jar /opt/coreservices/wildfly-10.1.0.Final/jboss-modules.jar -mp /opt/coreservices/wildfly-10.1.0.Final/modules -jaxpmodule javax.xml.jaxp-provider -Djboss.home.dir=/opt/coreservices/wildfly-10.1.0.Final -Djboss.server.base.dir=/opt/coreservices/wildfly-10.1.0.Final/ccr2 -c standalone-full.xml

• We have four sars that are deployed in this instance.  All sars are deployed successfully.
• We have packaged our sars as follows:
--lib (contains all jars)
• Each sar contains some standard MBeans and few Dynamic MBeans.
• We have defined standard MBeans in jboss-services.xml. They are created properly and can be seen in JConsole.
• We can NOT include definition of Dynamic MBeans  in jboss-service.xml as their name is constructed at runtime.
• PEAdapterLCM for which we are getting ClassNotFoundException is a dynamic bean and we are getting this error for all Dynamic MBeans.
• We have created modules for all common jars that were part of “server/lib” folder in JBOSS 4.0.3SP1.
We tried following to fix this error but no luck:
1) packaged contents of all sars in one single sar and deployed it.
2) Added a global module entry in standalone-full.xml which contents dynamic MBeans.
3) Added definition of dynamic MBean in jboss-service.xml (just to see if this makes any difference). With this change, we were able to see the MBean in JConsole.

So what should be done to fix this error.  Are there any changes in how to implement and deploy Dymanic MBeans in Wildfly?
Is there any way in Wildfly we can explicitly mention the MBean server class while starting the Wildfly  as it was done in JBOSS 4.0.3SP1 using " -Djboss.platform.mbeanserver"

Thanks for help in advance.
Bras cause cancer. And tiny ads:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic