JRuby on Rails 无法与在 Windows Server 2008 上作为服务运行的 Tomcat 一起使用
问题
似乎将 Tomcat 作为服务运行并不能很好地与使用 warble 打包的 Rails 3 应用程序配合使用。查看日志文件,看起来要么存在循环依赖,要么存在正在动态解析但找不到的依赖,因此发生循环。最终,抛出org.jruby.exceptions.RaiseException: stack level too deep
。但是,当我使用 startup.bat
来启动 Tomcat 时,就不会出现此问题。
任何帮助将不胜感激!我一直在拼命寻找这个问题的答案。提前致谢!
部署平台
- Windows Server 2008(64 位)
- Apache Tomcat 6.29(64 位)
- JDK 1.6
- Rails 3
- jruby 1.5.6
- warbler (1.2.1)
- jruby-jars (>= 1.4.0)
- jruby-rack (>= 1.0.0)
Tomcat localhost.log
Problem
It seems like running Tomcat as a service doesn't play well with Rails 3 applications that are packaged up using warble. Looking at the log files, it looks like there is either a circular dependency or a dependency that is being dynamically resolved but cannot be found, so it loops. Eventually, org.jruby.exceptions.RaiseException: stack level too deep
is thrown. However, when I use startup.bat
to start Tomcat instead, this problem does not occur.
Any help would be appreciated! I've been desperately searching for answer to this. Thanks in advance!
Deployment Platform
- Windows Server 2008 (64-bit)
- Apache Tomcat 6.29 (64-bit)
- JDK 1.6
- Rails 3
- jruby 1.5.6
- warbler (1.2.1)
- jruby-jars (>= 1.4.0)
- jruby-rack (>= 1.0.0)
Tomcat localhost.log
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我猜想您的数据库连接信息包含一个意外的空字符串,系统正在尝试将其转换为大写字母。请参阅此错误消息作为提示:
这可以通过配置编辑来纠正。
I would guess your database connection information contains an unexpected null string, which the system is attempting to convert to uppercase somewhere. See this error message as the hint:
This may be correctable with a configuration edit.
我刚刚在您的 Jruby 票证上发布了以下内容 [http://jira.codehaus.org/browse/JRUBY-5237]:
这实际上是 Tomcat <= 6.0 附带的 procrun(Apache Commons Daemon)版本的问题.29.您需要升级整个 Tomcat 6 安装或您正在使用的 procrun 版本。 Procrun 需要 >= 1.0.4
Tomcat 6 升级:http://tomcat.apache.org /download-60.cgi
我遇到了完全相同的问题,升级为我解决了这个问题。
我已发布在
祝你好运!
I just posted the following on your Jruby ticket [http://jira.codehaus.org/browse/JRUBY-5237]:
This is actually a problem with the version of procrun (Apache Commons Daemon) that ships with Tomcat <= 6.0.29. You need to upgrade either the entire Tomcat 6 install or the version of procrun you're using. Procrun needs to be >= 1.0.4
Tomcat 6 upgrade: http://tomcat.apache.org/download-60.cgi
I was having this exact same problem and the upgrade solved it for me.
I've posted over at http://techblog.amphora-research.com/2011/03/tomcat-6-stack-level-too-deep-error-on-windows/ if you're interested in the details.
Good luck!
查看你的startup.bat 配置。 Tomcat 可能会在 Java 启动时使用更高的内存设置,从而允许递归完成而不会耗尽内存。
Look through your startup.bat configuration. It may be that Tomcat is started with a higher memory setting for Java through there, allowing the recursion to finish without running out of memory.