harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vasily Zakharov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-4896) [classlib] Classes can't be loaded from a cyrillic path
Date Wed, 03 Oct 2007 15:37:51 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-4896?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12532138
] 

Vasily Zakharov commented on HARMONY-4896:
------------------------------------------

Here's another reproducer:

public class Test {
    public static void main(String[] args) throws Exception {
        try {
            Class.forName("A");
            System.out.println("SUCCESS");
        } catch (Exception e) {
            e.printStackTrace(System.out);
        }
    }
}
public class A {
}

Put class A to some cyrillc-named directory (e. g, тест), and put class Test to some latin-named
directory. Go to the directory where class Test resides and run:

java -cp .;тест Test

Output on RI:

SUCCESS

Output on DRLVM:

Failed to initialize system class loader.
** During system class loader initialization uncaught exception: java/lang/ExceptionInInitializerError

java/lang/ExceptionInInitializerError : (null)
 at java.nio.charset.Charset$1.run (Charset.java: 119)
 at java.nio.charset.Charset$1.run (Charset.java: 1)
 at java.security.AccessController.doPrivilegedImpl (Unknown Source)
 at java.security.AccessController.doPrivileged (Unknown Source)
 at java.nio.charset.Charset.<clinit> (Charset.java: 117)
 at java.lang.String.getCharset (String.java: 895)
 at java.lang.String.getBytes (String.java: 883)
 at org.apache.harmony.luni.util.Util.getUTF8Bytes (Util.java: 69)
 at java.io.File.properPath (File.java: 1184)
 at java.io.File.getAbsolutePath (File.java: 455)
 at java.io.File.getAbsoluteFile (File.java: 467)
 at java.lang.ClassLoader$SystemClassLoader.<clinit> (Unknown Source)
 at java.lang.ClassLoader.initSystemClassLoader (Unknown Source)
 at java.lang.ClassLoader.getSystemClassLoader (Unknown Source)
caused by

java/lang/NullPointerException : (null)
 at java.lang.Runtime.loadLibrary0 (Unknown Source)
 at java.lang.System.loadLibrary (Unknown Source)
 at org.apache.harmony.niochar.CharsetProviderImpl.<clinit> (CharsetProviderImpl.java:
47)
 at java.nio.charset.Charset$1.run (Charset.java: 119)
 at java.nio.charset.Charset$1.run (Charset.java: 1)
 at java.security.AccessController.doPrivilegedImpl (Unknown Source)
 at java.security.AccessController.doPrivileged (Unknown Source)
 at java.nio.charset.Charset.<clinit> (Charset.java: 117)
 at java.lang.String.getCharset (String.java: 895)
 at java.lang.String.getBytes (String.java: 883)
 at org.apache.harmony.luni.util.Util.getUTF8Bytes (Util.java: 69)
 at java.io.File.properPath (File.java: 1184)
 at java.io.File.getAbsolutePath (File.java: 455)
 at java.io.File.getAbsoluteFile (File.java: 467)
 at java.lang.ClassLoader$SystemClassLoader.<clinit> (Unknown Source)
 at java.lang.ClassLoader.initSystemClassLoader (Unknown Source)
 at java.lang.ClassLoader.getSystemClassLoader (Unknown Source)
HMYEXEL062E Внутренняя ошибка VM: Не удалось создать Java
VM
FAILED to invoke JVM.

Output on IBM VME:

java.lang.ClassNotFoundException: A
        at java.lang.Class.forName(Class.java:129)
        at Test.main(Test.java:4)

So, this issue seems to be a classlib issue indeed, not a VM or launcher problem.

Also, it seems an additional issue exists in DRLVM that causes the behavior different from
IBM VME.


> [classlib] Classes can't be loaded from a cyrillic path
> -------------------------------------------------------
>
>                 Key: HARMONY-4896
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4896
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows XP
>            Reporter: Vasily Zakharov
>
> If the class file is located in a directory whose name contains cyrillic characters,
that class can't be loaded.
> Reproducer:
> public class Test {
>     public static void main(String[] args) throws Exception {
>         System.out.println("SUCCESS");
>     }
> }
> Create a cyrillic directory, put the reproducer there, go to that directory and run:
> C:\тест> java Test
> Output on RI:
> SUCCESS
> Output on DRLVM:
> Uncaught exception in main:
> java.lang.NoClassDefFoundError: Test
> Caused by: java.lang.ClassNotFoundException: Test
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:894)
>         at java.lang.ClassLoader.loadClass(Unknown Source)
>         at java.lang.ClassLoader$SystemClassLoader.loadClass(Unknown Source)
>         at java.lang.ClassLoader.loadClass(Unknown Source)
> FAILED to invoke JVM.
> Output on IBM VME:
> FAILED to invoke JVM.
> I suspect this is a classlib issue, as it occurs on both DRLVM and IBM VME.

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


Mime
View raw message