问题描述
我正在尝试将非常简单的Rails应用程序部署到Oracle WebLogic Server.它只是由诸如" jruby -S rails new myapp "之类的命令创建的默认应用程序.
如果运行开发服务器(" jruby -S rails server "),效果很好.但是,当我将其部署到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
我的环境:
操作系统:Windows 8.1
Java:Java(TM)SE运行时环境(内部版本1.7.0_40-b43)
jRuby:jruby 1.7.10(1.9.3p392)2014-01-09 c4ecd6b
WebLogic:12.1.2
滑轨:4.0.2
莺:1.4.0
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
推荐答案
这是WebLogic的一个常见问题,是由冲突的JodaTime(jar)库引起的.
this is a common issue with WebLogic caused by conflicting JodaTime (jar) library.
可通过添加weblogic.xml
描述符并将WL告知Wiki中 WEB-INF/lib 详细信息中的"prefer" (Java)类来修复: https://github.com/jruby/jruby-rack/wiki/Deploying-with -WebLogic
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
这篇关于无法将Rails应用程序部署到WebLogic的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!