harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niclas Hedhman (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-6074) [classlib][luni] JAR referenced in a JAR's manifest 'Class-Path' that contains 'file' scheme URIs aren't loaded
Date Tue, 21 Apr 2009 07:29:49 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-6074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12701082#action_12701082

Niclas Hedhman commented on HARMONY-6074:

What is the status on this?
It mentions fix for 5.0M9, but AFAICT it still happens when running Maven.

> [classlib][luni] JAR referenced in a JAR's manifest 'Class-Path' that contains 'file'
scheme URIs aren't loaded
> ---------------------------------------------------------------------------------------------------------------
>                 Key: HARMONY-6074
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6074
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M8
>            Reporter: Nathan Beyer
>            Assignee: Nathan Beyer
>             Fix For: 5.0M9
>   Original Estimate: 24h
>  Remaining Estimate: 24h
> I ran into this while running Abdera's Maven build with the Harmony trunk. Surefire,
the Maven plugin that invokes unit tests, when forked (default) creates an empty JAR file
with a manifest like this.
> Manifest-Version: 1.0
> Main-Class: org.apache.maven.surefire.booter.SurefireBooter
> Class-Path: file:/C:/Users/nathan/.m2/repository/org/apache/maven/surefi
>  re/surefire-booter/2.4.2/surefire-booter-2.4.2.jar file:/C:/Users/natha
>  n/.m2/repository/org/apache/maven/surefire/surefire-api/2.4.2/surefire-
>  api-2.4.2.jar file:/C:/dev/abdera/dependencies/i18n/target/test-classes
>  / file:/C:/dev/abdera/dependencies/i18n/target/classes/ file:/C:/Users/
>  nathan/.m2/repository/junit/junit/4.3/junit-4.3.jar file:/C:/Users/nath
>  an/.m2/repository/org/apache/geronimo/specs/geronimo-activation_1.0.2_s
>  pec/1.1/geronimo-activation_1.0.2_spec-1.1.jar
> When invoked, the Harmony JRE throws the following exception.
> Uncaught exception in main:
> java.lang.ClassNotFoundException: org.apache.maven.surefire.booter.SurefireBooter
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:892)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:489)
>         at java.lang.ClassLoader$SystemClassLoader.loadClass(ClassLoader.java:871)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
>         at org.apache.harmony.vm.JarRunner.main(JarRunner.java:72)
> I did some debugging it seems the source of the issue is in the java.net.URLClassLoader
in the method 'getInternalURLs(URL,String)'. While looping over the values in 'Class-Path',
new URLs are created, but they're always created relative to the base JAR, even though the
URI entry is absolute.
> I need to read over the manifest specification and make sure that absolute URIs should
be treated differently. Regardless, the Sun RI seems to support this capability.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message