Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
297 views
in Technique[技术] by (71.8m points)

jruby - Failed to deploy Rails app to WebLogic


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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...