MySQL & Groovy 1.6b1?

7 views
Skip to first unread message

Robert Fischer

unread,
Aug 17, 2008, 3:10:56 PM8/17/08
to groo...@googlegroups.com
Is anyone successfully connecting to MySQL through Groovy 1.6b1?

When I run "driver.connect(url, info)", I get the following error:
Exception in thread "main" java.sql.SQLException: Unable to connect to any hosts due to exception:
java.lang.ArrayIndexOutOfBoundsException: 45
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1797)
at com.mysql.jdbc.Connection.<init>(Connection.java:562)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:361)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:182)
at org.codehaus.groovy.runtime.callsite.CallSite.call(CallSite.java:126)
org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:182)
at org.codehaus.groovy.runtime.callsite.CallSite.call(CallSite.java:126)

Now, I'm able to connect via JRuby and Java using the exact same Connector/J JAR, driver class name,
URL, username, pass. So I've got to believe there's something weird going on with Groovy.

~~ Robert.

Robert Fischer

unread,
Aug 17, 2008, 3:21:56 PM8/17/08
to groo...@googlegroups.com
Fascinating....

By turning the database specified in the URL to stein-quadran instead of liquibase, I get a whole
new error message:

Exception in thread "main" java.sql.SQLException: Communication link failure, message from server:
"Bad handshake"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1825)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1752)
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:2251)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:695)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1734)


at com.mysql.jdbc.Connection.<init>(Connection.java:562)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:361)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:182)
at org.codehaus.groovy.runtime.callsite.CallSite.call(CallSite.java:126)

WTF?

~~ Robert.

Reply all
Reply to author
Forward
0 new messages