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

TLD scanning throws exception if WAR inside an EAR

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Blocker Blocker
    • None
    • 6.0.0.M1
    • Web (Tomcat) service
    • None

      For AS 5.2, if you have a WAR inside an EAR, the TLD scanning will throw an exception. You will get a ZipException on Linux or a FileNotFoundException on Windows:

      13:11:12,953 ERROR [TldConfig] Exception processing JAR at resource path C:\projects\jboss5\Branch_5_x\build\output\jboss-5.
      2.0.Beta1\server\default\tmp\abbt-9bqvlk-g08c290u-1-g08c3h2e-9t\servlet-1.0.war\WEB-INF\lib\commons-collections-2.0.jar in c
      ontext /servlet
      java.io.FileNotFoundException: C:\projects\jboss5\Branch_5_x\build\output\jboss-5.2.0.Beta1\server\default\tmp\abbt-9bqvlk-g
      08c290u-1-g08c3h2e-9t\servlet-1.0.war\WEB-INF\lib\commons-collections-2.0.jar (Access is denied)
      at java.util.zip.ZipFile.open(Native Method)
      at java.util.zip.ZipFile.<init>(ZipFile.java:114)
      at java.util.jar.JarFile.<init>(JarFile.java:133)
      at java.util.jar.JarFile.<init>(JarFile.java:97)
      at org.apache.catalina.startup.TldConfig.tldScanJar(TldConfig.java:451)
      at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:305)
      at org.apache.catalina.startup.TldConfig.lifecycleEvent(TldConfig.java:734)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4308)
      at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:321)
      at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:146)
      at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:464)
      at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
      at org.jboss.web.deployers.WebModule.start(WebModule.java:97)

      It looks like the problem is that TldConfig.tldScanJar is trying to open a directory that it thinks is a JAR file. The directory is created in server\default\tmp when the EAR is exploded during deploy.

        1. simple-ear.zip
          6 kB
        2. ear-1.0.ear
          203 kB

              rmaucher Remy Maucherat
              ssilvert@redhat.com Stan Silvert
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: