| View previous topic :: View next topic |
| Author |
Message |
ylon
Joined: 05 Mar 2005 Posts: 21
|
Posted: Mon Oct 17, 2005 4:38 pm Post subject: SQLGrinder 2B5 Connection Failure |
|
|
I'm trying to use SQLGrinder to log onto a localhost MAMP mysql db and it is not working. I am receiving the following error at the bottom of the window after the connection try: (in red letters) "No suitable driver"
I can log in just fine via `mysql -p -u root` in the shell. phpMyAdmin works great. I can get in just fine with CocoaMySQL-SBG by passing the following socket to it: /Applications/MAMP/tmp/mysql/mysql.sock
However I cannot get SQLGrinder to connect whatever I do. I have changed my java vm link to point back to the 1.4.2 jvm from 5 and then I upgraded my /Library/Java/Extensions mysql driver from mysql-connector-java-3.0.16-ga-bin.jar to mysql-connector-java-3.2.0-alpha-bin.jar.
Please advise as this is quite frustrating. |
|
| Back to top |
|
 |
michaeldupuis Site Admin
Joined: 15 May 2003 Posts: 1427 Location: Lewiston, ME
|
Posted: Tue Oct 18, 2005 10:04 am Post subject: |
|
|
| Quote: | | I am receiving the following error at the bottom of the window after the connection try: (in red letters) "No suitable driver" |
"No suitable driver" means that the class loader found the JDBC driver class just fine, but that the URL string has an error in it. What login values are you using? What is the URL displayed at the bottom of the login sheet? What version of MySQL are you using? It's possible something has changed.
| Quote: | | I can log in just fine via `mysql -p -u root` in the shell. phpMyAdmin works great. I can get in just fine with CocoaMySQL-SBG by passing the following socket to it: /Applications/MAMP/tmp/mysql/mysql.sock |
The error you are getting is clearly a JDBC issue, and none of these clients are using JDBC, I don't think.
| Quote: | | However I cannot get SQLGrinder to connect whatever I do. I have changed my java vm link to point back to the 1.4.2 jvm from 5 and then I upgraded my /Library/Java/Extensions mysql driver from mysql-connector-java-3.0.16-ga-bin.jar to mysql-connector-java-3.2.0-alpha-bin.jar. |
Check your JDBC Drivers preferences. Is the location value for the driver what you are expecting? Remember that SQLGrinder comes packaged with a JDBC driver as well.
-- Michael |
|
| Back to top |
|
 |
ylon
Joined: 05 Mar 2005 Posts: 21
|
Posted: Wed Oct 19, 2005 7:10 am Post subject: |
|
|
Well, I tried to use the default (jdbc:mysql://localhost) without the URL check box checked. Then I tried to place my own URL in there such as:
jdbc:mysql://localhost/mysql?user=test&password=test
and to no avail.
Version of mysql:
mysql Ver 14.7 Distrib 4.1.12, for apple-darwin7.9.0 (powerpc) using EditLine wrapper
(packaged with MAMP) |
|
| Back to top |
|
 |
michaeldupuis Site Admin
Joined: 15 May 2003 Posts: 1427 Location: Lewiston, ME
|
Posted: Wed Oct 19, 2005 7:36 am Post subject: |
|
|
Huh, try filling all the information, which might be required. For instance, the URL I used to connect to my mysql databases looks like this:
jdbc:mysql://127.0.0.1:3306/databasename
-- Michael |
|
| Back to top |
|
 |
ylon
Joined: 05 Mar 2005 Posts: 21
|
Posted: Wed Oct 19, 2005 7:38 am Post subject: |
|
|
| Still no luck. Any additional log information that SQLGrinder may be keeping that we can dig into? |
|
| Back to top |
|
 |
michaeldupuis Site Admin
Joined: 15 May 2003 Posts: 1427 Location: Lewiston, ME
|
Posted: Wed Oct 19, 2005 7:45 am Post subject: |
|
|
| Did you enter all of the values into the URL field, into the text fields, or did you try both methods? |
|
| Back to top |
|
 |
ylon
Joined: 05 Mar 2005 Posts: 21
|
Posted: Wed Oct 19, 2005 7:57 am Post subject: |
|
|
| Both methods... |
|
| Back to top |
|
 |
michaeldupuis Site Admin
Joined: 15 May 2003 Posts: 1427 Location: Lewiston, ME
|
Posted: Wed Oct 19, 2005 10:11 am Post subject: |
|
|
I know this works, because I connect to MySQL all the time, so there must be some configuration issue.
According to the Connector/J documentation, "No suitable driver" can be caused by classes not in the classpath, or a mistaken URL or if there are no drivers specified based on the jdbc.drivers system property.
You haven't mentioned what is listed in "JDBC Drivers" preferences, which I mentioned before. What do you find there for any MySQL entries?
-- Michael |
|
| Back to top |
|
 |
ylon
Joined: 05 Mar 2005 Posts: 21
|
Posted: Wed Oct 19, 2005 10:37 am Post subject: |
|
|
Sorry, did not catch your jdbc driver note, but here is what is therein:
MySQL
org.gjt.mm.mysql.Driver
jdbc:mysql
Enabled
file:/Library/Java/Extensions/mysql-connector-java-3.2.0-alpha-bin.jar
System default extensions directories is checked
SQLGrinder Application Support directory is checked |
|
| Back to top |
|
 |
michaeldupuis Site Admin
Joined: 15 May 2003 Posts: 1427 Location: Lewiston, ME
|
Posted: Wed Oct 19, 2005 10:50 am Post subject: |
|
|
| Ok, try moving that file out of that folder, or unchecking "System default extensions directories" and restarting the app. You should now see the JDBC driver listed as being in the SQLGrinder.app application package. Try connecting now and see if there is the same issue. |
|
| Back to top |
|
 |
ylon
Joined: 05 Mar 2005 Posts: 21
|
Posted: Wed Oct 19, 2005 10:53 am Post subject: |
|
|
Interesting. I am getting another error now:
Cannot load connection class because of underlying exception:
'java.lang.SecurityException: Prohibited package name: java.sql'.
What do you think of that? |
|
| Back to top |
|
 |
michaeldupuis Site Admin
Joined: 15 May 2003 Posts: 1427 Location: Lewiston, ME
|
Posted: Wed Oct 19, 2005 11:40 am Post subject: |
|
|
| What's the full stack trace from the message log? You can open the log from the Tools menu. |
|
| Back to top |
|
 |
ylon
Joined: 05 Mar 2005 Posts: 21
|
Posted: Fri Oct 21, 2005 8:16 am Post subject: |
|
|
Sorry, had to be away for the last couple days, here is the log:
java.sql.SQLException: Cannot load connection class because of underlying exception: 'java.lang.SecurityException: Prohibited package name: java.sql'.
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:277)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:172)
at com.advenio.jdbclib.threads.ConnectionThread.threadRunLogic(ConnectionThread.java:52)
at com.advenio.jdbclib.threads.AbstractThread.run(AbstractThread.java:43) |
|
| Back to top |
|
 |
ylon
Joined: 05 Mar 2005 Posts: 21
|
Posted: Wed Nov 30, 2005 10:27 am Post subject: |
|
|
I'm still getting no connection with SQLGrinder with b7. Using the built in driver, Message Log:
Not suitable drive:
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:532)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at com.advenio.jdbclib.threads.ConnectionThread.threadRunLogic(ConnectionThread.java:52)
at com.advenio.jdbclib.threads.AbstractThread.run(AbstractThread.java:43) |
|
| Back to top |
|
 |
michaeldupuis Site Admin
Joined: 15 May 2003 Posts: 1427 Location: Lewiston, ME
|
Posted: Wed Nov 30, 2005 11:20 am Post subject: |
|
|
Huh, that doesn't look like any of the traces I get from that driver. The new format, and the one that seems to be dumped from the included driver (mysql-connector-java-3.1. connecting to server version 4.0.18 looks like this when I specify the wrong port:
com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.net.SocketException
MESSAGE: java.net.ConnectException: Connection refused
STACKTRACE:
java.net.SocketException: java.net.ConnectException: Connection refused
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:151)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:280)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1774)
at com.mysql.jdbc.Connection.<init>(Connection.java:437)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:268)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at com.advenio.jdbclib.threads.ConnectionThread.threadRunLogic(ConnectionThread.java:52)
at com.advenio.jdbclib.threads.AbstractThread.run(AbstractThread.java:43)
** END NESTED EXCEPTION **
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1839)
at com.mysql.jdbc.Connection.<init>(Connection.java:437)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:268)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at com.advenio.jdbclib.threads.ConnectionThread.threadRunLogic(ConnectionThread.java:52)
at com.advenio.jdbclib.threads.AbstractThread.run(AbstractThread.java:43)
I really looks like it's finding another driver somewhere else (note the difference in class names, com.mysql vs. java.sql) and using that, which might cause the problem. I suggest opening preferences again and seeing what MySQL drivers are listed in there. If this doesn't work, I'll give you a simple JDBC app to try, I think this is more a JDBC issue than a SQLGrinder issue. |
|
| Back to top |
|
 |
|