• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Exception while adding folder to JBOSS_CLASSPATH

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have java class files stored in classes folder which is not in the classpath and i added the classpath in a seperate batch file as folows

JBOSS_CLASSPATH=%C:/CLASSES%

And I ran in to the following

Failed to boot JBoss:
java.lang.RuntimeException: Cannot create MBeanServer
at org.jboss.mx.server.MBeanServerImpl.<init>(MBeanServerImpl.java:224)
at org.jboss.mx.server.MBeanServerBuilderImpl.newMBeanServer(MBeanServerBuilderImpl.java:56)
at javax.management.MBeanServerFactory.createMBeanServerImpl(MBeanServerFactory.java:207)
at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:44)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:369)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:315)
at org.jboss.Main.boot(Main.java:195)
at org.jboss.Main$1.run(Main.java:463)
at java.lang.Thread.run(Thread.java:534)
Caused by: javax.management.NotCompliantMBeanException: Cannot register MBean: JMImplementation:type=MBeanServerDelegate
at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:300)
at org.jboss.mx.server.MBeanServerImpl.<init>(MBeanServerImpl.java:200)
... 8 more
Caused by: java.lang.NullPointerException
at org.jboss.mx.modelmbean.ModelMBeanInvoker.setModelMBeanInfo(ModelMBeanInvoker.java:170)
at org.jboss.mx.modelmbean.XMBean.<init>(XMBean.java:241)
at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:180)
... 9 more
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe setting that removes the regular JBoss class path. It looks like the MBean Server is not starting which is really the main part of JBoss, so nothing after that can even work.

It is like it no longer has the jars that are in the Where_You_Installed_JBoss\lib are in the classpath.

%JBOSS_INSTALL_DIRECTORY% is just a place holder I made up, there is no such var.

Mark
 
sowjan kumar
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Iam having my own batch file and the contents are as follows

set JB_CLASS=C:\myproject\jboss\classes //this contains all the java classes
set JBOSS_CLASSPATH=%JB_CLASS%

.\run.bat


In run.bat i see the following

echo %JBOSS_CLASSPATH%
if "%JBOSS_CLASSPATH%" == "" (
set JBOSS_CLASSPATH=%JAVAC_JAR%;%RUNJAR%
) ELSE (
set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JAVAC_JAR%;%RUNJAR%
)
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And you effectively overwrite that variable in your batch file when you put

set JBOSS_CLASSPATH=%JB_CLASS%

Try this instead


set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JB_CLASS%

Mark
 
sowjan kumar
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Mark..But still the same issue. The exception as follows

Failed to boot JBoss:
java.lang.RuntimeException: Cannot create MBeanServer
at org.jboss.mx.server.MBeanServerImpl.<init>(MBeanServerImpl.java:224)
at org.jboss.mx.server.MBeanServerBuilderImpl.newMBeanServer(MBeanServerBuilderImpl.java:56)
at javax.management.MBeanServerFactory.createMBeanServerImpl(MBeanServerFactory.java:207)
at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:44)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:369)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:315)
at org.jboss.Main.boot(Main.java:195)
at org.jboss.Main$1.run(Main.java:463)
at java.lang.Thread.run(Thread.java:534)
Caused by: javax.management.NotCompliantMBeanException: Cannot register MBean: JMImplementation:type=MBeanServerDelegate
at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:300)
at org.jboss.mx.server.MBeanServerImpl.<init>(MBeanServerImpl.java:200)
... 8 more
Caused by: java.lang.NullPointerException
at org.jboss.mx.modelmbean.ModelMBeanInvoker.setModelMBeanInfo(ModelMBeanInvoker.java:170)
at org.jboss.mx.modelmbean.XMBean.<init>(XMBean.java:241)
at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:180)
... 9 more
Press any key to continue . . .
 
sowjan kumar
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot Mark. Solved this issue by cleaning the classes inside JB_CLASS folder. I had some .xml and .properties file inside that and after removign that it worked fine.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic