c.c and IBM JDK?

88 kali dilihat
Langsung ke pesan pertama yang belum dibaca

David Andrews

belum dibaca,
6 Sep 2009, 08.13.0706/09/09
kepadaClojure
Is there a known problem with the IBM JDK and clojure-contrib?

I first encountered errors when trying to load pprint under the 1.5
IBM JDK on a zSeries system:

JVMJZBL1023N Invoking clojure.main.main()...
JVMJZBL2010E Exception occurred invoking clojure.main.main()
JVMJZBL2007E Stack trace follows:
java.lang.ClassFormatError: (clojure/contrib/pprint/PrettyWriter)
field name is invalid at offset=0 (pprint.clj:6)

I thought it might be an issue with the 1.5 JDK (which is all I have
on my zSeries box), so I reproduced the problem with both the 1.5 and
1.6 level IBM JDKs under Linux x86. clojure-contrib simply won't
build with the IBM JDK in the system:

$ ant -Dclojure.jar=../clojure/clojure.jar
...
compile_classes:
[java] Compiling clojure.contrib.pprint.ColumnWriter to /home/dba/
src/clojure-contrib/classes
[java] java.lang.ClassFormatError: JVMCFRE114 field name is
invalid; class=clojure/contrib/pprint/ColumnWriter, offset=0
(ColumnWriter.clj:36)
...
compile_clojure:
[java] java.lang.ClassFormatError: JVMCFRE114 field name is
invalid; class=clojure/contrib/condition/Condition, offset=0
(condition.clj:14)

Any ideas how can I proceed? I'm stuck with the IBM JDK on the IBM
box.

triddell

belum dibaca,
6 Sep 2009, 20.56.3106/09/09
kepadaClojure
This is issue #104 (which was called #100 in the old system.)

http://www.assembla.com/spaces/clojure/tickets/104-GC-Issue-100--gen-class-creating-non-compliant-field-names-

A simple patch was originally suggested here:

http://groups.google.com/group/clojure/browse_thread/thread/e64719d716c29ce0

This patch fixed the issue for me on the IBM JDK. I'll submit a patch
this time.

David Andrews

belum dibaca,
7 Sep 2009, 05.37.1107/09/09
kepadaClojure

triddell wrote:
> This patch fixed the issue for me on the IBM JDK.

Sadly, not for me! (IBM 1.5.0) c/c/pprint/ColumnWriter still fails
with:
[java] java.lang.ClassFormatError: (clojure/contrib/pprint/
ColumnWriter) field name is invalid at offset=0 (ColumnWriter.clj:36)

... during contrib build with genclass.clj modified to use \$ in place
of \-

Michael Reid

belum dibaca,
7 Sep 2009, 18.36.3707/09/09
kepadaclo...@googlegroups.com

I took another look at this. I believe the issue is that my original
change was a quick-fix and doesn't really handle all cases.

The issue that Dave is hitting seems to be occurring because of the
default prefix character of '-' for the genclass methods. If I change
the prefix character in clojure/contrib/pprint/ColumnWriter.clj to _
and change the corresponding defn-s, then it seems to accept the
class.

I went digging through genclass.clj to try and make this fix more
robust but I haven't been able to fully understand where this needs to
go yet. Still digging...

/mike.

Balas ke semua
Balas ke penulis
Teruskan
0 pesan baru