You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Tim Ellison (JIRA)" <ji...@apache.org> on 2010/09/27 15:15:33 UTC

[jira] Closed: (HARMONY-6057) Class.forName() throws java.lang.IndexOutOfBoundsException

     [ https://issues.apache.org/jira/browse/HARMONY-6057?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Ellison closed HARMONY-6057.
--------------------------------

         Assignee: Tim Ellison
    Fix Version/s: 5.0M16
       Resolution: Cannot Reproduce

Vincent,

This bug no longer appears in Harmony 5.0M15, which prints out

java.lang.ClassNotFoundException: foo.bar.com
	at java.net.URLClassLoader.findClass(URLClassLoader.java:907)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:488)
	at java.lang.ClassLoader$SystemClassLoader.loadClass(ClassLoader.java:870)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:267)
	at java.lang.Class.forName(Class.java:129)
	at java.lang.Class.forName(Class.java:89)
	at ClassLoad.main(ClassLoad.java:9)

Feel free to re-open the issue if you still have problems.


> Class.forName() throws java.lang.IndexOutOfBoundsException
> ----------------------------------------------------------
>
>                 Key: HARMONY-6057
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6057
>             Project: Harmony
>          Issue Type: Bug
>          Components: JDK
>    Affects Versions: 5.0M8
>            Reporter: Vincent Siveton
>            Assignee: Tim Ellison
>             Fix For: 5.0M16
>
>
> Using latest harmony (r713673), I notified that calling Class.forName( "foo.bar.com" ); throws IndexOutOfBoundsException.
> Here is the stacktrace:
> {noformat}
> http://harmony.apache.org
> Uncaught exception in main:
> java.lang.IndexOutOfBoundsException
> 	at java.nio.ByteBuffer.wrap(ByteBuffer.java:110)
> 	at java.util.jar.InitManifest.decode(InitManifest.java:210)
> 	at java.util.jar.InitManifest.readValue(InitManifest.java:201)
> 	at java.util.jar.InitManifest.readHeader(InitManifest.java:117)
> 	at java.util.jar.InitManifest.<init>(InitManifest.java:56)
> 	at java.util.jar.Manifest.read(Manifest.java:223)
> 	at java.util.jar.Manifest.<init>(Manifest.java:116)
> 	at java.util.jar.JarFile.getManifest(JarFile.java:268)
> 	at java.net.URLClassLoader.createURLJarHandler(URLClassLoader.java:1044)
> 	at java.net.URLClassLoader.makeNewHandler(URLClassLoader.java:997)
> 	at java.net.URLClassLoader.getHandler(URLClassLoader.java:980)
> 	at java.net.URLClassLoader.findClassImpl(URLClassLoader.java:1189)
> 	at java.net.URLClassLoader$4.run(URLClassLoader.java:888)
> 	at java.net.URLClassLoader$4.run(URLClassLoader.java:1)
> 	at java.security.AccessController.doPrivilegedImpl(AccessController.java:171)
> 	at java.security.AccessController.doPrivileged(AccessController.java:64)
> 	at java.net.URLClassLoader.findClass(URLClassLoader.java:885)
> 	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 java.lang.Class.forName(Class.java:130)
> 	at java.lang.Class.forName(Class.java:90)
> 	at test.Test.main(Test.java:32)
> {noformat}
> Here is the dummy code:
> {noformat}
> public class Test
> {
>     public static void main( String[] args )
>         throws Exception
>     {
>         System.out.println( System.getProperty( "java.vendor.url" ) );
>         Class.forName( "foo.bar.com" );
>     }
> }
> {noformat}
> This project uses only one dependency: icu4j [1]. I tried with some other icu4j distributions [2] with success.
> [1] http://repo2.maven.org/eclipse/com/ibm/icu/com.ibm.icu/3.4.5/com.ibm.icu-3.4.5.jar
> [2] http://repo2.maven.org/maven2/com/ibm/icu/icu4j/

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