Jruby-1.1.2 - rails-2.1.0 - activerecord-jdbcmysql-adapter-0.8.1 - Table does not exist error

I posted this on the Nabble list but I’m not sure if that is the same
as this mailling list, so I apologize if this is a duplicate.

When I run my database migrationI get an error that the table it just
created does not exist. It was able to connect to the mysql 5 db to
create the table so I assume the connector is working.

I don’t know if the fact that it claims to be looking for “WEB_FORMS”
when the table is called “web_forms” is the problem or a red herring.
Perhaps the error reporting just displays it in all caps for emphasis.

When I run the app in debug and try to create a new object in the
scaffolded view I can trace it to Line 566 of jdbc_adapter.rb:

def jdbc_columns(table_name, name = nil)
@connection.columns(table_name.to_s)
end

Then it goes into the exception handler and I have no idea what caused
the exception. At that point table_name is still lower case according
to the debugger. Here is my stack trace from the migration:

(in /Users/rosey/Projects/Ruby/MiniSURF)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
rake aborted!
Table WEB_FORMS does not exist
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/activerecord-2.1.0/
lib/active_record/connection_adapters/abstract/query_cache.rb:69:in
columns_with_query_cache' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/activerecord-2.1.0/ lib/active_record/schema_dumper.rb:75:intable’
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/activerecord-2.1.0/
lib/active_record/schema_dumper.rb:70:in tables' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/activerecord-2.1.0/ lib/active_record/schema_dumper.rb:61:ineach’
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/activerecord-2.1.0/
lib/active_record/schema_dumper.rb:61:in tables' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/activerecord-2.1.0/ lib/active_record/schema_dumper.rb:23:indump’
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/activerecord-2.1.0/
lib/active_record/schema_dumper.rb:17:in dump' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/ tasks/databases.rake:219:in/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/
1.8/gems/rails-2.1.0/lib/tasks/databases.rake’
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/
tasks/databases.rake:218:in open' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/ tasks/databases.rake:218:in/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/
1.8/gems/rails-2.1.0/lib/tasks/databases.rake’
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/
rake.rb:546:in call' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/ rake.rb:546:inexecute’
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/
rake.rb:541:in each' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/ rake.rb:541:inexecute’
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/
rake.rb:508:in invoke_with_call_chain' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/ rake.rb:501:ininvoke_with_call_chain’
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/
rake.rb:494:in invoke' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/ tasks/databases.rake:100:in/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/
1.8/gems/rails-2.1.0/lib/tasks/databases.rake’
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/
rake.rb:546:in call' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/ rake.rb:546:inexecute’
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/
rake.rb:541:in each' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/ rake.rb:541:inexecute’
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/
rake.rb:508:in invoke_with_call_chain' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/ rake.rb:501:ininvoke_with_call_chain’
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/
rake.rb:494:in invoke' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/ rake.rb:1931:ininvoke_task’
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/
rake.rb:1909:in top_level' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/ rake.rb:1909:ineach’
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/
rake.rb:1909:in top_level' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/ rake.rb:1948:instandard_exception_handling’
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/
rake.rb:1903:in top_level' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/ rake.rb:1881:inrun’
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/
rake.rb:1948:in standard_exception_handling' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/ rake.rb:1878:inrun’
/usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:
31:in /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/ bin/rake' /usr/local/ruby/jruby-1.1.2/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake: 19:inload’
/usr/local/ruby/jruby-1.1.2/bin/rake:19
** Invoke db:schema:dump (first_time)
** Invoke environment
** Execute db:schema:dump


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Does it work on MRI? I ran into a similar issue but under MRI. I
traced my issue down to a plugin we use (acts_as_solr).

Rich

ƃuɐlɐuɐɯ ɥɔıɹ

On Fri, Jun 6, 2008 at 2:33 PM, Jeremy R.

Does table WEB_FORMS belongs to the user you use to connect to the
database?
If not, “username.tablename” is needed :slight_smile:

2008/6/7 Jeremy R. [email protected]: