Re: registerDriver()
Posted by: Sean Breslin
Date: May 09, 2005 08:51PM

Thank you, that link has helped me understand how this works. The problem, however, was that my router was blocking the port I tried to connect on... Incredibly stupid mistake.

Now that I'm not having that problem, I'm getting the other message that I mentioned when I tried another ISP...

Here are the lines of code creating the error:

String connString = "jdbc:mysql://myurl.com:6998/dbname?user=user&password=pass&useUnicode=true&characterEncoding=UTF-8";
conn = DriverManager.getConnection(connString);

And the error created:

Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.net.SocketException
MESSAGE: java.net.ConnectException: Connection refused: connect

STACKTRACE:

java.net.SocketException: java.net.ConnectException: Connection refused: connect
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(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at Project$Connect.<init>(Project.java:583)
at Project.<init>(Project.java:27)
at Project.main(Project.java:152)


** END NESTED EXCEPTION **

Options: ReplyQuote


Subject
Written By
Posted
May 09, 2005 07:17PM
May 09, 2005 07:43PM
May 09, 2005 07:56PM
May 09, 2005 08:07PM
Re: registerDriver()
May 09, 2005 08:51PM
May 09, 2005 09:04PM
May 10, 2005 11:17AM
May 10, 2005 12:34PM
May 10, 2005 12:59PM
May 10, 2005 01:19PM
May 10, 2005 01:30PM
May 10, 2005 01:44PM
May 10, 2005 01:52PM
May 10, 2005 02:05PM
May 10, 2005 02:22PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.