Description of problem: An AS instance which uses a URL for its system property jboss.server.home.dir can not be discovered because the plug-in claims the configuration directory does not exist or is not a directory: Skipping discovery for JBoss AS process process: pid=[12255], name=[java], ppid=[12251], because configuration dir 'file:///opt/jboss/jboss-eap-5.1/jboss-as/server/default' does not exist or is not a directory. Version-Release number of selected component (if applicable): RHQ 3.0.1 How reproducible: Always Steps to Reproduce: 1. Start an EAP 5 instance using ./run.sh -c default -b 0.0.0.0 -Djboss.server.home.dir=file:///opt/jboss/eap/jboss-eap-5.1/jboss-as/server/default 2. Force a discovery scan for the agent running on the platform for this EAP server Actual results: EAP 5 instance is not discovered and agent logs the following warning: WARN [ResourceDiscoveryComponent.invoker.daemon-837] (org.rhq.plugins.jbossas5.ApplicationServerDiscoveryComponent)- Skipping discovery for JBoss AS process process: pid=[6314], name=[/usr/lib/jvm/java-1.6.0-sun-1.6.0.24/bin/java], ppid=[6267], because configuration dir 'file:/opt/jboss/eap/jboss-eap-5.1/jboss-as/server/default does not exist or is not a directory. Expected results: EAP 5 instance should be discovered and no warning is logged Additional info: This issue is caused by the assumption that the value for jboss.server.home.dir is a File. Instead, we should account for the possibility that a URL is provided instead of a file system path.