Newest JDBC for MySQL does't work e.g. Connector/J 5.1.30, but Connector/J 3.1.14 works fine

255 views
Skip to first unread message

jon.st...@quantumsi.com

unread,
May 21, 2014, 7:29:35 PM5/21/14
to execut...@googlegroups.com
Hello,

It seems like the newest JDBC for MySQL does't work e.g. Connector/J 5.1.30 - note I loaded an older version Connector/J 3.1.14 and it worked just fine.

Connector/J 5.1.30  - has an exception

stacktrace:

org.underworldlabs.jdbc.DataSourceException: A connection to the database could not be established.
Please ensure that the details are correct and the supplied host is available.
at org.executequery.datasource.ConnectionPoolImpl.createConnection(ConnectionPoolImpl.java:211)
at org.executequery.datasource.ConnectionPoolImpl.ensureCapacity(ConnectionPoolImpl.java:169)
at org.executequery.datasource.ConnectionPoolImpl.setMinimumConnections(ConnectionPoolImpl.java:366)
at org.executequery.datasource.ConnectionManager.createDataSource(ConnectionManager.java:89)
at org.executequery.databasemediators.spi.DefaultConnectionBuilder.createDataSource(DefaultConnectionBuilder.java:122)
at org.executequery.databasemediators.spi.DefaultConnectionBuilder.access$000(DefaultConnectionBuilder.java:35)
at org.executequery.databasemediators.spi.DefaultConnectionBuilder$1.construct(DefaultConnectionBuilder.java:100)
at org.underworldlabs.swing.util.SwingWorker$2.run(SwingWorker.java:130)
at java.lang.Thread.run(Unknown Source)

console:

[16:25:22] Loading JDBC driver class: com.mysql.fabric.jdbc.FabricMySQLDriver
[16:25:22] JDBC driver com.mysql.fabric.jdbc.FabricMySQLDriver loaded - v5.1
[16:25:22] Using user specified JDBC URL: jdbc:mysql://127.0.0.1:4306/***?user=***&password=***

Connector/J 3.1.14 - works fine

stacktrace (none)

console:

[16:24:53] Loading JDBC driver class: com.mysql.jdbc.Driver
[16:24:53] JDBC driver com.mysql.jdbc.Driver loaded - v3.1
[16:27:49] Using user specified JDBC URL: jdbc:mysql://127.0.0.1:4306/***?user=***&password=***
[16:27:51] Data source IT&E tunnel MySQL SteelBelt EVDO initialised.


Cheers 
Jon

Takis Diakoumis

unread,
May 21, 2014, 8:31:34 PM5/21/14
to execut...@googlegroups.com
Hi

the MySQL JDBC class you have selected is com.mysql.fabric.jdbc.FabricMySQLDriver. this driver class did not exist before v5.1.30 and is for connecting with MySQL Fabric.

as the class name field in the driver selection tab is sorted alphabetically, that driver now becomes the first selection which i guess is easily missed.

if you intend to use the fabric driver you could provide a custom JDBC URL as detailed here: 

as the fabric driver class is new i will include the new url pattern in the next release - or you could enter your own URL pattern in the driver tab yourself.

alternatively, just select the com.mysql.jdbc.Driver from the class name drop-down list and it should work fine. 

please note, i have not tried/tested using a mysql fabric connection.

please let me know how you go - i did spot a potential issue where the previously selected driver class is used even after selecting another and i had to restart the app.

let me know.

thanks :)
Takis









--
You received this message because you are subscribed to the Google Groups "Execute Query" group.
To unsubscribe from this group and stop receiving emails from it, send an email to executequery...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
http://executequery.org

jon.st...@quantumsi.com

unread,
May 22, 2014, 10:57:52 AM5/22/14
to execut...@googlegroups.com
Takis,

Thanks for the explanation:

Yes indeed com.mysql.jdbc.Driver from Connector/J 5.1.30 works just fine by selecting it from the class drop down

BR

Jon
Reply all
Reply to author
Forward
0 new messages