You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2017/09/08 11:49:58 UTC

[Bug 61503] New: JarWarResourceSet finds META-INF/ jar entries that do not exist leading to FileNotFoundException

https://bz.apache.org/bugzilla/show_bug.cgi?id=61503

            Bug ID: 61503
           Summary: JarWarResourceSet finds META-INF/ jar entries that do
                    not exist leading to FileNotFoundException
           Product: Tomcat 8
           Version: 8.5.14
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: awilkinson@pivotal.io
  Target Milestone: ----

I believe that the fix for https://bz.apache.org/bugzilla/show_bug.cgi?id=60940
has introduced a regression. When a JSF-based application is run from a war
archive (either using unpackWARs=false or Tomcat embedded in an executable war
with Spring Boot) the application will fail to start if it depends on H2. The
failure occurs because H2's jar file does not contain a META-INF/ directory
entry; it only contains entries for the two files beneath the directory. This
leads to a FileNotFoundException when calling getJarFile() on the connection to
the URL for the resource:

Caused by: java.io.FileNotFoundException: JAR entry META-INF/ not found in
/var/folders/zq/v6xkr2696kv05jbf3bddt9680000gn/T/jar_cache4058734571815148022.tmp
        at
sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:142)
~[na:1.8.0_141]
        at
sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:89)
~[na:1.8.0_141]
        at com.sun.faces.facelets.util.Classpath.search(Classpath.java:145)
~[jsf-impl-2.2.7.jar!/:2.2.7]
        at com.sun.faces.facelets.util.Classpath.search(Classpath.java:109)
~[jsf-impl-2.2.7.jar!/:2.2.7]
        at
com.sun.faces.config.configprovider.MetaInfFacesConfigResourceProvider.loadURLs(MetaInfFacesConfigResourceProvider.java:164)
~[jsf-impl-2.2.7.jar!/:2.2.7]
        at
com.sun.faces.config.configprovider.MetaInfFacesConfigResourceProvider.getResources(MetaInfFacesConfigResourceProvider.java:108)
~[jsf-impl-2.2.7.jar!/:2.2.7]
        ... 15 common frames omitted

A sample application that reproduces the problem is available in this Spring
Boot issue: https://github.com/spring-projects/spring-boot/issues/10232

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 61503] JarWarResourceSet finds META-INF/ jar entries that do not exist leading to FileNotFoundException

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61503

--- Comment #2 from Andy Wilkinson <aw...@pivotal.io> ---
I think I understand the problem well enough to create a much simpler sample
that reproduces the problem. Let me know if that would be useful and I'll see
what I can manage.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 61503] JarWarResourceSet finds META-INF/ jar entries that do not exist leading to FileNotFoundException

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61503

--- Comment #1 from Mark Thomas <ma...@apache.org> ---
This would be easier to investigate with a WAR I could deploy in a standard
Tomcat instance but when I try that with the provided sample it appears no
initialization occurs. I haven't (yet) dug into why.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 61503] JarWarResourceSet finds META-INF/ jar entries that do not exist leading to FileNotFoundException

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61503

--- Comment #3 from Mark Thomas <ma...@apache.org> ---
Thanks. Let me get back to you on that offer.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 61503] JarWarResourceSet finds META-INF/ jar entries that do not exist leading to FileNotFoundException

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61503

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #4 from Mark Thomas <ma...@apache.org> ---
Fixed in:
- trunk for 9.0.0.M27 onwards
- 8.5.x for 8.5.21 onwards
- 8.0.x for 8.0.47 onwards

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org