Forum: JRuby Unsatisfied link error in RubyBasicObject.java IBM J9 JVM

1f77113371c7d36eae5c8a1f10137438?d=identicon&s=25 Pete Helgren (Guest)
on 2013-09-04 03:43
(Received via mailing list)
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:in `setVariableInternal'
         from RubyBasicObject.java:1230:in `setVariable'
         from RubyClass.java:265:in `set'
         from RubyBasicObject.java:1397:in `variableTableStore'
         from RubyBasicObject.java:1465:in `setInternalVariable'
         from RubyStruct.java:219:in `newInstance'
         from Ruby.java:1365:in `initCore'
         from Ruby.java:1205:in `bootstrap'
         from Ruby.java:1140:in `init'
         from Ruby.java:276:in `newInstance'
         from Main.java:262:in `internalRun'
         from Main.java:221:in `run'
         from Main.java:201:in `main'

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 Helgren
www.petesworkshop.com
GIAC Secure Software Programmer-Java
147ef000d3a4fb7bd34d2fef34d55fef?d=identicon&s=25 Bruce Adams (Guest)
on 2013-09-04 03:57
(Received via mailing list)
Wow. That JVM is three years old! Any chance you can try a newer
release, even of Java 6?
40e5e9fe36a1f85166493faac2c17499?d=identicon&s=25 Hirotsugu Asari (Guest)
on 2013-09-04 04:29
(Received via mailing list)
Attachment: signature.asc (494 Bytes)
On Sep 3, 2013, at 9:43 PM, Pete Helgren <pete@valadd.com> 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 Helgren
> 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.
1f77113371c7d36eae5c8a1f10137438?d=identicon&s=25 Pete Helgren (Guest)
on 2013-09-04 14:51
(Received via mailing list)
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 Helgren
www.petesworkshop.com
GIAC Secure Software Programmer-Java
1f77113371c7d36eae5c8a1f10137438?d=identicon&s=25 Pete Helgren (Guest)
on 2013-09-06 13:04
(Received via mailing list)
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(TM) 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 Helgren
www.petesworkshop.com
GIAC Secure Software Programmer-Java
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.