Oracle Thin JDBC working with some tweaks

20 views
Skip to first unread message

Tina Tsui

unread,
Nov 6, 2012, 9:27:48 AM11/6/12
to rubycas...@googlegroups.com
I have successfully tweaked RubyCas Server to use Oracle Thin JDBC adapter.  I encounter an error -- a compatibility issue between  activerecord-jdbc-adapter (1.2.2.1) and  activerecord (~> 2.3.12).  I get the error:

NoMethodError: undefined method `string_to_time' for #<Class:0x5e0a14a>
        from org/jruby/RubyBasicObject.java:1687:in `method_missing'
        from /opt/apps/jruby-1.6.7.2/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/base.rb:1998:in `method_missing'
        from /opt/apps/jruby-1.6.7.2/lib/ruby/gems/1.8/gems/activerecord-jdbc-adapter-1.2.2.1/lib/arjdbc/oracle/adapter.rb:77:in `string_to_time'
        from /opt/apps/jruby-1.6.7.2/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/attribute_methods.rb:1:in `created_on'
        from (irb):20:in `evaluate'
        from org/jruby/RubyKernel.java:1088:in `eval'
        from org/jruby/RubyKernel.java:1410:in `loop'
        from org/jruby/RubyKernel.java:1197:in `catch'
        from org/jruby/RubyKernel.java:1197:in `catch'
        from /opt/apps/jruby/bin/irb:13:in `(root)'

whenever LoginTicket, ServiceTicket,etc instances are sent the message "created_on" as in:
lt.created_on )

It works fine when I use the lower level accessor read_attribute() method as in:


Tina Tsui

unread,
Nov 6, 2012, 9:31:33 AM11/6/12
to rubycas...@googlegroups.com
Sorry -- hit the wrong key and posted before I could finish the post.

So the work around is to change:
lt.created_on

to:
lt.read_attribute("created_on")

I have found that this works properly with ActiveRecord 3.2.8
But I get alot of errors if I use ActiveRecord 3.2.8

Are there any plans to update RubyCas Server to the latest version of ActiveRecord?

Thanks,
Tina

t.pickett66

unread,
Nov 6, 2012, 3:09:58 PM11/6/12
to rubycas...@googlegroups.com
Tina,

I've done some work on getting ActiveRecord 3.2 up and running with the server but clearly it isn't a complete update since I believe there was some desire to remain compatible with everything back to 2.3. This is why my update was only enough to get things running but not enough to get all of the code cleaned and locked to 3.2. I believe if there is enough interest from the community there wouldn't be any objections to abandoning support for multiple versions of ActiveRecord but that's not a decision I can make alone.
Reply all
Reply to author
Forward
0 new messages