Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-1957

URLDeploymentScanner fails if an invalid file URL is deployed, although other URLs are accessible and valid

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • JBossAS-4.0.3RC2
    • JBossAS-4.0.2 Final
    • Deployers
    • None

    Description

      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("/"))

      { // treat URL as a collection URLLister lister = factory.createURLLister(url); urlsToDeploy.addAll(lister.listMembers(url, filter, doRecursiveSearch)); }

      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

      Attachments

        Issue Links

          Activity

            People

              dandread1@redhat.com Dimitrios Andreadis
              wv-javacoder Roland Räz (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: