JodaTime issue with JRuby 1.4 on Weblogic 10.3.5

Hi

I have a ruby on rails application that we deployed on weblogic 10.1 it
works fine. We are upgrading to weblogic 10.3.5 version and when
deployed
on new version, we are getting “java.lang.NoSuchMethodError:
org.joda.time.DateTimeZone.isStandardOffset(J)Z” error. I have put the
Joda-time 1.6 in lib folder of war file and jruby lib directory. I still
get the same error. Details of my environment are as follows

Jruby Version

jruby 1.4.0 (ruby 1.8.7 patchlevel 174) (2009-11-02 69fbfa3) (Java
HotSpot™ Client VM 1.6.0) [x86-java]

*** LOCAL GEMS ***

actionmailer (2.3.5)
actionpack (2.3.5)
activemodel (3.0.7)
activerecord (2.3.5)
activerecord-jdbc-adapter (0.9.2)
activerecord-oracle_enhanced-adapter (1.2.3)
activeresource (2.3.5)
activesupport (3.0.7, 2.3.5)
arel (2.0.9)
authlogic (2.1.3)
bouncy-castle-java (1.5.0146.1)
builder (2.1.2)
i18n (0.5.0)
jerryluk-jruby-rfc2445 (0.0.4)
jruby-jars (1.6.1, 1.4.0)
jruby-openssl (0.7.5)
lockdown (1.6.3)
rack (1.0.1)
rails (2.3.5)
rake (0.8.7)
rspec (1.2.9)
ruby-net-ldap (0.0.4)
ruby-plsql (0.4.0)
sources (0.0.1)
tzinfo (0.3.26)
warbler (0.9.14)

Error

java.lang.NoSuchMethodError:
org.joda.time.DateTimeZone.isStandardOffset(J)Z
at org.jruby.RubyTime.isdst(RubyTime.java:542)
at
org.jruby.RubyTime$i_method_0_0$RUBYINVOKER$isdst.call(org/jruby/RubyTime$i_method_0_0$RUBYINVOKER$isdst.gen)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:290)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:109)
at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:61)
at org.jruby.ast.IfNode.interpret(IfNode.java:111)
at org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.ast.IfNode.interpret(IfNode.java:119)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.ast.RescueNode.executeBody(RescueNode.java:225)
at
org.jruby.ast.RescueNode.interpretWithJavaExceptions(RescueNode.java:147)
at org.jruby.ast.RescueNode.interpret(RescueNode.java:110)
at
org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:173)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:169)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:310)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:149)
at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)

Any help is greatly appreciated.

Thanks

Wow, JRuby 1.4…that’s a couple years old now :slight_smile:

Yeah, I’m not surprised that WebLogic is using a newer Joda, and that
it doesn’t work right with JRuby. Given the age of JRuby 1.4, I think
I have to recommend one of the following:

  • Fork JRuby on github, set up your own 1.4 maintenance branch, and
    upgrade Joda there. We’re not providing direct OSS support for 1.4
    anymore.
  • Upgrade JRuby to something more recent

We officially aren’t even supporting JRuby 1.5 anymore, so if you have
no choice but to stay on JRuby 1.4 you may be on your own. Keep moving
forward! :slight_smile:

  • Charlie

Thanks Charlie. I got the same issue with JRuby 1.6.2 forgot to mention
earlier.

On Tue, Feb 14, 2012 at 9:30 AM, Charles Oliver N.

Can you force the version shipped with JRuby to be loaded first, using
weblogic.xml and prefer-web-inf-classes?

http://docs.oracle.com/cd/E13222_01/wls/docs90/programming/classloading.html

Cheers,

James

with web archives on app servers there is usually a configuration that
the classloader load the jar from the lib directory first before it
goes to the parent classloader (hope my words a somehow clear). with
that any joda jar coming from the app server can be overwritten, so it
could do already without the extra joda jar.

regards,
Kristian

On Wed, Feb 15, 2012 at 1:24 AM, Charles Oliver N.

joda-time 1.6 is in the lib folder of the war file. Still we are getting
this error.

Some discussion of similar problems here:

http://joda-interest.219941.n2.nabble.com/weblogic-hibernate-and-joda-td2095563.html

And it appears that WebLogic at some point used joda-time 1.2:

http://www.x2x1.com/show/7957829.aspx

  • Charlie

Ahh, well that’s more interesting. Can you determine what version of
Joda WebLogic is using?

  • Charlie

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