JRuby

Fixture insert generation process, columns of Oracle datatype "DATE" have the string "TIMESTAMP" prefixed before the value to be inserted

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Cannot Reproduce
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    OS X 10.5 (expect OS independent)
    Oracle 10.2 (expect version independent, but specific to Oracle)
    Jruby 1.1.3 and 1.1.4
  • Testcase included:
    yes
  • Number of attachments :
    4

Description

During the fixture insert generation process, columns of Oracle datatype "DATE" have the string "TIMESTAMP" prefixed before the value to be inserted, as seen below.

------------------------
$ jruby holiday_test.rb
Loaded suite holiday_test
Started
E
Finished in 1.632811 seconds.

1) Error:
test_halloween(HolidayTest):
ActiveRecord::StatementInvalid: ActiveRecord::ActiveRecordError: ORA-01438: value larger than specified precision allowed for this column
: INSERT INTO holidays (dt_end, dt_start, name, plusstd, plusrush, holidayid) VALUES (TIMESTAMP'2008-09-04 00:00:00', TIMESTAMP'2008-08-31 00:00:00', 'Technology day', 2, 0, 257597727)
/opt/jruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/database_statements.rb:73:in `transaction'
/opt/jruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/fixtures.rb:518:in `create_fixtures'
/opt/jruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract_adapter.rb:78:in `disable_referential_integrity'
/opt/jruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/fixtures.rb:509:in `create_fixtures'
/opt/jruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:1263:in `silence'
/opt/jruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/fixtures.rb:508:in `create_fixtures'
/opt/jruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/fixtures.rb:963:in `load_fixtures'
/opt/jruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/fixtures.rb:929:in `setup_fixtures'
/opt/jruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:173:in `evaluate_method'
/opt/jruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:161:in `call'
/opt/jruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:90:in `run'
/opt/jruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:90:in `each'
/opt/jruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:90:in `run'
/opt/jruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:272:in `run_callbacks'
/opt/jruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/testing/setup_and_teardown.rb:31:in `run_with_callbacks'

1 tests, 0 assertions, 0 failures, 1 errors

--------------
Attached is the .yml fixture, model, unit test files. Will add the table generation script after submitting, either as an attachment if permitted or as a comment.

  1. create_holiday_table.sql
    31/Aug/08 11:28 AM
    0.9 kB
    David Filiatrault
  2. holiday_test.rb
    31/Aug/08 11:29 AM
    0.3 kB
    David Filiatrault
  3. holiday.rb
    31/Aug/08 11:29 AM
    0.1 kB
    David Filiatrault
  4. holidays.yml
    31/Aug/08 11:30 AM
    0.2 kB
    David Filiatrault

Activity

Hide
David Filiatrault added a comment -

Table creation script for the test case

Show
David Filiatrault added a comment - Table creation script for the test case
Hide
David Filiatrault added a comment -

model

Show
David Filiatrault added a comment - model
Hide
David Filiatrault added a comment -

unit test

Show
David Filiatrault added a comment - unit test
Hide
David Filiatrault added a comment -

yml fixture

Show
David Filiatrault added a comment - yml fixture
Hide
Charles Oliver Nutter added a comment -

Thanks for the test setup. Seems like it should be a pretty easy glitch to hunt down.

Show
Charles Oliver Nutter added a comment - Thanks for the test setup. Seems like it should be a pretty easy glitch to hunt down.
Hide
Nick Sieger added a comment -

David, not sure if you're still out there, but I am having trouble reproducing this with a simple table containing a date column. Anyone else seen this recently?

Show
Nick Sieger added a comment - David, not sure if you're still out there, but I am having trouble reproducing this with a simple table containing a date column. Anyone else seen this recently?
Hide
Nick Sieger added a comment -

Actually, looking at this more closely, it appears that your problem is overflowing of the "holidayid" column, not any of the date columns.

Show
Nick Sieger added a comment - Actually, looking at this more closely, it appears that your problem is overflowing of the "holidayid" column, not any of the date columns.

People

Vote (1)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: