harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Ivanov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-428) [classlib] java.lang.reflect.Proxy.newProxyInstance(ClassLoader,Class[], InvocationHandler) throws unspesified java.lang.ClassFormatError
Date Fri, 01 Sep 2006 03:50:25 GMT
    [ http://issues.apache.org/jira/browse/HARMONY-428?page=comments#action_12432040 ] 
            
Vladimir Ivanov commented on HARMONY-428:
-----------------------------------------

Seems, it still reproducible (for IBM VM only):

================= test.java =======================
import java.beans.EventHandler; 
import java.util.EventObject; 
import java.util.EventListener; 
import java.lang.reflect.Proxy; 

public class test { 
    public static void main(String argv[]) { 
        Proxy.newProxyInstance(new Target().getClass().getClassLoader(), new Class[] { FredListener.class
}, 
               new EventHandler(new Target(), "meth1", null, null)); 
    
    } 
} 

interface FredListener extends EventListener { 
    public void fireFredEvent(FredEvent event); 
} 

class Target { 
    public void meth1() {} 
    public void meth2(int i) {} 

} 

class FredEvent extends EventObject { 
    static int i = 0; 
    public FredEvent(Object arg) { 
        super(arg); 
    } 
    public static int getI() { 
        return i; 
    } 
    public static void setI(int j) { 
        i = j; 
    } 
} 
===============================================

Output:
C:\tmp\tmp17>C:\jdk1.5.0_06\bin\java.exe -cp . -showversion test
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)


C:\tmp\tmp17>C:\jrockit-jdk1.5.0-windows-ia32\bin\java.exe -cp . -showversion test
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System optimized
over throughput (initial strategy singleparpar))


C:\tmp\tmp17>C:\harmony\classlib1.5\deploy\jdk\jre\bin\java.exe -cp . -showversion test
java version 1.5 (subset)

(c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
Exception in thread "main" java.lang.ClassFormatError: (/$Proxy0) class name is invalid at
offset=0
        at java.lang.reflect.Proxy.defineClassImpl(Native Method)
        at java.lang.reflect.Proxy.getProxyClass(Proxy.java:150)
        at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:189)
        at test.main(test.java:8)

C:\tmp\tmp17>C:\harmony\drlvm1.5\build\win_ia32_msvc_debug\deploy\jre\bin\java -Dvm.assert_dialog=false
-cp . -showversion test
java version "1.5.0"
pre-alpha : not complete or compatible
svn = r438744, (Aug 31 2006), Windows/ia32/msvc 1310, debug build
http://incubator.apache.org/harmony

C:\tmp\tmp17>C:\harmony\drlvm1.5\build\win_ia32_msvc_release\deploy\jre\bin\java -Dvm.assert_dialog=false
-cp . -showversion test
java version "1.5.0"
pre-alpha : not complete or compatible
svn = r438744, (Aug 31 2006), Windows/ia32/msvc 1310, release build
http://incubator.apache.org/harmony


> [classlib] java.lang.reflect.Proxy.newProxyInstance(ClassLoader,Class[], InvocationHandler)
throws unspesified java.lang.ClassFormatError
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-428
>                 URL: http://issues.apache.org/jira/browse/HARMONY-428
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Svetlana Samoilenko
>            Priority: Minor
>         Attachments: ProxyTest.java
>
>
> The test shows that Proxy.newProxyInstance(ClassLoader loader,Class[] interfaces, InvocationHandler
h) throws unspesified java.lang.ClassFormatError while on BEA 1.5 it passes. Error is in the
native method defineClassImpl.
>  
> Output on BEA 1.5:
> .
> Time: 0,109
> OK (1 test)
>  
> Output on Harmony:
> .E
> There was 1 error:
> 1) test_newProxyInstance_ClassLoader_Class_InvocationHandler(ProxyTest)java.lang.ClassFormatError:
(/$Proxy0) class name is invalid at offset=0
>         at java.lang.reflect.Proxy.defineClassImpl(Native Method)
>         at java.lang.reflect.Proxy.getProxyClass(Proxy.java:112)
>         at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:150)
>         at ProxyTest.test_newProxyInstance_ClassLoader_Class_InvocationHandler(ProxyTest.java:9)
>         at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:205)
> FAILURES!!!
> Tests run: 1,  Failures: 0,  Errors: 1 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message