JRuby on Rails 无法与在 Windows Server 2008 上作为服务运行的 Tomcat 一起使用

发布于 2024-10-03 08:14:54 字数 663 浏览 7 评论 0原文

问题

似乎将 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

http://pastie.org/1308566

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

http://pastie.org/1308566

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

坦然微笑 2024-10-10 08:14:54

我猜想您的数据库连接信息包含一个意外的空字符串,系统正在尝试将其转换为大写字母。请参阅此错误消息作为提示:


ERB.result(C:/bin/apache-tomcat-6.0.29/webapps/rails3app/WEB-INF/gems/gems/railties-3.0.0/lib/rails/application/configuration.rb:86)

Rails::Application::Configuration.database_configuration(C:/bin/apache-tomcat-6.0.29/webapps/rails3app/WEB-INF/gems/gems/activerecord-3.0.0/lib/active_record/railtie.rb:58 )

这可以通过配置编辑来纠正。

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:

at
ERB.result(C:/bin/apache-tomcat-6.0.29/webapps/rails3app/WEB-INF/gems/gems/railties-3.0.0/lib/rails/application/configuration.rb:86)
at
Rails::Application::Configuration.database_configuration(C:/bin/apache-tomcat-6.0.29/webapps/rails3app/WEB-INF/gems/gems/activerecord-3.0.0/lib/active_record/railtie.rb:58)

This may be correctable with a configuration edit.

画离情绘悲伤 2024-10-10 08:14:54

我刚刚在您的 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!

简单气质女生网名 2024-10-10 08:14:54

查看你的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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文