Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.6RC3, JRuby 1.6
-
Fix Version/s: JRuby 1.6.1
-
Component/s: None
-
Labels:None
-
Environment:Windows, IBM JDK6
-
Number of attachments :
Description
When run the jruby under IBM java 6, java.lang.ClassFormatError pop up. followings are the details
to trigger the problem, just run a rake session, even without a rakefile
>jruby -S rake -T
ClassLoader.java:265:in `defineClass': java.lang.ClassFormatError:
JVMCFRE068 class name is invalid; class=rubyjit
$initialize_9FFD7936C93B2FA4E78CC51FF56BE551BF6DD8A6#block_0$RUBY
$_file_, offset=0
from JRubyClassLoader.java:76:in `defineClass'
from InvocationMethodFactory.java:1351:in `endClassWithBytes'
from InvocationMethodFactory.java:1335:in `endCallWithBytes'
from InvocationMethodFactory.java:832:in `getBlockCallback'
from RuntimeHelpers.java:165:in `createBlockCallback'
from RuntimeHelpers.java:262:in `createCompiledBlockBody'
from RuntimeHelpers.java:252:in `createCompiledBlockBody'
from RuntimeCache.java:421:in `createBlockBody'
from RuntimeCache.java:66:in `getBlockBody'
from AbstractScript.java:93:in `getBlockBody0'
from D:/jruby/lib/ruby/site_ruby/1.8/rubygems/requirement.rb:97:in
`_file_'
from D:/jruby/lib/ruby/site_ruby/1.8/rubygems/requirement.rb:-1:in
`_file_'
...
jruby -v
jruby 1.6.0 (ruby 1.8.7 patchlevel 330) (2011-03-15 f3b6154) (IBM J9
VM 1.6.0) [Windows XP-x86-java]
java version
>%JAVA_HOME%\bin\java -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build pwi3260sr1-20080416_01(SR1))
IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 Windows XP x86-32
jvmwi3260-20080415_18762 (JIT enabled, AOT enabled)
J9VM - 20080415_018762_lHdSMr
JIT - r9_20080415_1520
GC - 20080415_AA)
JCL - 20080412_01
Also encountering this issue, which appears to be a regression (1.5.6 was working great on the IBM JVM).
Here's my JVM:
And the bug can easily be reproduced as follows:
C:\Users\alexbcoles\>jruby -e "class A;def to_world;puts 'hello';end;end;" ClassLoader.java:265:in `defineClass': java.lang.ClassFormatError: JVMCFRE068 Kl assenname ist ungültig.; Klasse=ruby$__dash_e__#method__1$RUBY$to_world, Offset= 0 from JRubyClassLoader.java:76:in `defineClass' from InvocationMethodFactory.java:1351:in `endClassWithBytes' from InvocationMethodFactory.java:1335:in `endCallWithBytes' from InvocationMethodFactory.java:255:in `getCompiledMethod' from RuntimeHelpers.java:1700:in `constructNormalMethod' from RuntimeHelpers.java:351:in `def' from -e:1:in `class_0$RUBY$A' from -e:1:in `__file__' from -e:-1:in `load' from Ruby.java:670:in `runScript' from Ruby.java:574:in `runNormally' from Ruby.java:423:in `runFromMain' from Main.java:278:in `doRunFromMain' from Main.java:198:in `internalRun' from Main.java:164:in `run' from Main.java:148:in `run' from Main.java:128:in `main'(Sorry, the error description is in German as I am on a German version of Windows, but it means "invalid class name")