You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Nathan Beyer (JIRA)" <ji...@apache.org> on 2009/01/21 06:36:59 UTC
[jira] Created: (HARMONY-6074) [classlib][luni] JAR referenced in a
JAR's manifest 'Class-Path' that contains 'file' scheme URIs aren't loaded
[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
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.
[jira] Resolved: (HARMONY-6074) [classlib][luni] JAR referenced in
a JAR's manifest 'Class-Path' that contains 'file' scheme URIs aren't
loaded
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Ellison resolved HARMONY-6074.
----------------------------------
Resolution: Fixed
Applied Sean's v2 fix to LUNI module at repo revision r777687.
Nathan, can you retry the failing app to verify this fix?
> [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
>
> Attachments: HARMONY-6074-V2.diff, HARMONY-6074.diff
>
> 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.
[jira] Commented: (HARMONY-6074) [classlib][luni] JAR referenced in
a JAR's manifest 'Class-Path' that contains 'file' scheme URIs aren't
loaded
Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665715#action_12665715 ]
Nathan Beyer commented on HARMONY-6074:
---------------------------------------
Okay, I've figured it out. The RI must be be using the URL(URL,String) constructor and using the JAR's URL as the context (first param) and the URI in the 'Class-Path' value as the spec (second param).
This code on RI and Harmony
URL base = new URL("file:///C:/base/");
System.out.println(new URL(base, "file:/C:/spec"));
Produces the following output
file:/C:/spec
I'm going to do some more testing, but I think this will solve the issue.
> [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.
[jira] Updated: (HARMONY-6074) [classlib][luni] JAR referenced in a
JAR's manifest 'Class-Path' that contains 'file' scheme URIs aren't loaded
Posted by "Sean Qiu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Qiu updated HARMONY-6074:
------------------------------
Attachment: HARMONY-6074-V2.diff
I've found a better solution inspired by Nathan's comments.
Could anyone take a look at the version 2 diff?
> [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
>
> Attachments: HARMONY-6074-V2.diff, HARMONY-6074.diff
>
> 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.
[jira] Commented: (HARMONY-6074) [classlib][luni] JAR referenced in
a JAR's manifest 'Class-Path' that contains 'file' scheme URIs aren't
loaded
Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713858#action_12713858 ]
Nathan Beyer commented on HARMONY-6074:
---------------------------------------
This last patch seems to resolve the issue. I'm going to post to the list and see if we can include this in M10.
> [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.0M10
>
> Attachments: HARMONY-6074-PATCH2.diff, HARMONY-6074-V2.diff, HARMONY-6074-V3.diff, HARMONY-6074.diff, simple-bean.zip
>
> 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.
[jira] Commented: (HARMONY-6074) [classlib][luni] JAR referenced in
a JAR's manifest 'Class-Path' that contains 'file' scheme URIs aren't
loaded
Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713377#action_12713377 ]
Nathan Beyer commented on HARMONY-6074:
---------------------------------------
Does the "!/" syntax only work for JAR URLs? I'm wondering if we have to consider other archive files or JAR files that don't have ".jar" suffix.
> [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.0M10
>
> Attachments: HARMONY-6074-PATCH2.diff, HARMONY-6074-V2.diff, HARMONY-6074.diff, simple-bean.zip
>
> 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.
[jira] Updated: (HARMONY-6074) [classlib][luni] JAR referenced in a
JAR's manifest 'Class-Path' that contains 'file' scheme URIs aren't loaded
Posted by "Sean Qiu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Qiu updated HARMONY-6074:
------------------------------
Attachment: HARMONY-6074-PATCH2.diff
Thanks, Nathan.
According to you test case, it will try to find the classes by the "Class-Path" in MANIFEST as below.
It will find the class in absolute path of a directory but jar file.
------------------
Main-Class: org.apache.maven.surefire.booter.SurefireBooter
Class-Path: file:/home/xiaoxia/.m2/repository/org/apache/maven/surefire/
surefire-api/2.4.3/surefire-api-2.4.3.jar file:/home/xiaoxia/.m2/reposi
tory/org/apache/maven/surefire/surefire-booter/2.4.3/surefire-booter-2.
4.3.jar file:/home/xiaoxia/temp/maventest/target/classes/ file:/home/xi
aoxia/temp/maventest/target/test-classes/ file:/home/xiaoxia/.m2/reposi
tory/junit/junit/4.4/junit-4.4.jar
-------------------
I've attached a new patch for this situation.
Could someone review it so we can commit it in M10?
> [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.0M10
>
> Attachments: HARMONY-6074-PATCH2.diff, HARMONY-6074-V2.diff, HARMONY-6074.diff, simple-bean.zip
>
> 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.
[jira] Updated: (HARMONY-6074) [classlib][luni] JAR referenced in a
JAR's manifest 'Class-Path' that contains 'file' scheme URIs aren't loaded
Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nathan Beyer updated HARMONY-6074:
----------------------------------
Attachment: simple-bean.zip
I've attached a zip file, simple-bean.zip, that contains a trivial Maven project. If you run 'mvn test -X' you can see the failure. It looks like now it's not able to load the class files from the folders referenced in the manifest.
> [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.0M10
>
> Attachments: HARMONY-6074-V2.diff, HARMONY-6074.diff, simple-bean.zip
>
> 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.
[jira] Updated: (HARMONY-6074) [classlib][luni] JAR referenced in a
JAR's manifest 'Class-Path' that contains 'file' scheme URIs aren't loaded
Posted by "Sean Qiu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Qiu updated HARMONY-6074:
------------------------------
Attachment: HARMONY-6074.diff
I've uploaed a workaround.
The isAbsolute(String) could be improved.
Commends is welcomed.
The reason Nathan's patch doesn't work is the URL is based on jar protocol.
Therefore the URL(URL context, String spec) couldn't work as expected in this case.
// Relative path
URL context = new URL("jar:file:/home/xiaoxia/temp.jar!/");
String relative = "hello.jar";
Expected result: jar:file:/home/xiaoxia/hello.jar
Actual result: jar:file:/home/xiaoxia/temp.jar!/hello.jar
// Absolute path
String absolute = "c://home/hello.jar";
Expected result: jar:file:/home/hello.jar!/
Actual result: file:/home/hello.jar
> [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
>
> Attachments: HARMONY-6074.diff
>
> 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.
[jira] Reopened: (HARMONY-6074) [classlib][luni] JAR referenced in
a JAR's manifest 'Class-Path' that contains 'file' scheme URIs aren't
loaded
Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nathan Beyer reopened HARMONY-6074:
-----------------------------------
I'm still unable to run tests with Maven due to class loading issues.
> [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.0M10
>
> Attachments: HARMONY-6074-V2.diff, HARMONY-6074.diff
>
> 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.
[jira] Commented: (HARMONY-6074) [classlib][luni] JAR referenced in
a JAR's manifest 'Class-Path' that contains 'file' scheme URIs aren't
loaded
Posted by "Sean Qiu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713473#action_12713473 ]
Sean Qiu commented on HARMONY-6074:
-----------------------------------
Here is the spec about the searched URL:
The URLs will be searched in the order specified for classes and resources after first searching in the specified parent class loader. Any URL that ends with a '/' is assumed to refer to a directory. Otherwise, the URL is assumed to refer to a JAR file which will be downloaded and opened as needed.
> [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.0M10
>
> Attachments: HARMONY-6074-PATCH2.diff, HARMONY-6074-V2.diff, HARMONY-6074-V3.diff, HARMONY-6074.diff, simple-bean.zip
>
> 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.
[jira] Updated: (HARMONY-6074) [classlib][luni] JAR referenced in a
JAR's manifest 'Class-Path' that contains 'file' scheme URIs aren't loaded
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Ellison updated HARMONY-6074:
---------------------------------
Fix Version/s: (was: 5.0M9)
5.0M10
> [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.0M10
>
> Attachments: HARMONY-6074-V2.diff, HARMONY-6074.diff
>
> 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.
[jira] Commented: (HARMONY-6074) [classlib][luni] JAR referenced in
a JAR's manifest 'Class-Path' that contains 'file' scheme URIs aren't
loaded
Posted by "Niclas Hedhman (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Commented: (HARMONY-6074) [classlib][luni] JAR referenced in
a JAR's manifest 'Class-Path' that contains 'file' scheme URIs aren't
loaded
Posted by "Sean Qiu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12712677#action_12712677 ]
Sean Qiu commented on HARMONY-6074:
-----------------------------------
I'll try the real application.
> [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.0M10
>
> Attachments: HARMONY-6074-V2.diff, HARMONY-6074.diff, simple-bean.zip
>
> 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.
[jira] Commented: (HARMONY-6074) [classlib][luni] JAR referenced in
a JAR's manifest 'Class-Path' that contains 'file' scheme URIs aren't
loaded
Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665712#action_12665712 ]
Nathan Beyer commented on HARMONY-6074:
---------------------------------------
The 'file:' scheme seems very open for interpretation. From what I can tell, on Windows, the URI "file:/C:/temp/file" URI may not be considered absolute.
> [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.
[jira] Commented: (HARMONY-6074) [classlib][luni] JAR referenced in
a JAR's manifest 'Class-Path' that contains 'file' scheme URIs aren't
loaded
Posted by "Sean Qiu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12712873#action_12712873 ]
Sean Qiu commented on HARMONY-6074:
-----------------------------------
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.apache.harmony.SimpleBeanTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.346 sec
Results :
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20 seconds
[INFO] Finished at: Tue May 26 14:25:09 CTT 2009
[INFO] Final Memory: 8M/1024M
------------------------------
Will try to supply a unit test soon.
> [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.0M10
>
> Attachments: HARMONY-6074-PATCH2.diff, HARMONY-6074-V2.diff, HARMONY-6074.diff, simple-bean.zip
>
> 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.
[jira] Commented: (HARMONY-6074) [classlib][luni] JAR referenced in
a JAR's manifest 'Class-Path' that contains 'file' scheme URIs aren't
loaded
Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12701349#action_12701349 ]
Nathan Beyer commented on HARMONY-6074:
---------------------------------------
This is probably still an issue. I haven't tested it again with the latest milestone or trunk.
> [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.
[jira] Commented: (HARMONY-6074) [classlib][luni] JAR referenced in
a JAR's manifest 'Class-Path' that contains 'file' scheme URIs aren't
loaded
Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12712739#action_12712739 ]
Nathan Beyer commented on HARMONY-6074:
---------------------------------------
If you add a folder path the test 'Class-Path', you'll see the issue that still exists. I'm guessing the patch and original code doesn't work because it always appends "!/" to the URL, but that's only valid for archives.
> [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.0M10
>
> Attachments: HARMONY-6074-V2.diff, HARMONY-6074.diff, simple-bean.zip
>
> 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.
[jira] Commented: (HARMONY-6074) [classlib][luni] JAR referenced in
a JAR's manifest 'Class-Path' that contains 'file' scheme URIs aren't
loaded
Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665710#action_12665710 ]
Nathan Beyer commented on HARMONY-6074:
---------------------------------------
According to the JAR Manifest spec [1], the URLs are supposed to be relative. However, as I mentioned, the RI seems to work just fine in this case.
[1] http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html
> [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.
[jira] Commented: (HARMONY-6074) [classlib][luni] JAR referenced in
a JAR's manifest 'Class-Path' that contains 'file' scheme URIs aren't
loaded
Posted by "Sean Qiu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12711966#action_12711966 ]
Sean Qiu commented on HARMONY-6074:
-----------------------------------
I've successfully reproduce it with a tiny test case.
Will propose a fix soon.
> [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.
[jira] Updated: (HARMONY-6074) [classlib][luni] JAR referenced in a
JAR's manifest 'Class-Path' that contains 'file' scheme URIs aren't loaded
Posted by "Sean Qiu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Qiu updated HARMONY-6074:
------------------------------
Attachment: HARMONY-6074-V3.diff
Seems we got a private API to do this.
Please take a look at the new patch(V3).
> [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.0M10
>
> Attachments: HARMONY-6074-PATCH2.diff, HARMONY-6074-V2.diff, HARMONY-6074-V3.diff, HARMONY-6074.diff, simple-bean.zip
>
> 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.
[jira] Commented: (HARMONY-6074) [classlib][luni] JAR referenced in
a JAR's manifest 'Class-Path' that contains 'file' scheme URIs aren't
loaded
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12712045#action_12712045 ]
Tim Ellison commented on HARMONY-6074:
--------------------------------------
I have reviewed HARMONY-6074-V2.diff and it looks good to me.
> [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
>
> Attachments: HARMONY-6074-V2.diff, HARMONY-6074.diff
>
> 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.
[jira] Closed: (HARMONY-6074) [classlib][luni] JAR referenced in a
JAR's manifest 'Class-Path' that contains 'file' scheme URIs aren't loaded
Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nathan Beyer closed HARMONY-6074.
---------------------------------
Resolution: Fixed
Final patch applied at r779809.
> [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.0M10
>
> Attachments: HARMONY-6074-PATCH2.diff, HARMONY-6074-V2.diff, HARMONY-6074-V3.diff, HARMONY-6074.diff, simple-bean.zip
>
> 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.