small medium large xlarge

Generic-user-small
14 Oct 2010, 04:41
Stephen Moss (3 posts)

I’m having issues trying to get the Depot Application (Task T) unit testing runnning using Eclipse Galileo / JRuby 1.2.0.9419p2 / Apache Derby 10.1.3.1

I’ve used the rake commands to create the depot test database and verified that the schema and tables exist. When trying to run the following test:

test “invalid_with_empty_attributes” do assert true #product = Product.new #assert !product.valid? #assert product.errors.invalid?(:title) #assert product.errors.invalid?(:description) #assert product.errors.invalid?(:price) #assert product.errors.invalid?(:image_url) end

NOTE: I’ve commented out the assert statements to keep the test simple

I get the following error:

Exception: ActiveRecord::ActiveRecordError: Syntax error: Encountered “RESTART” at line 1, column 40.: ALTER TABLE line_items ALTER COLUMN id RESTART WITH 2053932786

Can anyone help?

Generic-user-small
28 Oct 2010, 05:07
Stephen Moss (3 posts)

Figured it out. The Apache Derby version being used (10.1.3.1) was an older version that didn’t accept the ALTER COLUMN id RESTART syntax…

Tricky bit was I needed to overwrite the Derby jar files in the Aptana directories as these took predecence over the eclipse/plugins directory version of Derby I installed (10.6).

You must be logged in to comment