Summary: | java.lang.NoSuchFieldError regression from earlier 4.0.0 snapshot | ||
---|---|---|---|
Product: | gcc | Reporter: | Caolan McNamara <caolanm> |
Component: | libgcj | Assignee: | Tom Tromey <tromey> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | aph, gcc-bugs, java-prs |
Priority: | P2 | ||
Version: | 4.0.0 | ||
Target Milestone: | 4.0.0 | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2005-04-14 13:20:55 | |
Attachments: |
sample source
sample jar |
Description
Caolan McNamara
2005-04-14 12:06:05 UTC
Created attachment 8628 [details]
sample source
Created attachment 8629 [details]
sample jar
version of failing gcj gcc (GCC) 4.0.0 20050412 (Red Hat 4.0.0-0.42) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. version of successful gcj gcc (GCC) 4.0.0 20050405 (Red Hat 4.0.0-0.40) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. affects db-4.2 as well for what it's worth With 4.1 (20050412) I get: g++ -g -lgcj java.cxx ./a.out java.lang.ClassNotFoundException: Lcom.sun.star.uno.Type; <<No stacktrace available>> 4.0 (20050413) indeed throws java.lang.NoSuchFieldError For 4.0, my recent system class loader patch works around this problem. The attached patch should go in the trunk asap. I looked at all other users of _Jv_FindClassFromSignature, and this was the only problem caller. Do you want me to post the patch, then? This was "fixed" by the following patch on the 4.0 branch (20050414): 2005-04-14 Tom Tromey <tromey@redhat.com> * java/lang/natClassLoader.cc (_Jv_FindClass): Use system loader, not boot loader. (_Jv_RegisterInitiatingLoader): Likewise. (_Jv_UnregisterInitiatingLoader): Likewise. This was worked around for 4.0. I'm checking in Andrew's patch for the trunk. Subject: Bug 21020 CVSROOT: /cvs/gcc Module name: gcc Changes by: tromey@gcc.gnu.org 2005-04-26 20:52:35 Modified files: libjava : ChangeLog jni.cc Log message: 2005-04-26 Andrew Haley <aph@redhat.com> PR libgcj/21020: * jni.cc (_Jv_JNI_GetAnyFieldID): Use class' loader to find field's type. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&r1=1.3557&r2=1.3558 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/jni.cc.diff?cvsroot=gcc&r1=1.97&r2=1.98 Subject: Bug 21020 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-4_0-branch Changes by: tromey@gcc.gnu.org 2005-08-24 18:04:56 Modified files: libjava : ChangeLog jni.cc Log message: 2005-04-26 Andrew Haley <aph@redhat.com> PR libgcj/21020: * jni.cc (_Jv_JNI_GetAnyFieldID): Use class' loader to find field's type. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.3391.2.93&r2=1.3391.2.94 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/jni.cc.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.95&r2=1.95.2.1 |