Jruby 1.6.1 with mysql2 error

i create new project with jruby 1.6.1 and rails 3.0.7

create scaffold and when i goto rake db:migrate it give me this error

The driver encountered an unknown error: java.sql.SQLException:
java.lang.ClassFormatError: com/mysql/jdbc/MysqlIO

On Apr 21, 2011, at 3:08 AM, jayesh dalwadi wrote:

i create new project with jruby 1.6.1 and rails 3.0.7

create scaffold and when i goto rake db:migrate it give me this error

The driver encountered an unknown error: java.sql.SQLException:
java.lang.ClassFormatError: com/mysql/jdbc/MysqlIO

I suspect you are using the mysql2 driver, rather than jdbc.

Try generating your app with ‘-m http://jruby.org’ flag, like so:

jruby -S rails new rails3_app -m http://jruby.org

I think this is bug with one of the Java class for MySQL. I had tried
this
with JDBC and had same error.

Ref#
http://old.nabble.com/Invalid-pc-in-LineNumberTable-in-class-file-com-mysql-jdbc-MysqlIO-to31443000.html

Hirotsugu A. wrote:

java.lang.ClassFormatError: com/mysql/jdbc/MysqlIO

http://xircles.codehaus.org/manage_email


View this message in context:
http://old.nabble.com/jruby-1.6.1-with-mysql2-error-tp31447356p31456592.html
Sent from the JRuby - User mailing list archive at Nabble.com.

This issue seem to be specific to jdbc-mysql (version 5.1.13).

I have uninstalled it and installed the older version i.e. jdbc-mysql
(version 5.0.4) and everything started working well.

James74 wrote:

http://xircles.codehaus.org/manage_email


View this message in context:
http://old.nabble.com/jruby-1.6.1-with-mysql2-error-tp31447356p31461341.html
Sent from the JRuby - User mailing list archive at Nabble.com.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs