Unsatisfied link error in RubyBasicObject.java IBM J9 JVM

I get the following after installing jRuby:

jruby -version
jruby 1.7.4 (1.9.3p392) 2013-05-16 2390d3b on IBM J9 VM
jvmap3260sr8-20100412 [OS/400-PowerPC]
RubyBasicObject.java:1276:in setVariableStamped': java.lang.UnsatisfiedLinkError: sun/misc/Unsafe.putOrderedObject(Ljava/lang/Object;JLjava/lang/Object;)V from RubyBasicObject.java:1237:insetVariableInternal’
from RubyBasicObject.java:1230:in setVariable' from RubyClass.java:265:inset’
from RubyBasicObject.java:1397:in variableTableStore' from RubyBasicObject.java:1465:insetInternalVariable’
from RubyStruct.java:219:in newInstance' from Ruby.java:1365:ininitCore’
from Ruby.java:1205:in bootstrap' from Ruby.java:1140:ininit’
from Ruby.java:276:in newInstance' from Main.java:262:ininternalRun’
from Main.java:221:in run' from Main.java:201:inmain’

Even a simple:

jruby
puts “Hello World”
dumps the same error.

This is a Java 6 JVM running on IBM i (v 6.1) Any ideas as to cause or
workaround?


Pete H.
www.petesworkshop.com
GIAC Secure Software Programmer-Java

Wow. That JVM is three years old! Any chance you can try a newer
release, even of Java 6?

On Sep 3, 2013, at 9:43 PM, Pete H. [email protected] wrote:

   from RubyStruct.java:219:in `newInstance'

jruby
puts “Hello World”
dumps the same error.

This is a Java 6 JVM running on IBM i (v 6.1) Any ideas as to cause or
workaround?


Pete H.
www.petesworkshop.com
GIAC Secure Software Programmer-Java

Do you mind opening a ticket? https://github.com/jruby/jruby/issues

As I understand it, it shouldn’t be loading sun.misc.Unsafe on J9, but
it is. Can you also try compiling from source?

Thank you.

Yeah, I guess it is a little long in the tooth. I am downloading the
latest CUME and PTF’s but I doubt it’ll make a difference. I’ll also
try Java 7 which is available on IBM i.

Pete H.
www.petesworkshop.com
GIAC Secure Software Programmer-Java

I stand corrected. Updating to the latest Java Group PTF on IBM i did
the trick. Here is what I see now:

java -version
java version “1.6.0”
Java™ SE Runtime Environment (build pap3260sr14-20130705_01(SR14))
IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 OS/400 ppc-32
jvmap3260sr14-201307
05_01 (JIT enabled, AOT enabled)
J9VM - 20130704_155156
JIT - r9_20130517_38390
GC - GA24_Java6_SR14_20130704_1138_B155156)
JCL - 20130618_01
$
jruby -v
jruby 1.7.4 (1.9.3p392) 2013-05-16 2390d3b on IBM J9 VM
jvmap3260sr14-20130705_01 [OS/400-PowerPC]
$

All is well. Sorry for the noise…

Pete H.
www.petesworkshop.com
GIAC Secure Software Programmer-Java

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs