from the stacktrace I see that it tries to create a new artist on
startup. is this done somehow in an initializer or some so ?

the actual error says that the autoincremented ids are not handled
correctly. since you say it works with development webrick, it is not
config problem as such. but you need to make sure that webrick against
the production DB works:

$ jruby -S rails server -r production

regards Kristian

PS still do not believe it is related to the servlet/tomcat as such

On Nov 2, 8:32 am, MJW2529 <[email protected]> wrote:
> I'll go ahead and complete the process that you've outlined and see if
> I can narrow it down.
> In the meantime here's the complete trace of the error.
>
> Nov 1, 2010 7:10:45 PM org.apache.catalina.core.ApplicationContext log
> SEVERE: Application Error
> org.jruby.rack.RackInitializationException: ActiveRecord::JDBCError:
> Generated keys not requested. You need to specify
> Statement.RETURN_GENERATED_KEYS to Statement.executeUpdate() or
> Connection.prepareStatement().: SET SQL_AUTO_IS_NULL=0
>         from /Library/Tomcat/Home/webapps/RSM/WEB-INF/gems/gems/activerecord-
> jdbc-adapter-1.0.2-java/lib/arjdbc/jdbc/adapter.rb:178:in `execute'
>         from /Library/Tomcat/Home/webapps/RSM/WEB-INF/gems/gems/activerecord-
> jdbc-adapter-1.0.2-java/lib/arjdbc/mysql/adapter.rb:14:in
> `configure_connection'
>         from /Library/Tomcat/Home/webapps/RSM/WEB-INF/gems/gems/activerecord-
> jdbc-adapter-1.0.2-java/lib/arjdbc/mysql/adapter.rb:385:in
> `initialize'
>         from /Library/Tomcat/Home/webapps/RSM/WEB-INF/gems/gems/activerecord-
> jdbc-adapter-1.0.2-java/lib/arjdbc/jdbc/connection_methods.rb:6:in
> `new'
>         from /Library/Tomcat/Home/webapps/RSM/WEB-INF/gems/gems/activerecord-
> jdbc-adapter-1.0.2-java/lib/arjdbc/jdbc/connection_methods.rb:6:in
> `jdbc_connection'
>         from /Library/Tomcat/Home/webapps/RSM/WEB-INF/gems/gems/activerecord-
> jdbc-adapter-1.0.2-java/lib/arjdbc/mysql/connection_methods.rb:18:in
> `mysql_connection'
>         from /Library/Tomcat/Home/webapps/RSM/WEB-INF/gems/gems/
> activerecord-3.0.1/lib/active_record/connection_adapters/abstract/
> connection_pool.rb:230:in `new_connection'
>         from /Library/Tomcat/Home/webapps/RSM/WEB-INF/gems/gems/
> activerecord-3.0.1/lib/active_record/connection_adapters/abstract/
> connection_pool.rb:238:in `checkout_new_connection'
>          ... 50 levels...
>         from file:/Library/Tomcat/apache-tomcat-6.0.29/webapps/RSM/WEB-INF/
> lib/jruby-rack-1.0.3.jar!/vendor/rack-1.2.1/rack/builder.rb:46:in
> `initialize'
>         from <script>:2:in `new'
>         from <script>:2
>
>         at org.jruby.rack.DefaultRackApplicationFactory
> $4.init(DefaultRackApplicationFactory.java:184)
>         at
> org.jruby.rack.DefaultRackApplicationFactory.getApplication(DefaultRackApplicationFactory.java:
> 59)
>         at
> org.jruby.rack.PoolingRackApplicationFactory.getApplication(PoolingRackApplicationFactory.java:
> 94)
>         at
> org.jruby.rack.servlet.DefaultServletDispatcher.process(DefaultServletDispatcher.java:
> 36)
>         at org.jruby.rack.RackFilter.doFilter(RackFilter.java:59)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
> 235)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
> 206)
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
> 233)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
> 191)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
> 127)
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
> 102)
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
> 109)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
> 298)
>         at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
> 857)
>         at org.apache.coyote.http11.Http11Protocol
> $Http11ConnectionHandler.process(Http11Protocol.java:588)
>         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:
> 489)
>         at java.lang.Thread.run(Thread.java:680)
> Caused by: org.jruby.exceptions.RaiseException:
> ActiveRecord::JDBCError: Generated keys not requested. You need to
> specify Statement.RETURN_GENERATED_KEYS to Statement.executeUpdate()
> or Connection.prepareStatement().: SET SQL_AUTO_IS_NULL=0
>         at Kernel.raise(/Library/Tomcat/Home/webapps/RSM/WEB-INF/gems/gems/
> activerecord-3.0.1/lib/active_record/connection_adapters/
> abstract_adapter.rb:202)
>         at ActiveRecord::ConnectionAdapters::AbstractAdapter.log(/Library/
> Tomcat/Home/webapps/RSM/WEB-INF/gems/gems/activerecord-jdbc-
> adapter-1.0.2-java/lib/arjdbc/jdbc/adapter.rb:178)
>         at ActiveRecord::ConnectionAdapters::JdbcAdapter.execute(/Library/
> Tomcat/Home/webapps/RSM/WEB-INF/gems/gems/activerecord-jdbc-
> adapter-1.0.2-java/lib/arjdbc/mysql/adapter.rb:14)
>         at ArJdbc::MySQL.configure_connection(/Library/Tomcat/Home/webapps/
> RSM/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.0.2-java/lib/arjdbc/
> mysql/adapter.rb:385)
>         at ActiveRecord::ConnectionAdapters::MysqlAdapter.initialize(/Library/
> Tomcat/Home/webapps/RSM/WEB-INF/gems/gems/activerecord-jdbc-
> adapter-1.0.2-java/lib/arjdbc/jdbc/connection_methods.rb:6)
>         at (unknown).new(/Library/Tomcat/Home/webapps/RSM/WEB-INF/gems/gems/
> activerecord-jdbc-adapter-1.0.2-java/lib/arjdbc/jdbc/
> connection_methods.rb:6)
>         at #<Class:01x1aff2be8>.jdbc_connection(/Library/Tomcat/Home/webapps/
> RSM/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.0.2-java/lib/arjdbc/
> mysql/connection_methods.rb:18)
>         at #<Class:01x1aff2be8>.mysql_connection(/Library/Tomcat/Home/webapps/
> RSM/WEB-INF/gems/gems/activerecord-3.0.1/lib/active_record/
> connection_adapters/abstract/connection_pool.rb:230)
>         at ActiveRecord::ConnectionAdapters::ConnectionPool.new_connection(/
> Library/Tomcat/Home/webapps/RSM/WEB-INF/gems/gems/activerecord-3.0.1/
> lib/active_record/connection_adapters/abstract/connection_pool.rb:238)
>         at
> ActiveRecord::ConnectionAdapters::ConnectionPool.checkout_new_connection(/
> Library/Tomcat/Home/webapps/RSM/WEB-INF/gems/gems/activerecord-3.0.1/
> lib/active_record/connection_adapters/abstract/connection_pool.rb:194)
>         at ActiveRecord::ConnectionAdapters::ConnectionPool.checkout(/Library/
> Tomcat/Home/webapps/RSM/WEB-INF/gems/gems/activerecord-3.0.1/lib/
> active_record/connection_adapters/abstract/connection_pool.rb:190)
>         at Kernel.loop(/Library/Tomcat/Home/webapps/RSM/WEB-INF/gems/gems/
> activerecord-3.0.1/lib/active_record/connection_adapters/abstract/
> connection_pool.rb:190)
>         at ActiveRecord::ConnectionAdapters::ConnectionPool.checkout(file:/
> Library/Tomcat/apache-tomcat-6.0.29/webapps/RSM/WEB-INF/lib/jruby-
> stdlib-1.5.3.jar!/META-INF/jruby.home/lib/ruby/1.8/monitor.rb:191)
>         at MonitorMixin.mon_synchronize(/Library/Tomcat/Home/webapps/RSM/WEB-
> INF/gems/gems/activerecord-3.0.1/lib/active_record/connection_adapters/
> abstract/connection_pool.rb:189)
>         at ActiveRecord::ConnectionAdapters::ConnectionPool.checkout(/Library/
> Tomcat/Home/webapps/RSM/WEB-INF/gems/gems/activerecord-3.0.1/lib/
> active_record/connection_adapters/abstract/connection_pool.rb:96)
>         at ActiveRecord::ConnectionAdapters::ConnectionPool.connection(/
> Library/Tomcat/Home/webapps/RSM/WEB-INF/gems/gems/activerecord-3.0.1/
> lib/active_record/connection_adapters/abstract/connection_pool.rb:318)
>         at
> ActiveRecord::ConnectionAdapters::ConnectionHandler.retrieve_connection(/
> Library/Tomcat/Home/webapps/RSM/WEB-INF/gems/gems/activerecord-3.0.1/
> lib/active_record/connection_adapters/abstract/
> connection_specification.rb:97)
>         at #<Class:01x1aff2be8>.retrieve_connection(/Library/Tomcat/Home/
> webapps/RSM/WEB-INF/gems/gems/activerecord-3.0.1/lib/active_record/
> connection_adapters/abstract/connection_specification.rb:89)
>         at #<Class:01x1aff2be8>.connection(/Library/Tomcat/Home/webapps/RSM/
> WEB-INF/gems/gems/arel-1.0.1/lib/arel/engines/sql/engine.rb:9)
>         at Arel::Sql::Engine.connection(/Library/Tomcat/Home/webapps/RSM/WEB-
> INF/gems/gems/arel-1.0.1/lib/arel/engines/sql/relations/table.rb:37)
>         at Arel::Table.initialize(/Library/Tomcat/Home/webapps/RSM/WEB-INF/
> gems/gems/activerecord-3.0.1/lib/active_record/base.rb:850)
>         at (unknown).new(/Library/Tomcat/Home/webapps/RSM/WEB-INF/gems/gems/
> activerecord-3.0.1/lib/active_record/base.rb:850)
>         at #<Class:01x1aff2be8>.arel_table(/Library/Tomcat/Home/webapps/RSM/
> WEB-INF/gems/gems/activerecord-3.0.1/lib/active_record/base.rb:896)
>         at #<Class:01x1aff2be8>.relation(/Library/Tomcat/Home/webapps/RSM/WEB-
> INF/gems/gems/activerecord-3.0.1/lib/active_record/named_scope.rb:32)
>         at ActiveRecord::NamedScope::ClassMethods.scoped(/Library/Tomcat/Home/
> webapps/RSM/WEB-INF/gems/gems/activerecord-3.0.1/lib/active_record/
> base.rb:441)
>         at #<Class:01x1aff2be8>.limit(/Library/Tomcat/apache-tomcat-6.0.29/
> webapps/RSM/WEB-INF/app/models/artist.rb:5)
>         at (unknown).(unknown)(/Library/Tomcat/apache-tomcat-6.0.29/webapps/
> RSM/WEB-INF/app/models/artist.rb:239)
>         at (unknown).(unknown)(/Library/Tomcat/apache-tomcat-6.0.29/webapps/
> RSM/WEB-INF/app/models/artist.rb:239)
>         at Kernel.require(/Library/Tomcat/Home/webapps/RSM/WEB-INF/gems/gems/
> activesupport-3.0.1/lib/active_support/dependencies.rb:239)
>         at ActiveSupport::Dependencies::Loadable.require(/Library/Tomcat/Home/
> webapps/RSM/WEB-INF/gems/gems/activesupport-3.0.1/lib/active_support/
> dependencies.rb:227)
>         at ActiveSupport::Dependencies::Loadable.load_dependency(/Library/
> Tomcat/Home/webapps/RSM/WEB-INF/gems/gems/activesupport-3.0.1/lib/
> active_support/dependencies.rb:239)
>         at ActiveSupport::Dependencies::Loadable.require(/Library/Tomcat/Home/
> webapps/RSM/WEB-INF/gems/gems/activesupport-3.0.1/lib/active_support/
> dependencies.rb:346)
>         at ActiveSupport::Dependencies.require_or_load(/Library/Tomcat/Home/
> webapps/RSM/WEB-INF/gems/gems/activesupport-3.0.1/lib/active_support/
> dependencies.rb:300)
>         at ActiveSupport::Dependencies.depend_on(/Library/Tomcat/Home/webapps/
> RSM/WEB-INF/gems/gems/activesupport-3.0.1/lib/active_support/
> dependencies.rb:216)
>         at ActiveSupport::Dependencies::Loadable.require_dependency(/Library/
> Tomcat/Home/webapps/RSM/WEB-INF/gems/gems/railties-3.0.1/lib/rails/
> engine.rb:138)
>         at Rails::Engine.eager_load!(/Library/Tomcat/Home/webapps/RSM/WEB-INF/
> gems/gems/railties-3.0.1/lib/rails/engine.rb:137)
>         at Array.each(/Library/Tomcat/Home/webapps/RSM/WEB-INF/gems/gems/
> railties-3.0.1/lib/rails/engine.rb:137)
>         at Rails::Engine.eager_load!(/Library/Tomcat/Home/webapps/RSM/WEB-INF/
> gems/gems/railties-3.0.1/lib/rails/engine.rb:135)
>         at
> ...
>
> read more »

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to