JBoss ON agent's JBoss AS plug-in does not discover server when startup path or class path does not specify a drive letter and start script is executed from a different directory then %JBOSS_HOME%\bin

Solution Verified - Updated -

Issue

  • Agent does not inventory JBoss Enterprise Application Platform (EAP) version on server
  • Server resource is not discovered and the agent logs the following error:

    ERROR [ResourceDiscoveryComponent.invoker.daemon-1] (org.rhq.plugins.jbossas5.ApplicationServerDiscoveryComponent)- Failed to process JBoss AS command line: [C:\Program Files\Java\jre6\bin\java, -Djava.net.preferIPv4Stack=true, -Dprogram.name=run, -server, -Djava.endorsed.dirs=/opt/jboss/eap/jboss-eap-5.1/jboss-as\lib\endorsed, -classpath, /opt/jboss/eap/jboss-eap-5.1/jboss-as\bin\run.jar, org.jboss.Main, -c, default, -b, 0.0.0.0]
    java.lang.Exception: Could not determine JBossAS home dir - classpath is: [/opt/jboss/eap/jboss-eap-5.1/jboss-as\bin\run.jar]
        at org.rhq.plugins.jbossas5.helper.JBossInstanceInfo.getHomeDir(JBossInstanceInfo.java:263)
        at org.rhq.plugins.jbossas5.helper.JBossInstanceInfo.finalizeSysProps(JBossInstanceInfo.java:271)
        at org.rhq.plugins.jbossas5.helper.JBossInstanceInfo.<init>(JBossInstanceInfo.java:90)
        at org.rhq.plugins.jbossas5.ApplicationServerDiscoveryComponent.discoverExternalJBossAsProcesses(ApplicationServerDiscoveryComponent.java:267)
        at org.rhq.plugins.jbossas5.ApplicationServerDiscoveryComponent.discoverResources(ApplicationServerDiscoveryComponent.java:170)
        at sun.reflect.GeneratedMethodAccessor39.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:293)
        ...
    
  • JBoss application server instances are not discovered

Environment

  • JBoss Operations Network (ON) 3.0.1, 3.1, 3.1.1, 3.1.2
  • JBoss Application Server (AS) 5 plug-in for JBoss ON
  • Microsoft Windows
  • Affected JBoss AS instance running with a class path entry for run.jar using a path with no drive letter - ... -classpath \opt\jboss\eap\jboss-eap-5.1\jboss-as\bin\run.jar ...
  • Affected JBoss AS instance started from a working directory or CWD that does not contain the file run.jar and is not the file system root directory relevant to the class path entry for run.jar. For example:

    cd D:\opt
    D:\opt\jboss\eap\jboss-eap-5.1\bin\run -c default
    

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content