ActiveRecord test problem


#1

I have a problem to run ActiveRecord’s tests.

I downloaded the source code of ActiveRecord and I put it in
NetBeansProject folder (I use that IDE).

I opened it as a Ruby project with existing source. I had also to put
activesupport and the other gems in the same folder of ActiveRecord,
otherwise it gave me an error.

I created the database and I configured tests for jdbcmysql, but when I
do jruby -S rake test_mysql it give me this error:

ffrancy@cray:~/NetBeansProjects/activerecord-2.2.2$ jruby -S rake
test_mysql
(in /home/ffrancy/NetBeansProjects/activerecord-2.2.2)
/opt/jruby-1.1.6/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/gempackagetask.rb:13:Warning:
Gem::manage_gems is deprecated and will be removed on or after March
2009.

/opt/jruby/bin/jruby -Ilib:test:test/connections/native_mysql
“/opt/jruby-1.1.6/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/rake_test_loader.rb”
“test/cases/aaa_create_tables_test.rb”
“test/cases/active_schema_test_mysql.rb” “test/cases/adapter_test.rb”
“test/cases/aggregations_test.rb” “test/cases/ar_schema_test.rb”
“test/cases/associations/belongs_to_associations_test.rb”
“test/cases/associations/callbacks_test.rb”
“test/cases/associations/cascaded_eager_loading_test.rb”
“test/cases/associations/eager_load_includes_full_sti_class_test.rb”
“test/cases/associations/eager_load_nested_include_test.rb”
“test/cases/associations/eager_singularization_test.rb”
“test/cases/associations/eager_test.rb”
“test/cases/associations/extension_test.rb”
“test/cases/associations/has_and_belongs_to_many_associations_test.rb”
“test/cases/associations/has_many_associations_test.rb”
“test/cases/associations/has_many_through_associations_test.rb”
“test/cases/associations/has_one_associations_test.rb”
“test/cases/associations/has_one_through_associations_test.rb”
“test/cases/associations/inner_join_association_test.rb”
“test/cases/associations/join_model_test.rb”
“test/cases/associations_test.rb” “test/cases/attribute_methods_test.rb”
“test/cases/base_test.rb” “test/cases/binary_test.rb”
“test/cases/calculations_test.rb”
“test/cases/callbacks_observers_test.rb” “test/cases/callbacks_test.rb”
“test/cases/class_inheritable_attributes_test.rb”
“test/cases/column_alias_test.rb” “test/cases/column_definition_test.rb”
“test/cases/connection_test_mysql.rb”
“test/cases/database_statements_test.rb” “test/cases/date_time_test.rb”
“test/cases/defaults_test.rb” “test/cases/deprecated_finder_test.rb”
“test/cases/dirty_test.rb” “test/cases/finder_respond_to_test.rb”
“test/cases/finder_test.rb” “test/cases/fixtures_test.rb”
“test/cases/i18n_test.rb” “test/cases/inheritance_test.rb”
“test/cases/invalid_date_test.rb”
“test/cases/json_serialization_test.rb” “test/cases/lifecycle_test.rb”
“test/cases/locking_test.rb” “test/cases/method_scoping_test.rb”
“test/cases/migration_test.rb” “test/cases/mixin_test.rb”
“test/cases/modules_test.rb” “test/cases/multiple_db_test.rb”
“test/cases/named_scope_test.rb” “test/cases/pk_test.rb”
“test/cases/pooled_connections_test.rb” “test/cases/query_cache_test.rb”
“test/cases/readonly_test.rb” “test/cases/reflection_test.rb”
“test/cases/reload_models_test.rb”
“test/cases/reserved_word_test_mysql.rb” “test/cases/sanitize_test.rb”
“test/cases/schema_dumper_test.rb” “test/cases/serialization_test.rb”
“test/cases/transactions_test.rb” “test/cases/unconnected_test.rb”
“test/cases/validations_i18n_test.rb” “test/cases/validations_test.rb”
“test/cases/xml_serialization_test.rb”

Using native MySQL

MysqlConnectionTest

Loaded suite
/opt/jruby-1.1.6/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/rake_test_loader
Started
…EEEEEEEEEEEE.FF…F…F…F…F…F…E…F…F…F…F…F.com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException:
Connection.close() has already been called. Invalid operation in this
state.
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:888)
at com.mysql.jdbc.Connection.getMutex(Connection.java:3640)
at com.mysql.jdbc.Connection.setAutoCommit(Connection.java:5243)
at
jdbc_adapter.RubyJdbcConnection.rollback(RubyJdbcConnection.java:430)
at
jdbc_adapter.RubyJdbcConnection$i_method_0_0$RUBYINVOKER$rollback.call(jdbc_adapter/RubyJdbcConnection$i_method_0_0$RUBYINVOKER$rollback.gen)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:73)
at
ruby.jit.ruby.home.ffrancy.$_dot_gem.jruby.$1_dot_8.gems.activerecord_minus_jdbc_minus_adapter_minus_0_dot_9_dot_1.lib.jdbc_adapter.jdbc_mysql.rollback_db_transaction4212265_8331873.rescue_1$RUBY$__rescue___0(jdbc_mysql.rb:109)
at
ruby.jit.ruby.home.ffrancy.$_dot_gem.jruby.$1_dot_8.gems.activerecord_minus_jdbc_minus_adapter_minus_0_dot_9_dot_1.lib.jdbc_adapter.jdbc_mysql.rollback_db_transaction4212265_8331873.file(jdbc_mysql.rb)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:195)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:73)
at
ruby.jit.ruby.home.ffrancy.NetBeansProjects.activerecord_minus_2_dot_2_dot_2.lib.active_record.fixtures.teardown_fixtures21821228_8331873.file(fixtures.rb:955)
at
ruby.jit.ruby.home.ffrancy.NetBeansProjects.activerecord_minus_2_dot_2_dot_2.lib.active_record.fixtures.teardown_fixtures21821228_8331873.file(fixtures.rb)
at
org.jruby.internal.runtime.methods.DefaultMethod.retryJITCall(DefaultMethod.java:141)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:131)
at org.jruby.RubyClass.finvoke(RubyClass.java:353)
at org.jruby.RubyObject.send(RubyObject.java:1385)
at
org.jruby.RubyObject$i_method_multi$RUBYINVOKER$send.call(org/jruby/RubyObject$i_method_multi$RUBYINVOKER$send.gen)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:240)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:44)
at
ruby.jit.ruby.home.ffrancy.NetBeansProjects.activesupport.lib.active_support.callbacks.evaluate_method27680714_8331873.file(callbacks.rb:178)
at
org.jruby.internal.runtime.methods.DefaultMethod.retryJITCall(DefaultMethod.java:141)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:131)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:42)
at
ruby.jit.ruby.home.ffrancy.NetBeansProjects.activesupport.lib.active_support.callbacks.call10442562_8331873.rescue_1$RUBY$__rescue___0(callbacks.rb:166)
at
ruby.jit.ruby.home.ffrancy.NetBeansProjects.activesupport.lib.active_support.callbacks.call10442562_8331873.file(callbacks.rb)
at
org.jruby.ast.executable.AbstractScript.file(AbstractScript.java:31)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:237)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:114)
at
ruby.jit.ruby.home.ffrancy.NetBeansProjects.activesupport.lib.active_support.callbacks.run27050467_8331873.block_1$RUBY$block(callbacks.rb:90)
at
ruby.jit.ruby.home.ffrancy.NetBeansProjects.activesupport.lib.active_support.callbacks.run27050467_8331873BlockCallback$block_1$RUBY$__block__xx1.call(Unknown
Source)
at org.jruby.runtime.CompiledBlock.yield(CompiledBlock.java:100)
at org.jruby.runtime.Block.yield(Block.java:120)
at org.jruby.RubyArray.reverse_each(RubyArray.java:1597)
at
org.jruby.RubyArray$i_method_0_0$RUBYFRAMEDINVOKER$reverse_each.call(org/jruby/RubyArray$i_method_0_0$RUBYFRAMEDINVOKER$reverse_each.gen)
at org.jruby.RubyClass.finvoke(RubyClass.java:332)
at org.jruby.RubyObject.send(RubyObject.java:1358)
at
org.jruby.RubyObject$i_method_multi$RUBYINVOKER$send.call(org/jruby/RubyObject$i_method_multi$RUBYINVOKER$send.gen)
at
org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:139)
at
ruby.jit.ruby.home.ffrancy.NetBeansProjects.activesupport.lib.active_support.callbacks.run27050467_8331873.file(callbacks.rb:90)
at
org.jruby.ast.executable.AbstractScript.file(AbstractScript.java:35)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:300)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:165)
at
ruby.jit.ruby.home.ffrancy.NetBeansProjects.activesupport.lib.active_support.callbacks.run_callbacks32517802_8331873.file(callbacks.rb:277)
at
org.jruby.ast.executable.AbstractScript.file(AbstractScript.java:35)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:279)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:300)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:157)
at
ruby.jit.ruby.home.ffrancy.NetBeansProjects.activesupport.lib.active_support.testing.setup_and_teardown.run_with_callbacks_and_mocha31435972_8331873.rescue_2$RUBY$__rescue___6(setup_and_teardown.rb:105)
at
ruby.jit.ruby.home.ffrancy.NetBeansProjects.activesupport.lib.active_support.testing.setup_and_teardown.run_with_callbacks_and_mocha31435972_8331873.ensure_2$RUBY$__ensure___1(setup_and_teardown.rb:103)
at
ruby.jit.ruby.home.ffrancy.NetBeansProjects.activesupport.lib.active_support.testing.setup_and_teardown.run_with_callbacks_and_mocha31435972_8331873.ensure_1$RUBY$__ensure___0(setup_and_teardown.rb:91)
at
ruby.jit.ruby.home.ffrancy.NetBeansProjects.activesupport.lib.active_support.testing.setup_and_teardown.run_with_callbacks_and_mocha31435972_8331873.file(setup_and_teardown.rb:89)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:258)
at
org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:84)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:290)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:126)
at
ruby.jit.ruby.opt.jruby_minus_1_dot_1_dot_6.lib.ruby.$1_dot_8.test.unit.testsuite.run11202034_8331873.block_0$RUBY$block(testsuite.rb:34)
at
ruby.jit.ruby.opt.jruby_minus_1_dot_1_dot_6.lib.ruby.$1_dot_8.test.unit.testsuite.run11202034_8331873BlockCallback$block_0$RUBY$__block__xx1.call(Unknown
Source)
at org.jruby.runtime.CompiledBlock.yield(CompiledBlock.java:100)
at org.jruby.runtime.Block.yield(Block.java:120)
at org.jruby.RubyArray.each(RubyArray.java:1559)
at
org.jruby.RubyArray$i_method_0_0$RUBYFRAMEDINVOKER$each.call(org/jruby/RubyArray$i_method_0_0$RUBYFRAMEDINVOKER$each.gen)
at
org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:98)
at
ruby.jit.ruby.opt.jruby_minus_1_dot_1_dot_6.lib.ruby.$1_dot_8.test.unit.testsuite.run11202034_8331873.file(testsuite.rb:33)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:258)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:124)
at
org.jruby.ast.CallOneArgBlockPassNode.interpret(CallOneArgBlockPassNode.java:60)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)
at
org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:202)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:153)
at org.jruby.runtime.Block.yield(Block.java:120)
at org.jruby.RubyArray.each(RubyArray.java:1559)
at
org.jruby.RubyArray$i_method_0_0$RUBYFRAMEDINVOKER$each.call(org/jruby/RubyArray$i_method_0_0$RUBYFRAMEDINVOKER$each.gen)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:270)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:85)
at
org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:63)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:68)
at
org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:156)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:133)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:267)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:290)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:126)
at
org.jruby.ast.CallOneArgBlockNode.interpret(CallOneArgBlockNode.java:60)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:68)
at
org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:156)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:133)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:204)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:260)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:75)
at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:61)
at org.jruby.ast.ReturnNode.interpret(ReturnNode.java:85)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)
at
org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:156)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:133)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:204)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:260)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:75)
at org.jruby.ast.VCallNode.interpret(VCallNode.java:82)
at org.jruby.ast.ReturnNode.interpret(ReturnNode.java:85)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:68)
at
org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:156)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:133)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:204)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:260)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:75)
at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:61)
at org.jruby.ast.ReturnNode.interpret(ReturnNode.java:85)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)
at
org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:156)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:133)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:288)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:300)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:157)
at org.jruby.ast.CallTwoArgNode.interpret(CallTwoArgNode.java:59)
at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:61)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:68)
at
org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:156)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:133)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:204)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:260)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:75)
at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:61)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:68)
at
org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:156)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:133)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:204)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:260)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:75)
at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:61)
at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)
at org.jruby.ast.IfNode.interpret(IfNode.java:111)
at org.jruby.ast.NewlineNode.Finterpret(NewlineNode.java:101)
at
org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:202)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:190)
at org.jruby.runtime.BlockBody.call(BlockBody.java:64)
at org.jruby.runtime.BlockBody.call(BlockBody.java:70)
at org.jruby.runtime.Block.call(Block.java:116)
at org.jruby.RubyProc.call(RubyProc.java:205)
at org.jruby.RubyProc.call(RubyProc.java:187)
at org.jruby.Ruby.tearDown(Ruby.java:2380)
at org.jruby.Main.run(Main.java:216)
at org.jruby.Main.run(Main.java:100)
at
org.jruby.util.ShellLauncher$ScriptThreadProcess.run(ShellLauncher.java:103)
at java.lang.Thread.run(Thread.java:619)
rake aborted!
Command failed with status (-1): [/opt/jruby/bin/jruby
-Ilib:test:test/conne…]

(See full trace by running task with --trace)

Any ideas how to handle it?
I really don’t know how to manage it!!!

Thanks in advance


#2

ActiveRecord tests will only work with JRuby for ActiveRecord 2.3.

And while you’re at it, upgrade your JRuby install to 1.3.

Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) |
http://codeshooter.wordpress.com/ (en)

On Fri, Jun 5, 2009 at 4:38 AM, Francesca


#3

Maurício Linhares wrote:

ActiveRecord tests will only work with JRuby for ActiveRecord 2.3.

And while you’re at it, upgrade your JRuby install to 1.3.

Maur�cio Linhares
http://alinhavado.wordpress.com/ (pt-br) |
http://codeshooter.wordpress.com/ (en)

On Fri, Jun 5, 2009 at 4:38 AM, Francesca

Thank you very much!!! :smiley:


#4

And also, if I have to use rails 2.3.2, how can I make it work with
glassfish?


#5

Francesca T. wrote:

Maurício Linhares wrote:

ActiveRecord tests will only work with JRuby for ActiveRecord 2.3.

And while you’re at it, upgrade your JRuby install to 1.3.

Maur�cio Linhares
http://alinhavado.wordpress.com/ (pt-br) |
http://codeshooter.wordpress.com/ (en)

On Fri, Jun 5, 2009 at 4:38 AM, Francesca

Thank you very much!!! :smiley:

I tryed to use ActiveRecord 2.3 and tests works but this following
errors:

Finished in 71.143069 seconds.

  1. Failure:
    test_add_limit_offset_should_sanitize_sql_injection_for_limit_with_comas(AdapterTest)
    [test/cases/adapter_test.rb:129:in
    test_add_limit_offset_should_sanitize_sql_injection_for_limit_with_comas' ./test/cases/../../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:inrun’]:
    <" LIMIT 1,7"> expected but was
    <" LIMIT 1, 7 procedure help()">.

  2. Failure:
    test_add_limit_offset_should_sanitize_sql_injection_for_limit_without_comas(AdapterTest)
    [test/cases/adapter_test.rb:115:in
    test_add_limit_offset_should_sanitize_sql_injection_for_limit_without_comas' ./test/cases/../../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:inrun’]:
    <" LIMIT 1"> expected but was
    <" LIMIT 1 select * from schema">.

  3. Failure:
    test_read_attributes_before_type_cast_on_datetime(BasicsTest)
    [test/cases/base_test.rb:148:in
    test_read_attributes_before_type_cast_on_datetime' ./test/cases/../../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:inrun’]:
    <“2009-06-09 09:29:03”> expected but was
    <“2009-06-09 09:29:03.0”>.

  4. Failure:
    test_update_all_with_order_and_limit_updates_subset_only(BasicsTest)
    [test/cases/base_test.rb:693:in
    test_update_all_with_order_and_limit_updates_subset_only' ./test/cases/../../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:inrun’]:
    Exception raised:
    Class: ActiveRecord::StatementInvalid
    Message: <“ActiveRecord::ActiveRecordError: This version of MySQL
    doesn’t yet support ‘LIMIT & IN/ALL/ANY/SOME subquery’: UPDATE posts
    SET body = ‘bulk update!’ WHERE id IN (SELECT id FROM posts WHERE
    (posts.author_id = 1) ORDER BY posts.id LIMIT 1)”>
    —Backtrace—
    ./test/cases/…/…/lib/active_record/connection_adapters/abstract_adapter.rb:212:in
    log' /home/ffrancy/.gem/jruby/1.8/gems/activerecord-jdbc-adapter-0.9.1/lib/active_record/connection_adapters/jdbc_adapter.rb:563:inexecute’
    ./test/cases/helper.rb:37:in execute_with_query_record' /home/ffrancy/.gem/jruby/1.8/gems/activerecord-jdbc-adapter-0.9.1/lib/active_record/connection_adapters/jdbc_adapter.rb:582:injdbc_update’
    ./test/cases/…/…/lib/active_record/connection_adapters/abstract/query_cache.rb:25:in
    update_with_query_dirty' ./test/cases/../../lib/active_record/base.rb:852:inupdate_all’
    ./test/cases/…/…/lib/active_record/associations/association_collection.rb:375:in
    method_missing' ./test/cases/../../lib/active_record/base.rb:2148:inwith_scope’
    ./test/cases/…/…/lib/active_record/associations/association_proxy.rb:206:in
    with_scope' ./test/cases/../../lib/active_record/associations/association_collection.rb:371:inmethod_missing’
    test/cases/base_test.rb:696:in
    test_update_all_with_order_and_limit_updates_subset_only' test/cases/base_test.rb:693:intest_update_all_with_order_and_limit_updates_subset_only’
    ./test/cases/…/…/…/activesupport/lib/active_support/testing/setup_and_teardown.rb:62:in
    `run’


  1. Failure:
    test_integer_creates_integer_column(ChangeTableMigrationsTest)
    [(eval):16:in integer' (eval):5:ineach’
    (eval):5:in integer' test/cases/migration_test.rb:1399:intest_integer_creates_integer_column’
    test/cases/migration_test.rb:1491:in with_change_table' ./test/cases/../../lib/active_record/connection_adapters/abstract/schema_statements.rb:175:inchange_table’
    test/cases/migration_test.rb:1490:in with_change_table' test/cases/migration_test.rb:1396:intest_integer_creates_integer_column’
    ./test/cases/…/…/…/activesupport/lib/active_support/testing/setup_and_teardown.rb:62:in
    `run’]:
    unexpected invocation:
    #ActiveRecord::ConnectionAdapters::JdbcAdapter:0x18b8.add_column(:delete_me,
    :foo, ‘integer(10)’, {})
    unsatisfied expectations:
  • expected exactly once, not yet invoked:
    #ActiveRecord::ConnectionAdapters::JdbcAdapter:0x18b8.add_column(:delete_me,
    :bar, ‘integer’, {})

  • expected exactly once, not yet invoked:
    #ActiveRecord::ConnectionAdapters::JdbcAdapter:0x18b8.add_column(:delete_me,
    :foo, ‘integer’, {})

    1. Error:
      test_create_table_with_defaults(MigrationTest):
      ActiveRecord::StatementInvalid: ActiveRecord::ActiveRecordError:
      BLOB/TEXT column ‘five’ can’t have a default value: CREATE TABLE
      testings (id int(11) DEFAULT NULL auto_increment PRIMARY KEY, one
      varchar(255) DEFAULT ‘hello’, two tinyint(1) DEFAULT 1, three
      tinyint(1) DEFAULT 0, four integer(10) DEFAULT 1, five text DEFAULT
      ‘hello’) ENGINE=InnoDB CHARACTER SET utf8
      ./test/cases/…/…/lib/active_record/connection_adapters/abstract_adapter.rb:212:in
      log' /home/ffrancy/.gem/jruby/1.8/gems/activerecord-jdbc-adapter-0.9.1/lib/active_record/connection_adapters/jdbc_adapter.rb:563:inexecute’
      ./test/cases/helper.rb:37:in execute_with_query_record' ./test/cases/../../lib/active_record/connection_adapters/abstract/schema_statements.rb:114:increate_table’
      /home/ffrancy/.gem/jruby/1.8/gems/activerecord-jdbc-adapter-0.9.1/lib/jdbc_adapter/jdbc_mysql.rb:171:in
      create_table' test/cases/migration_test.rb:149:intest_create_table_with_defaults’
      ./test/cases/…/…/…/activesupport/lib/active_support/testing/setup_and_teardown.rb:62:in
      `run’

    2. Failure:
      test_keeping_default_and_notnull_constaint_on_change(MigrationTest)
      [test/cases/migration_test.rb:775:in
      test_keeping_default_and_notnull_constaint_on_change' ./test/cases/../../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:inrun’]:
      expected but was
      .

    3. Failure:
      test_rename_column_preserves_default_value_not_null(MigrationTest)
      [test/cases/migration_test.rb:556:in
      test_rename_column_preserves_default_value_not_null' ./test/cases/../../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:inrun’]:
      <70000> expected but was
      .

    4. Failure:
      test_rename_nonexistent_column(MigrationTest)
      [test/cases/migration_test.rb:572:in
      test_rename_nonexistent_column' ./test/cases/../../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:inrun’]:
      ActiveRecord::ActiveRecordError exception expected but was
      Class:
      Message: <"undefined method []' for nil:NilClass"> ---Backtrace--- /home/ffrancy/.gem/jruby/1.8/gems/activerecord-jdbc-adapter-0.9.1/lib/jdbc_adapter/jdbc_mysql.rb:200:inrename_column’
      test/cases/migration_test.rb:573:in test_rename_nonexistent_column' test/cases/migration_test.rb:572:intest_rename_nonexistent_column’
      ./test/cases/…/…/…/activesupport/lib/active_support/testing/setup_and_teardown.rb:62:in
      `run’


  1. Failure:
    test_count_queries_with_cache(QueryCacheTest)
    [./test/cases/…/…/lib/active_record/test_case.rb:31:in
    assert_queries' test/cases/query_cache_test.rb:25:intest_count_queries_with_cache’
    ./test/cases/…/…/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in
    cache' ./test/cases/../../lib/active_record/query_cache.rb:9:incache’
    test/cases/query_cache_test.rb:24:in
    test_count_queries_with_cache' ./test/cases/../../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:inrun’]:
    2 instead of 1 queries were executed.
    Queries:
    SELECT count() AS count_all FROM tasks
    SELECT count(
    ) AS count_all FROM tasks .
    <1> expected but was
    <2>.

  2. Failure:
    test_schema_dump_includes_limit_constraint_for_integer_columns(SchemaDumperTest)
    [test/cases/schema_dumper_test.rb:113:in
    test_schema_dump_includes_limit_constraint_for_integer_columns' ./test/cases/../../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:inrun’]:
    <"# This file is auto-generated from the current state of the database.
    Instead of editing this file, \n# please use the migrations feature of
    Active Record to incrementally modify your database, and\n# then
    regenerate this schema definition.\n#\n# Note that this schema.rb
    definition is the authoritative source for your database schema. If you
    need\n# to create the application database on another system, you should
    be using db:schema:load, not running\n# all the migrations from scratch.
    The latter is a flawed and unsustainable approach (the more
    migrations\n# you’ll amass, the slower it’ll run and the greater
    likelihood for issues).\n#\n# It’s strongly recommended to check this
    file into your version control
    system.\n\nActiveRecord::Schema.define(:version => 0) do\n\n
    create_table “integer_limits”, :force => true do |t|\n t.integer
    “c_int_without_limit”\n t.integer “c_int_1”, :limit
    => 1\n t.integer “c_int_2”, :limit => 2\n t.integer
    “c_int_3”, :limit => 3\n t.integer “c_int_4”,
    :limit => 4\n t.integer “c_int_5”, :limit => 5\n
    t.integer “c_int_6”, :limit => 6\n t.integer
    “c_int_7”, :limit => 7\n t.integer “c_int_8”,
    :limit => 8\n end\n\nend\n"> expected to be =~
    </c_int_5.*:limit => 8/>.

  3. Failure:
    test_underlying_adapter_no_longer_active(TestUnconnectedAdapter)
    [test/cases/unconnected_test.rb:30:in
    test_underlying_adapter_no_longer_active' ./test/cases/../../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:inrun’]:
    Removed adapter should no longer be active.
    is not true.

  4. Failure:
    test_optionally_validates_length_of_using_within_on_create_utf8(ValidationsTest)
    [test/cases/validations_test.rb:1074:in
    test_optionally_validates_length_of_using_within_on_create_utf8' ./test/cases/../../lib/active_record/test_case.rb:57:inwith_kcode’
    test/cases/validations_test.rb:1065:in
    test_optionally_validates_length_of_using_within_on_create_utf8' ./test/cases/../../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:inrun’]:
    is not true.

  5. Failure:
    test_optionally_validates_length_of_using_within_on_update_utf8(ValidationsTest)
    [test/cases/validations_test.rb:1092:in
    test_optionally_validates_length_of_using_within_on_update_utf8' ./test/cases/../../lib/active_record/test_case.rb:57:inwith_kcode’
    test/cases/validations_test.rb:1088:in
    test_optionally_validates_length_of_using_within_on_update_utf8' ./test/cases/../../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:inrun’]:
    is not true.

  6. Failure:
    test_optionally_validates_length_of_using_within_utf8(ValidationsTest)
    [test/cases/validations_test.rb:1054:in
    test_optionally_validates_length_of_using_within_utf8' ./test/cases/../../lib/active_record/test_case.rb:57:inwith_kcode’
    test/cases/validations_test.rb:1050:in
    test_optionally_validates_length_of_using_within_utf8' ./test/cases/../../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:inrun’]:
    #<ActiveRecord::Errors:0x512bcf @errors={“title”=>[“is too long (maximum
    is 5 characters)”]}, @base=#<Topic id: nil, title: “一二三四五”, author_name:
    nil, author_email_address: “removed_email_address@domain.invalid”, written_on: nil, bonus_time:
    nil, last_read: nil, content: nil, approved: true, replies_count: 0,
    parent_id: nil, type: nil>>.
    is not true.

  7. Failure:
    test_validate_case_sensitive_uniqueness(ValidationsTest)
    [test/cases/validations_test.rb:485:in
    test_validate_case_sensitive_uniqueness' ./test/cases/../../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:inrun’]:
    Should be valid.
    is not true.

  8. Failure:
    test_validates_length_of_using_is_utf8(ValidationsTest)
    [test/cases/validations_test.rb:1114:in
    test_validates_length_of_using_is_utf8' ./test/cases/../../lib/active_record/test_case.rb:57:inwith_kcode’
    test/cases/validations_test.rb:1110:in
    test_validates_length_of_using_is_utf8' ./test/cases/../../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:inrun’]:
    is not true.

  9. Failure:
    test_validates_length_of_using_maximum_utf8(ValidationsTest)
    [test/cases/validations_test.rb:1026:in
    test_validates_length_of_using_maximum_utf8' ./test/cases/../../lib/active_record/test_case.rb:57:inwith_kcode’
    test/cases/validations_test.rb:1022:in
    test_validates_length_of_using_maximum_utf8' ./test/cases/../../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:inrun’]:
    is not true.

  10. Failure:
    test_validates_length_of_using_minimum_utf8(ValidationsTest)
    [test/cases/validations_test.rb:1015:in
    test_validates_length_of_using_minimum_utf8' ./test/cases/../../lib/active_record/test_case.rb:57:inwith_kcode’
    test/cases/validations_test.rb:1008:in
    test_validates_length_of_using_minimum_utf8' ./test/cases/../../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:inrun’]:
    is not true.

  11. Failure:
    test_validates_length_of_using_within_utf8(ValidationsTest)
    [test/cases/validations_test.rb:1041:in
    test_validates_length_of_using_within_utf8' ./test/cases/../../lib/active_record/test_case.rb:57:inwith_kcode’
    test/cases/validations_test.rb:1036:in
    test_validates_length_of_using_within_utf8' ./test/cases/../../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:inrun’]:
    <“is too short (minimum is 3 characters)”> expected but was
    <“is too long (maximum is 5 characters)”>.

2013 tests, 6503 assertions, 19 failures, 1 errors
rake aborted!
Command failed with status (1): [/opt/jruby/bin/jruby
-Ilib:test:test/conne…]

I have to say that I’m using JRuby 1.6, Glassfish V 3 Prelude, Rails
2.2.2 and NetBeans IDE.

How can I make everything work?
Do I have to upgrade something?

Thanks!!!