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

            Bug ID: 60033
           Summary: Jar scanning not handling properly Manifest class-path
                    attribute
           Product: Tomcat 8
           Version: 8.5.4
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Util
          Assignee: dev@tomcat.apache.org
          Reporter: kineol...@gmail.com

Running tomcat 8.5.4 on a maven project with various jars, I ended up with a
lot of errors like:
> WARNING: Failed to scan 
> [file:/home/olivier/maven/repo/net/sf/jung/jung-graph-impl/2.0.1/jung-api-2.0.1.jar]
>  from classloader hierarchy
> java.io.FileNotFoundException: 
> /home/olivier/maven/repo/net/sf/jung/jung-graph-impl/2.0.1/jung-api-2.0.1.jar 
> (No such file or directory)
> ... (stacktrace)

After some debugging, I discovered that it occurs for jars having a Manifest
file with a non-empty Class-Path attribute.

For example, jung-graph-impl-2.0.1.jar MANIFEST defines Class-Path as:
> Class-Path: jung-api-2.0.1.jar collections-generic-4.01.jar
With that, the code
(org.apache.tomcat.util.scan.StandardJarScanner#processManifest) tries to load
the jars as if located in the same directory, resulting in requests for
/home/olivier/maven/repo/net/sf/jung/jung-graph-impl/2.0.1/jung-api-2.0.1.jar,
which does not exist.
Indeed, following maven guidelines, it is located in
/home/olivier/maven/repo/net/sf/jung/jung-api/2.0.1/jung-api-2.0.1.jar.

As I am not familiar with MANIFEST, I don't know if the error comeo from a
badly defined MANIFEST, or if the manifest can reference jars outside this jar.

If Issue 59961 was complete, I could have skipped Manifest, as I don't need
them.

Thanks for the reply

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to