-
Bug
-
Resolution: Done
-
Minor
-
JBossAS-4.0.2 Final
-
None
Hi,
URLDeploymentScanner fails completely, when an invalid file URL (that points to a directory) is listed in the MBean attribute called "URLs" although other URLs are ok and can be deployed.
For example
Configuration in the file jboss-service.xml
<mbean code="org.jboss.deployment.scanner.URLDeploymentScanner"
name="jboss.deployment:type=DeploymentScanner,flavor=URL">
....
<attribute name="URLs">
${eplatform.jboss.services.url}/standard-invoker-service.xml,
${eplatform.jboss.services.url}/jbossweb-tomcat55/,
${eplatform.jboss.services.url}/jboss-ws4ee/,
${eplatform.jboss.services.url}/jmx-console/,
${eplatform.jboss.services.url}/managementxxx/,
${eplatform.jboss.services.url}/ear-deployer.xml,
${eplatform.jboss.services.url}/ejb-deployer.xml,
${eplatform.jboss.services.url}/jbossjca-service.xml,
${eplatform.jboss.services.url}/jmx-invoker-service.xml,
${eplatform.jboss.services.url}/bsh-deployer.xml,
${eplatform.jboss.services.url}/jboss-local-jdbc.rar,
${eplatform.jboss.services.url}/jms/,
${eplatform.jboss.services.url}/business-jndi-alias-service.xml,
deploy/
</attribute>
...
</mbean>
The following stack trace is thrown:
17:52:27,610 ERROR [AbstractDeploymentScanner$ScannerThread] Scanning failed; continuing
java.io.FileNotFoundException: C:\jboss\4.0\services_unix\managementxxx
at org.jboss.net.protocol.file.FileURLLister.listMembers(FileURLLister.java:38)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:399)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:277)
Nothing is deployed, although the other urls are valid and they could be deployed.
Code in the URLDeploymentScanner
public synchronized void scan() throws Exception
{
...
synchronized (urlList)
{
for (Iterator i = urlList.iterator(); i.hasNext()
{
URL url = (URL) i.next();
if (url.toString().endsWith("/"))
else
{ // treat URL as a deployable unit urlsToDeploy.add(url); } }
}
lister.listMembers(url, filter, doRecursiveSearch) should be invoked inside a "try/catch -bracket".
In my opinion JBoss should log that the URL is not accessible and then go foward and try to deploy the other URLs
Regards
Karin
- is related to
-
JBAS-1759 NPE in URLDeploymentScanner
- Closed