Failed to deploy Rails app to WebLogic

与世无争的帅哥 提交于 2019-12-13 06:24:32

问题



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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!