jruby/activerecord-jdbc-adapter — Issue #137: undefined method arel2_visitors in jdbc connection
Author: storm255
Created: 2011-11-28 08:10:27+00:00
State: open

Apologies for my unfamiliarity with the adapter but I am just trying to switch an application from ruby to jruby to take advantage of the Cache JDBC jar and there seems to have been changes recently preventing pure JDBC connections from succeeding.

I have been able to connect using version 0.9.6 from last year, but with Rails 3.1 and adapter 1.2.1 I am receiving the error below whichever way I try and define a connection.

I connected successfully directly in java so my authentication details etc are correct. I have also attempted to use the extracted activerecord-jdbccache-adapter but get a similar error.

Any documentation you can point me towards would be helpful, or perhaps a workaround.

Kind regards,

Mark.

Environment details: Debian Squeeze, jruby 1.65, Rails 3.1, Intersystems Cache DB

NoMethodError: undefined method `arel2_visitors' for #
from /usr/local/rvm/gems/jruby-1.6.5@cache/gems/activerecord-jdbc-adapter-1.2.1/lib/arjdbc/jdbc/adapter.rb:115:in `configure_arel2_visitors'
from /usr/local/rvm/gems/jruby-1.6.5@cache/gems/activerecord-jdbc-adapter-1.2.1/lib/arjdbc/jdbc/adapter.rb:38:in `initialize'
from /usr/local/rvm/gems/jruby-1.6.5@cache/gems/activerecord-jdbc-adapter-1.2.1/lib/arjdbc/jdbc/connection_methods.rb:6:in `jdbc_connection'
from org/jruby/RubyBasicObject.java:1694:in `__send__'
from org/jruby/RubyKernel.java:2118:in `send'
from /usr/local/rvm/gems/jruby-1.6.5@cache/gems/activerecord-3.1.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:304:in `new_connection'
from /usr/local/rvm/gems/jruby-1.6.5@cache/gems/activerecord-3.1.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:323:in `checkout_new_connection'
from /usr/local/rvm/gems/jruby-1.6.5@cache/gems/activerecord-3.1.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:265:in `checkout'
from org/jruby/RubyKernel.java:1420:in `loop'
from /usr/local/rvm/gems/jruby-1.6.5@cache/gems/activerecord-3.1.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:261:in `checkout'
from /usr/local/rvm/rubies/jruby-1.6.5/lib/ruby/1.9/monitor.rb:201:in `mon_synchronize'
from /usr/local/rvm/gems/jruby-1.6.5@cache/gems/activerecord-3.1.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:260:in `checkout'
from /usr/local/rvm/gems/jruby-1.6.5@cache/gems/activerecord-3.1.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:162:in `connection'
from /usr/local/rvm/gems/jruby-1.6.5@cache/gems/activerecord-3.1.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:409:in `retrieve_connection'
from /usr/local/rvm/gems/jruby-1.6.5@cache/gems/activerecord-3.1.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in `retrieve_connection'
from /usr/local/rvm/gems/jruby-1.6.5@cache/gems/activerecord-3.1.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:89:in `connection'
... 15 levels...
from /usr/local/rvm/gems/jruby-1.6.5@cache/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:455:in `load_file'
from /usr/local/rvm/gems/jruby-1.6.5@cache/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:342:in `require_or_load'
from /usr/local/rvm/gems/jruby-1.6.5@cache/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:489:in `load_missing_constant'
from /usr/local/rvm/gems/jruby-1.6.5@cache/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:181:in `const_missing'
from org/jruby/RubyArray.java:1612:in `each'
from /usr/local/rvm/gems/jruby-1.6.5@cache/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:179:in `const_missing'
from (irb):1:in `evaluate'
from org/jruby/RubyKernel.java:1093:in `eval'
from org/jruby/RubyKernel.java:1420:in `loop'
from org/jruby/RubyKernel.java:1206:in `catch'
from org/jruby/RubyKernel.java:1206:in `catch'
from /usr/local/rvm/gems/jruby-1.6.5@cache/gems/railties-3.1.3/lib/rails/commands/console.rb:45:in `start'
from /usr/local/rvm/gems/jruby-1.6.5@cache/gems/railties-3.1.3/lib/rails/commands/console.rb:8:in `start'
from /usr/local/rvm/gems/jruby-1.6.5@cache/gems/railties-3.1.3/lib/rails/commands.rb:40:in `(root)'
from org/jruby/RubyKernel.java:1047:in `require'