fcp6316
2010-01-07 11:43
浏览 300
已采纳

ruby on rails 用jruby部署到tomcat上。tomcat报错的log信息

[color=indigo]创建一个ruby on rails 工程,用jruby发布到tomcat上时,tomcat的log里 的错误信息,麻烦帮我分析下是什么错误。 我看好像说是让我把gem install activerecord-jdbcmysql-adapter 但是我执行了 还是报错。

2010/01/07 10:59:57 org.apache.catalina.core.ApplicationContext log
致命的: unable to create shared application instance
org.jruby.rack.RackInitializationException: Please install the jdbcmysql adapter: gem install activerecord-jdbcmysql-adapter (no such file to load -- active_record/connection_adapters/jdbcmysql_adapter)
from C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/gems/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:60:in establish_connection'
from C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/gems/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:55:in
establish_connection'
from C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/gems/gems/rails-2.3.2/lib/initializer.rb:417:in initialize_database'
from C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/gems/gems/rails-2.3.2/lib/initializer.rb:141:in
process'
from C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/gems/gems/rails-2.3.2/lib/initializer.rb:113:in run'
from C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\nyusatu\WEB-INF/config/environment.rb:10
from C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\nyusatu\WEB-INF/config/environment.rb:26:in
load'
from file:/C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/lib/jruby-rack-0.9.4.jar!/jruby/rack/rails.rb:26:in load_environment'
from file:/C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/lib/jruby-rack-0.9.4.jar!/jruby/rack/rails.rb:151:in
new'
from :2<br> from file:/C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/lib/jruby-rack-0.9.4.jar!/rack/builder.rb:29:in <code>instance_eval&#39;<br> from file:/C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/lib/jruby-rack-0.9.4.jar!/rack/builder.rb:29:in</code>initialize&#39;<br> from <script>:2</p> <pre><code>at org.jruby.rack.DefaultRackApplicationFactory$4.init(DefaultRackApplicationFactory.java:153) at org.jruby.rack.DefaultRackApplicationFactory.getApplication(DefaultRackApplicationFactory.java:50) at org.jruby.rack.SharedRackApplicationFactory.init(SharedRackApplicationFactory.java:26) at org.jruby.rack.RackServletContextListener.contextInitialized(RackServletContextListener.java:39) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4336) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1023) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1015) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:448) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) </code></pre> <p>Caused by: org.jruby.exceptions.RaiseException: Please install the jdbcmysql adapter: <code>gem install activerecord-jdbcmysql-adapter</code> (no such file to load -- active_record/connection_adapters/jdbcmysql_adapter)<br> at Kernel.raise(C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/gems/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:76)<br> at #<a href="Class:01x61a414">Class:01x61a414</a>.establish_connection(C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/gems/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:60)<br> at #<a href="Class:01x61a414">Class:01x61a414</a>.establish_connection(C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/gems/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:55)<br> at #<a href="Class:01x61a414">Class:01x61a414</a>.establish_connection(C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/gems/gems/rails-2.3.2/lib/initializer.rb:417)<br> at Rails::Initializer.initialize_database(C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/gems/gems/rails-2.3.2/lib/initializer.rb:141)<br> at Rails::Initializer.process(C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/gems/gems/rails-2.3.2/lib/initializer.rb:113)<br> at #<a href="Class:01x111ae04">Class:01x111ae04</a>.run(C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\nyusatu\WEB-INF/config/environment.rb:10)<br> at (unknown).(unknown)(C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\nyusatu\WEB-INF/config/environment.rb:26)<br> at Kernel.load(file:/C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/lib/jruby-rack-0.9.4.jar!/jruby/rack/rails.rb:26)<br> at JRuby::Rack::RailsServletHelper.load_environment(file:/C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/lib/jruby-rack-0.9.4.jar!/jruby/rack/rails.rb:151)<br> at #<a href="Class:01x30c963">Class:01x30c963</a>.new(<script>:2)<br> at (unknown).(unknown)(file:/C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/lib/jruby-rack-0.9.4.jar!/rack/builder.rb:29)<br> at Kernel.instance_eval(file:/C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/lib/jruby-rack-0.9.4.jar!/rack/builder.rb:29)<br> at Kernel.instance_eval(file:/C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/lib/jruby-rack-0.9.4.jar!/rack/builder.rb:29)<br> at Rack::Builder.initialize(<script>:2)<br> at (unknown).(unknown)(:1)<br> 2010/01/07 10:59:57 org.apache.catalina.core.ApplicationContext log<br> 致命的: Error: application initialization failed<br> org.jruby.rack.RackInitializationException: unable to create shared application instance<br> at org.jruby.rack.SharedRackApplicationFactory.init(SharedRackApplicationFactory.java:38)<br> at org.jruby.rack.RackServletContextListener.contextInitialized(RackServletContextListener.java:39)<br> at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)<br> at org.apache.catalina.core.StandardContext.start(StandardContext.java:4336)<br> at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)<br> at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)<br> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)<br> at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)<br> at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)<br> at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)<br> at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)<br> at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)<br> at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)<br> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1023)<br> at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)<br> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1015)<br> at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)<br> at org.apache.catalina.core.StandardService.start(StandardService.java:448)<br> at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)<br> at org.apache.catalina.startup.Catalina.start(Catalina.java:552)<br> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br> at java.lang.reflect.Method.invoke(Unknown Source)<br> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)<br> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)<br> Caused by: org.jruby.rack.RackInitializationException: Please install the jdbcmysql adapter: <code>gem install activerecord-jdbcmysql-adapter</code> (no such file to load -- active_record/connection_adapters/jdbcmysql_adapter)<br> from C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/gems/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:60:in <code>establish_connection&#39;<br> from C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/gems/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:55:in</code>establish_connection&#39;<br> from C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/gems/gems/rails-2.3.2/lib/initializer.rb:417:in <code>initialize_database&#39;<br> from C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/gems/gems/rails-2.3.2/lib/initializer.rb:141:in</code>process&#39;<br> from C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/gems/gems/rails-2.3.2/lib/initializer.rb:113:in <code>run&#39;<br> from C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\nyusatu\WEB-INF/config/environment.rb:10<br> from C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\nyusatu\WEB-INF/config/environment.rb:26:in</code>load&#39;<br> from file:/C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/lib/jruby-rack-0.9.4.jar!/jruby/rack/rails.rb:26:in <code>load_environment&#39;<br> from file:/C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/lib/jruby-rack-0.9.4.jar!/jruby/rack/rails.rb:151:in</code>new&#39;<br> from <script>:2<br> from file:/C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/lib/jruby-rack-0.9.4.jar!/rack/builder.rb:29:in <code>instance_eval&#39;<br> from file:/C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/lib/jruby-rack-0.9.4.jar!/rack/builder.rb:29:in</code>initialize&#39;<br> from <script>:2</p> <pre><code>at org.jruby.rack.DefaultRackApplicationFactory$4.init(DefaultRackApplicationFactory.java:153) at org.jruby.rack.DefaultRackApplicationFactory.getApplication(DefaultRackApplicationFactory.java:50) at org.jruby.rack.SharedRackApplicationFactory.init(SharedRackApplicationFactory.java:26) ... 25 more </code></pre> <p>Caused by: org.jruby.exceptions.RaiseException: Please install the jdbcmysql adapter: <code>gem install activerecord-jdbcmysql-adapter</code> (no such file to load -- active_record/connection_adapters/jdbcmysql_adapter)<br> at Kernel.raise(C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/gems/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:76)<br> at #<a href="Class:01x61a414">Class:01x61a414</a>.establish_connection(C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/gems/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:60)<br> at #<a href="Class:01x61a414">Class:01x61a414</a>.establish_connection(C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/gems/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:55)<br> at #<a href="Class:01x61a414">Class:01x61a414</a>.establish_connection(C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/gems/gems/rails-2.3.2/lib/initializer.rb:417)<br> at Rails::Initializer.initialize_database(C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/gems/gems/rails-2.3.2/lib/initializer.rb:141)<br> at Rails::Initializer.process(C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/gems/gems/rails-2.3.2/lib/initializer.rb:113)<br> at #<a href="Class:01x111ae04">Class:01x111ae04</a>.run(C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\nyusatu\WEB-INF/config/environment.rb:10)<br> at (unknown).(unknown)(C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\nyusatu\WEB-INF/config/environment.rb:26)<br> at Kernel.load(file:/C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/lib/jruby-rack-0.9.4.jar!/jruby/rack/rails.rb:26)<br> at JRuby::Rack::RailsServletHelper.load_environment(file:/C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/lib/jruby-rack-0.9.4.jar!/jruby/rack/rails.rb:151)<br> at #<a href="Class:01x30c963">Class:01x30c963</a>.new(<script>:2)<br> at (unknown).(unknown)(file:/C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/lib/jruby-rack-0.9.4.jar!/rack/builder.rb:29)<br> at Kernel.instance_eval(file:/C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/lib/jruby-rack-0.9.4.jar!/rack/builder.rb:29)<br> at Kernel.instance_eval(file:/C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/nyusatu/WEB-INF/lib/jruby-rack-0.9.4.jar!/rack/builder.rb:29)<br> at Rack::Builder.initialize(<script>:2)<br> at (unknown).(unknown)(:1) <br> ][/color]</p>

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • tangyuanjian 2010-01-15 17:08
    已采纳

    jruby下面mysql的驱动没装好!

    点赞 评论

相关推荐 更多相似问题