问题
I'm trying to deploy very simple Rails application to Oracle WebLogic server. It's just a default application created by a command like "jruby -S rails new myapp".
It works fine if I run a development server ("jruby -S rails server").
But when I deploy it to WebLogic, I receive an exception:
org.jruby.rack.RackInitializationException: no method 'getInstance' for arguments (org.joda.time.tz.CachedDateTimeZone) on Java::OrgJodaTimeChrono::GJChronology
My environment:
OS: Windows 8.1
Java: Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
jRuby: jruby 1.7.10 (1.9.3p392) 2014-01-09 c4ecd6b
WebLogic: 12.1.2
Rails: 4.0.2
Warbler: 1.4.0
回答1:
this is a common issue with WebLogic caused by conflicting JodaTime (jar) library.
it's fixable by adding a weblogic.xml
descriptor and telling WL to "prefer" (Java) classes from WEB-INF/lib details at the wiki : https://github.com/jruby/jruby-rack/wiki/Deploying-with-WebLogic
来源:https://stackoverflow.com/questions/21154145/failed-to-deploy-rails-app-to-weblogic