|
View:
New views
10 Messages
—
Rating Filter:
Alert me
|
|
|
AR-JDBC-0.7.1 issues with Oracle 10gI'm trying to upgrade my existing JRuby 1.0.3/AR-JDBC 0.6/Oracle 10g app
to use JRuby 1.1RC/AR-JDBC 0.7.1 and I'm seeing some issues around AR-JDBC when AR tries to insert data into a table. BTW, I'm still using Rails 1.2.6/AR 1.15.6. Here's simple example: Domain.create! :name => "test" In ar-jdbc 0.6, this generated the following insert statement: INSERT INTO domains (name, id) VALUES('test', 1) With ar-jdbc 0.7.1, I get: INSERT INTO domains (name) VALUES('test') This results in an "Invalid column index" error: /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:128:in `log': ActiveRecord::ActiveRecordError: Invalid column index: INSERT INTO domains (name) VALUES('test.com') (ActiveRecord::StatementInvalid) from /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:110:in `insert' from /home/rich/dev/mix/script/../config/../vendor/activerecord-jdbc-adapter-0.7.1/lib/jdbc_adapter/jdbc_oracle.rb:144:in `create' from /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/callbacks.rb:254:in `create_with_callbacks' from /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/timestamp.rb:30:in `create_with_timestamps' from /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/base.rb:1792:in `create_or_update' from /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/callbacks.rb:242:in `create_or_update_with_callbacks' from /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/base.rb:1554:in `save!' from /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/validations.rb:762:in `save_with_validation!' from /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/transactions.rb:135:in `save_with_transactions!' from /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/transactions.rb:135:in `transaction' from /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/transactions.rb:96:in `transaction' from /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/transactions.rb:86:in `transaction' from /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/transactions.rb:135:in `save_with_transactions!' from /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/transactions.rb:135:in `create!' from (eval):1 I've been adding debug statements all over AR and AR-JDBC to see how this statement is getting constructed, but haven't had any luck. I also tried using AR-JDBC 0.6 with JRuby 1.1RC1, but seems like JRuby 1.1RC wants AR-JDBC 0.7.1... is 0.7.1 a requirement with JRuby 1.1? Rich --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: AR-JDBC-0.7.1 issues with Oracle 10gIgnore... it's been reported and a hack exists ->
http://rubyforge.org/tracker/?func=detail&atid=7857&aid=16789&group_id=2014 Rich Rich Manalang wrote: > I'm trying to upgrade my existing JRuby 1.0.3/AR-JDBC 0.6/Oracle 10g > app to use JRuby 1.1RC/AR-JDBC 0.7.1 and I'm seeing some issues around > AR-JDBC when AR tries to insert data into a table. BTW, I'm still > using Rails 1.2.6/AR 1.15.6. Here's simple example: > > Domain.create! :name => "test" > > In ar-jdbc 0.6, this generated the following insert statement: > > INSERT INTO domains (name, id) VALUES('test', 1) > > With ar-jdbc 0.7.1, I get: > > INSERT INTO domains (name) VALUES('test') > > This results in an "Invalid column index" error: > > /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:128:in > `log': ActiveRecord::ActiveRecordError: Invalid column index: INSERT > INTO domains (name) VALUES('test.com') (ActiveRecord::StatementInvalid) > from > /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:110:in > `insert' > from > /home/rich/dev/mix/script/../config/../vendor/activerecord-jdbc-adapter-0.7.1/lib/jdbc_adapter/jdbc_oracle.rb:144:in > `create' > from > /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/callbacks.rb:254:in > `create_with_callbacks' > from > /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/timestamp.rb:30:in > `create_with_timestamps' > from > /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/base.rb:1792:in > `create_or_update' > from > /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/callbacks.rb:242:in > `create_or_update_with_callbacks' > from > /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/base.rb:1554:in > `save!' > from > /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/validations.rb:762:in > `save_with_validation!' > from > /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/transactions.rb:135:in > `save_with_transactions!' > from > /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/transactions.rb:135:in > `transaction' > from > /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/transactions.rb:96:in > `transaction' > from > /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/transactions.rb:86:in > `transaction' > from > /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/transactions.rb:135:in > `save_with_transactions!' > from > /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/transactions.rb:135:in > `create!' > from (eval):1 > > I've been adding debug statements all over AR and AR-JDBC to see how > this statement is getting constructed, but haven't had any luck. I > also tried using AR-JDBC 0.6 with JRuby 1.1RC1, but seems like JRuby > 1.1RC wants AR-JDBC 0.7.1... is 0.7.1 a requirement with JRuby 1.1? > > Rich --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: AR-JDBC-0.7.1 issues with Oracle 10gOn Feb 12, 2008, at 12:38 AM, Rich Manalang wrote:
> I'm trying to upgrade my existing JRuby 1.0.3/AR-JDBC 0.6/Oracle 10g > app to use JRuby 1.1RC/AR-JDBC 0.7.1 and I'm seeing some issues > around AR-JDBC when AR tries to insert data into a table. BTW, I'm > still using Rails 1.2.6/AR 1.15.6. Here's simple example: > > Domain.create! :name => "test" > > In ar-jdbc 0.6, this generated the following insert statement: > > INSERT INTO domains (name, id) VALUES('test', 1) > > With ar-jdbc 0.7.1, I get: > > INSERT INTO domains (name) VALUES('test') > > This results in an "Invalid column index" error: > > /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/ > connection_adapters/abstract_adapter.rb:128:in `log': > ActiveRecord::ActiveRecordError: Invalid column index: INSERT INTO > domains (name) VALUES('test.com') (ActiveRecord::StatementInvalid) You're not the first one to report this lately -- I'd like to know exactly what is going on here, and what the fix is. Anyone? /Nick --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: AR-JDBC-0.7.1 issues with Oracle 10gNick Sieger wrote:
> On Feb 12, 2008, at 12:38 AM, Rich Manalang wrote: > >> I'm trying to upgrade my existing JRuby 1.0.3/AR-JDBC 0.6/Oracle 10g >> app to use JRuby 1.1RC/AR-JDBC 0.7.1 and I'm seeing some issues >> around AR-JDBC when AR tries to insert data into a table. BTW, I'm >> still using Rails 1.2.6/AR 1.15.6. Here's simple example: >> >> Domain.create! :name => "test" >> >> In ar-jdbc 0.6, this generated the following insert statement: >> >> INSERT INTO domains (name, id) VALUES('test', 1) >> >> With ar-jdbc 0.7.1, I get: >> >> INSERT INTO domains (name) VALUES('test') >> >> This results in an "Invalid column index" error: >> >> /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:128:in >> `log': ActiveRecord::ActiveRecordError: Invalid column index: INSERT >> INTO domains (name) VALUES('test.com') (ActiveRecord::StatementInvalid) > > You're not the first one to report this lately -- I'd like to know > exactly what is going on here, and what the fix is. Anyone? > > /Nick > > --------------------------------------------------------------------- 2007-10-22. -- Ola Bini (http://ola-bini.blogspot.com) JRuby Core Developer Developer, ThoughtWorks Studios (http://studios.thoughtworks.com) Practical JRuby on Rails (http://apress.com/book/view/9781590598818) "Yields falsehood when quined" yields falsehood when quined. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: AR-JDBC-0.7.1 issues with Oracle 10gOn Feb 12, 2008, at 9:14 AM, Ola Bini wrote:
> Nick Sieger wrote: >> On Feb 12, 2008, at 12:38 AM, Rich Manalang wrote: >> >>> I'm trying to upgrade my existing JRuby 1.0.3/AR-JDBC 0.6/Oracle >>> 10g app to use JRuby 1.1RC/AR-JDBC 0.7.1 and I'm seeing some >>> issues around AR-JDBC when AR tries to insert data into a table. >>> BTW, I'm still using Rails 1.2.6/AR 1.15.6. Here's simple example: >>> >>> Domain.create! :name => "test" >>> >>> In ar-jdbc 0.6, this generated the following insert statement: >>> >>> INSERT INTO domains (name, id) VALUES('test', 1) >>> >>> With ar-jdbc 0.7.1, I get: >>> >>> INSERT INTO domains (name) VALUES('test') >>> >>> This results in an "Invalid column index" error: >>> >>> /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/ >>> connection_adapters/abstract_adapter.rb:128:in `log': >>> ActiveRecord::ActiveRecordError: Invalid column index: INSERT INTO >>> domains (name) VALUES('test.com') (ActiveRecord::StatementInvalid) >> >> You're not the first one to report this lately -- I'd like to know >> exactly what is going on here, and what the fix is. Anyone? >> >> /Nick >> >> --------------------------------------------------------------------- > This is very strange. The last time jdbc_oracle.rb was even modified > was 2007-10-22. And the entirety of the changes between the two releases is attached here: http://pastie.org/150922 I haven't been able to spot the offending code yet. What's more, a friend has the ar-jdbc tests running fine on Oracle (although the ar-jdbc tests are admittedly minimal, but they do cover basic inserts). The mystery continues. /Nick --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: AR-JDBC-0.7.1 issues with Oracle 10gOn Feb 12, 2008, at 9:54 AM, Nick Sieger wrote: > On Feb 12, 2008, at 9:14 AM, Ola Bini wrote: > >> Nick Sieger wrote: >>> On Feb 12, 2008, at 12:38 AM, Rich Manalang wrote: >>> >>>> I'm trying to upgrade my existing JRuby 1.0.3/AR-JDBC 0.6/Oracle >>>> 10g app to use JRuby 1.1RC/AR-JDBC 0.7.1 and I'm seeing some >>>> issues around AR-JDBC when AR tries to insert data into a table. >>>> BTW, I'm still using Rails 1.2.6/AR 1.15.6. Here's simple example: >>>> >>>> Domain.create! :name => "test" >>>> >>>> In ar-jdbc 0.6, this generated the following insert statement: >>>> >>>> INSERT INTO domains (name, id) VALUES('test', 1) >>>> >>>> With ar-jdbc 0.7.1, I get: >>>> >>>> INSERT INTO domains (name) VALUES('test') >>>> >>>> This results in an "Invalid column index" error: >>>> >>>> /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/ >>>> connection_adapters/abstract_adapter.rb:128:in `log': >>>> ActiveRecord::ActiveRecordError: Invalid column index: INSERT >>>> INTO domains (name) VALUES('test.com') >>>> (ActiveRecord::StatementInvalid) >>> >>> You're not the first one to report this lately -- I'd like to know >>> exactly what is going on here, and what the fix is. Anyone? >>> >>> /Nick >>> >>> --------------------------------------------------------------------- >> This is very strange. The last time jdbc_oracle.rb was even >> modified was 2007-10-22. > > And the entirety of the changes between the two releases is attached > here: > > http://pastie.org/150922 > > I haven't been able to spot the offending code yet. > > What's more, a friend has the ar-jdbc tests running fine on Oracle > (although the ar-jdbc tests are admittedly minimal, but they do > cover basic inserts). > > The mystery continues. Hey Rich, This issue was reported on IRC as well, and ar-jdbc trunk was reported to fix it. Can you try running with a 0.7.2 pre-release gem and see if the problem goes away? jruby -S gem install activerecord-jdbc-adapter --source http://caldersphere.net Thanks, /Nick --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: AR-JDBC-0.7.1 issues with Oracle 10gNick Sieger wrote:
> > On Feb 12, 2008, at 9:54 AM, Nick Sieger wrote: > >> On Feb 12, 2008, at 9:14 AM, Ola Bini wrote: >> >>> Nick Sieger wrote: >>>> On Feb 12, 2008, at 12:38 AM, Rich Manalang wrote: >>>> >>>>> I'm trying to upgrade my existing JRuby 1.0.3/AR-JDBC 0.6/Oracle >>>>> 10g app to use JRuby 1.1RC/AR-JDBC 0.7.1 and I'm seeing some >>>>> issues around AR-JDBC when AR tries to insert data into a table. >>>>> BTW, I'm still using Rails 1.2.6/AR 1.15.6. Here's simple example: >>>>> >>>>> Domain.create! :name => "test" >>>>> >>>>> In ar-jdbc 0.6, this generated the following insert statement: >>>>> >>>>> INSERT INTO domains (name, id) VALUES('test', 1) >>>>> >>>>> With ar-jdbc 0.7.1, I get: >>>>> >>>>> INSERT INTO domains (name) VALUES('test') >>>>> >>>>> This results in an "Invalid column index" error: >>>>> >>>>> /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:128:in >>>>> `log': ActiveRecord::ActiveRecordError: Invalid column index: >>>>> INSERT INTO domains (name) VALUES('test.com') >>>>> (ActiveRecord::StatementInvalid) >>>> >>>> You're not the first one to report this lately -- I'd like to know >>>> exactly what is going on here, and what the fix is. Anyone? >>>> >>>> /Nick >>>> >>>> --------------------------------------------------------------------- >>> This is very strange. The last time jdbc_oracle.rb was even modified >>> was 2007-10-22. >> >> And the entirety of the changes between the two releases is attached >> here: >> >> http://pastie.org/150922 >> >> I haven't been able to spot the offending code yet. >> >> What's more, a friend has the ar-jdbc tests running fine on Oracle >> (although the ar-jdbc tests are admittedly minimal, but they do cover >> basic inserts). >> >> The mystery continues. > > Hey Rich, > > This issue was reported on IRC as well, and ar-jdbc trunk was reported > to fix it. Can you try running with a 0.7.2 pre-release gem and see if > the problem goes away? > > jruby -S gem install activerecord-jdbc-adapter --source > http://caldersphere.net > > Thanks, > /Nick > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > How close is 0.7.2 from being baked? I'm going to start running ar-jdbc ci tests soon... just need to set up an environment. Rich --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: AR-JDBC-0.7.1 issues with Oracle 10gOn Feb 12, 2008, at 11:53 AM, Rich Manalang wrote:
> Nick Sieger wrote: >> >> On Feb 12, 2008, at 9:54 AM, Nick Sieger wrote: >> >>> On Feb 12, 2008, at 9:14 AM, Ola Bini wrote: >>> >>>> Nick Sieger wrote: >>>>> On Feb 12, 2008, at 12:38 AM, Rich Manalang wrote: >>>>> >>>>>> I'm trying to upgrade my existing JRuby 1.0.3/AR-JDBC 0.6/ >>>>>> Oracle 10g app to use JRuby 1.1RC/AR-JDBC 0.7.1 and I'm seeing >>>>>> some issues around AR-JDBC when AR tries to insert data into a >>>>>> table. BTW, I'm still using Rails 1.2.6/AR 1.15.6. Here's >>>>>> simple example: >>>>>> >>>>>> Domain.create! :name => "test" >>>>>> >>>>>> In ar-jdbc 0.6, this generated the following insert statement: >>>>>> >>>>>> INSERT INTO domains (name, id) VALUES('test', 1) >>>>>> >>>>>> With ar-jdbc 0.7.1, I get: >>>>>> >>>>>> INSERT INTO domains (name) VALUES('test') >>>>>> >>>>>> This results in an "Invalid column index" error: >>>>>> >>>>>> /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/ >>>>>> connection_adapters/abstract_adapter.rb:128:in `log': >>>>>> ActiveRecord::ActiveRecordError: Invalid column index: INSERT >>>>>> INTO domains (name) VALUES('test.com') >>>>>> (ActiveRecord::StatementInvalid) >>>>> >>>>> You're not the first one to report this lately -- I'd like to >>>>> know exactly what is going on here, and what the fix is. Anyone? >>>>> >>>>> /Nick >>>>> >>>>> --------------------------------------------------------------------- >>>> This is very strange. The last time jdbc_oracle.rb was even >>>> modified was 2007-10-22. >>> >>> And the entirety of the changes between the two releases is >>> attached here: >>> >>> http://pastie.org/150922 >>> >>> I haven't been able to spot the offending code yet. >>> >>> What's more, a friend has the ar-jdbc tests running fine on Oracle >>> (although the ar-jdbc tests are admittedly minimal, but they do >>> cover basic inserts). >>> >>> The mystery continues. >> >> Hey Rich, >> >> This issue was reported on IRC as well, and ar-jdbc trunk was >> reported to fix it. Can you try running with a 0.7.2 pre-release >> gem and see if the problem goes away? >> >> jruby -S gem install activerecord-jdbc-adapter --source http://caldersphere.net >> >> Thanks, >> /Nick >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> > Yep... 0.7.2 fixed it. I wonder what caused the regression in > 0.7.1. How close is 0.7.2 from being baked? I think we could release it immediately if there are no other outstanding complaints. Just need to do a round-up on any issues in JIRA or rubyforge to make sure there aren't any blockers. /Nick --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: AR-JDBC-0.7.1 issues with Oracle 10gJust found something. My app uses the Comatose plugin and when I do a
jruby -S rake db:migrate, I get the following error with 0.7.1/2 == AddComatoseSupport: migrating ============================================== -- create_table(:comatose_pages) -> 0.1865s Creating the default 'Home Page'... rake aborted! ActiveRecord::ActiveRecordError: Invalid column index: INSERT INTO comatose_pages (author, body, created_on, filter_type, full_path, keywords, parent_id, position, slug, title, updated_on, version) VALUES('System', empty_clob(), TIMESTAMP'2008-02-12 11:30:50', 'Textile', '', null, null, 0, 'home-page', 'Mix', TIMESTAMP'2008-02-12 11:30:50', 1) If I apply the hack specified on this page -> http://rubyforge.org/tracker/?func=detail&atid=7857&aid=16789&group_id=2014 ... it works. The hack is to add the following to your environment.rb: module ::JdbcSpec module Oracle def prefetch_primary_key?(table_name = nil) true end def next_sequence_value(sequence_name) select_one("select #{sequence_name}.nextval id from dual")['id'].to_i end end end Rich On Feb 12, 2008 10:01 AM, Nick Sieger <nicksieger@...> wrote: > > On Feb 12, 2008, at 11:53 AM, Rich Manalang wrote: > > > Nick Sieger wrote: > >> > >> On Feb 12, 2008, at 9:54 AM, Nick Sieger wrote: > >> > >>> On Feb 12, 2008, at 9:14 AM, Ola Bini wrote: > >>> > >>>> Nick Sieger wrote: > >>>>> On Feb 12, 2008, at 12:38 AM, Rich Manalang wrote: > >>>>> > >>>>>> I'm trying to upgrade my existing JRuby 1.0.3/AR-JDBC 0.6/ > >>>>>> Oracle 10g app to use JRuby 1.1RC/AR-JDBC 0.7.1 and I'm seeing > >>>>>> some issues around AR-JDBC when AR tries to insert data into a > >>>>>> table. BTW, I'm still using Rails 1.2.6/AR 1.15.6. Here's > >>>>>> simple example: > >>>>>> > >>>>>> Domain.create! :name => "test" > >>>>>> > >>>>>> In ar-jdbc 0.6, this generated the following insert statement: > >>>>>> > >>>>>> INSERT INTO domains (name, id) VALUES('test', 1) > >>>>>> > >>>>>> With ar-jdbc 0.7.1, I get: > >>>>>> > >>>>>> INSERT INTO domains (name) VALUES('test') > >>>>>> > >>>>>> This results in an "Invalid column index" error: > >>>>>> > >>>>>> /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/ > >>>>>> connection_adapters/abstract_adapter.rb:128:in `log': > >>>>>> ActiveRecord::ActiveRecordError: Invalid column index: INSERT > >>>>>> INTO domains (name) VALUES('test.com') > >>>>>> (ActiveRecord::StatementInvalid) > >>>>> > >>>>> You're not the first one to report this lately -- I'd like to > >>>>> know exactly what is going on here, and what the fix is. Anyone? > >>>>> > >>>>> /Nick > >>>>> > >>>>> --------------------------------------------------------------------- > >>>> This is very strange. The last time jdbc_oracle.rb was even > >>>> modified was 2007-10-22. > >>> > >>> And the entirety of the changes between the two releases is > >>> attached here: > >>> > >>> http://pastie.org/150922 > >>> > >>> I haven't been able to spot the offending code yet. > >>> > >>> What's more, a friend has the ar-jdbc tests running fine on Oracle > >>> (although the ar-jdbc tests are admittedly minimal, but they do > >>> cover basic inserts). > >>> > >>> The mystery continues. > >> > >> Hey Rich, > >> > >> This issue was reported on IRC as well, and ar-jdbc trunk was > >> reported to fix it. Can you try running with a 0.7.2 pre-release > >> gem and see if the problem goes away? > >> > >> jruby -S gem install activerecord-jdbc-adapter --source http://caldersphere.net > >> > >> Thanks, > >> /Nick > >> > >> --------------------------------------------------------------------- > >> To unsubscribe from this list, please visit: > >> > >> http://xircles.codehaus.org/manage_email > >> > >> > > Yep... 0.7.2 fixed it. I wonder what caused the regression in > > 0.7.1. How close is 0.7.2 from being baked? > > I think we could release it immediately if there are no other > outstanding complaints. Just need to do a round-up on any issues in > JIRA or rubyforge to make sure there aren't any blockers. > > > /Nick > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: AR-JDBC-0.7.1 issues with Oracle 10gBTW, here's the Comatose migrate script:
module Comatose class Page < ActiveRecord::Base set_table_name 'comatose_pages' acts_as_versioned :if_changed => [:title, :slug, :keywords, :body] end end class AddComatoseSupport < ActiveRecord::Migration # Schema for Comatose version 0.7+ def self.up create_table :comatose_pages do |t| t.column "parent_id", :integer t.column "full_path", :string, :default => '' t.column "title", :string, :limit => 255 t.column "slug", :string, :limit => 255 t.column "keywords", :string, :limit => 255 t.column "body", :text t.column "filter_type", :string, :limit => 25, :default => "Textile" t.column "author", :string, :limit => 255 t.column "position", :integer, :default => 0 t.column "version", :integer t.column "updated_on", :datetime t.column "created_on", :datetime end Comatose::Page.create_versioned_table puts "Creating the default 'Home Page'..." Comatose::Page.create( :title => 'Mix', :body => 'Nothing here', :author => 'System', :slug => 'home-page', :full_path => '' ) end def self.down Comatose::Page.drop_versioned_table drop_table :comatose_pages end end On Feb 12, 2008 11:32 AM, Rich Manalang <rich.manalang@...> wrote: > Just found something. My app uses the Comatose plugin and when I do a > jruby -S rake db:migrate, I get the following error with 0.7.1/2 > > == AddComatoseSupport: migrating ============================================== > -- create_table(:comatose_pages) > -> 0.1865s > Creating the default 'Home Page'... > rake aborted! > ActiveRecord::ActiveRecordError: Invalid column index: INSERT INTO > comatose_pages (author, body, created_on, filter_type, full_path, > keywords, parent_id, position, slug, title, updated_on, version) > VALUES('System', empty_clob(), TIMESTAMP'2008-02-12 11:30:50', > 'Textile', '', null, null, 0, 'home-page', 'Mix', TIMESTAMP'2008-02-12 > 11:30:50', 1) > > > If I apply the hack specified on this page -> > http://rubyforge.org/tracker/?func=detail&atid=7857&aid=16789&group_id=2014 > > ... it works. > > The hack is to add the following to your environment.rb: > > module ::JdbcSpec > module Oracle > def prefetch_primary_key?(table_name = nil) > true > end > > def next_sequence_value(sequence_name) > select_one("select #{sequence_name}.nextval id from > dual")['id'].to_i > end > > end > end > > Rich > > > > On Feb 12, 2008 10:01 AM, Nick Sieger <nicksieger@...> wrote: > > > > On Feb 12, 2008, at 11:53 AM, Rich Manalang wrote: > > > > > Nick Sieger wrote: > > >> > > >> On Feb 12, 2008, at 9:54 AM, Nick Sieger wrote: > > >> > > >>> On Feb 12, 2008, at 9:14 AM, Ola Bini wrote: > > >>> > > >>>> Nick Sieger wrote: > > >>>>> On Feb 12, 2008, at 12:38 AM, Rich Manalang wrote: > > >>>>> > > >>>>>> I'm trying to upgrade my existing JRuby 1.0.3/AR-JDBC 0.6/ > > >>>>>> Oracle 10g app to use JRuby 1.1RC/AR-JDBC 0.7.1 and I'm seeing > > >>>>>> some issues around AR-JDBC when AR tries to insert data into a > > >>>>>> table. BTW, I'm still using Rails 1.2.6/AR 1.15.6. Here's > > >>>>>> simple example: > > >>>>>> > > >>>>>> Domain.create! :name => "test" > > >>>>>> > > >>>>>> In ar-jdbc 0.6, this generated the following insert statement: > > >>>>>> > > >>>>>> INSERT INTO domains (name, id) VALUES('test', 1) > > >>>>>> > > >>>>>> With ar-jdbc 0.7.1, I get: > > >>>>>> > > >>>>>> INSERT INTO domains (name) VALUES('test') > > >>>>>> > > >>>>>> This results in an "Invalid column index" error: > > >>>>>> > > >>>>>> /home/rich/dev/mix/vendor/rails/activerecord/lib/active_record/ > > >>>>>> connection_adapters/abstract_adapter.rb:128:in `log': > > >>>>>> ActiveRecord::ActiveRecordError: Invalid column index: INSERT > > >>>>>> INTO domains (name) VALUES('test.com') > > >>>>>> (ActiveRecord::StatementInvalid) > > >>>>> > > >>>>> You're not the first one to report this lately -- I'd like to > > >>>>> know exactly what is going on here, and what the fix is. Anyone? > > >>>>> > > >>>>> /Nick > > >>>>> > > >>>>> --------------------------------------------------------------------- > > >>>> This is very strange. The last time jdbc_oracle.rb was even > > >>>> modified was 2007-10-22. > > >>> > > >>> And the entirety of the changes between the two releases is > > >>> attached here: > > >>> > > >>> http://pastie.org/150922 > > >>> > > >>> I haven't been able to spot the offending code yet. > > >>> > > >>> What's more, a friend has the ar-jdbc tests running fine on Oracle > > >>> (although the ar-jdbc tests are admittedly minimal, but they do > > >>> cover basic inserts). > > >>> > > >>> The mystery continues. > > >> > > >> Hey Rich, > > >> > > >> This issue was reported on IRC as well, and ar-jdbc trunk was > > >> reported to fix it. Can you try running with a 0.7.2 pre-release > > >> gem and see if the problem goes away? > > >> > > >> jruby -S gem install activerecord-jdbc-adapter --source http://caldersphere.net > > >> > > >> Thanks, > > >> /Nick > > >> > > >> --------------------------------------------------------------------- > > >> To unsubscribe from this list, please visit: > > >> > > >> http://xircles.codehaus.org/manage_email > > >> > > >> > > > Yep... 0.7.2 fixed it. I wonder what caused the regression in > > > 0.7.1. How close is 0.7.2 from being baked? > > > > I think we could release it immediately if there are no other > > outstanding complaints. Just need to do a round-up on any issues in > > JIRA or rubyforge to make sure there aren't any blockers. > > > > > > /Nick > > > > --------------------------------------------------------------------- > > To unsubscribe from this list, please visit: > > > > http://xircles.codehaus.org/manage_email > > > > > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free Forum Powered by Nabble | Forum Help |