Robert Fischer | 17 Aug 21:07
Favicon
Gravatar

[groovy-dev] MySQL Error

(I tried to send this to the user list, but it bounced me because I wasn't subscribed, even though
I've subscribed.  Had the same problem on the user-grails list.  I've forwarded the e-mail to the
owner of the lists, as the error response e-mail told me to.)

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, and password.  So I've got to believe there's something weird going on with Groovy.

~~ Robert.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

(Continue reading)

Jochen Theodorou | 17 Aug 22:12
Gravatar

Re: [groovy-dev] MySQL Error

Robert Fischer schrieb:
> (I tried to send this to the user list, but it bounced me because I wasn't subscribed, even though
> I've subscribed.  Had the same problem on the user-grails list.  I've forwarded the e-mail to the
> owner of the lists, as the error response e-mail told me to.)
> 
> 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, and password.  So I've got to believe there's something weird going on with Groovy.

hmm... the trace tells me it happens somewhere in the driver itself. Did 
you try to use the same code as in Java in Groovy? I mean the exact same 
code, without any modification? Also the version and name of the driver 
might help a bit.
(Continue reading)

Robert Fischer | 17 Aug 22:26
Favicon
Gravatar

Re: [groovy-dev] MySQL Error

The driver is MySQL's driver 5.0.8.

I'll try the exact same code in pure Java.

~~ Robert.

Jochen Theodorou wrote:
> Robert Fischer schrieb:
>> (I tried to send this to the user list, but it bounced me because I
>> wasn't subscribed, even though
>> I've subscribed.  Had the same problem on the user-grails list.  I've
>> forwarded the e-mail to the
>> owner of the lists, as the error response e-mail told me to.)
>>
>> 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
(Continue reading)

Alexander Veit | 17 Aug 23:09

RE: [groovy-dev] MySQL Error

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

Please check if you're really using the driver that you think you're using
(e.g. by deleting the driver JAR temporarily).

-Alex

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Robert Fischer | 18 Aug 02:04
Favicon
Gravatar

Re: [groovy-dev] MySQL Error

Bingo.  I removed the JAR and got the same problem.  Fascinating...

~~ Robert.

Alexander Veit wrote:
>> Robert Fischer wrote:
>> [...]
>> Now, I'm able to connect via JRuby and Java using the exact 
>> same Connector/J JAR, driver class name,
>> URL, username, and password.  So I've got to believe there's 
>> something weird going on with Groovy.
> 
> Please check if you're really using the driver that you think you're using
> (e.g. by deleting the driver JAR temporarily).
> 
> -Alex
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
(Continue reading)


Gmane