31/07/2012, 07:18
|
| | Fecha de Ingreso: julio-2012
Mensajes: 65
Antigüedad: 12 años, 6 meses Puntos: 0 | |
java y mysql Hola, estoy haciendo unas tablas con sql y java pero me da este error y no entiendo donde me equivoco...
com.mysql.jdbc.CommunicationsException: 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(Stand ardSocketFactory.java:156)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:284)
at com.mysql.jdbc.Connection.createNewIO(Connection.j ava:2569)
at com.mysql.jdbc.Connection.<init>(Connection.java:1 485)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonReg isteringDriver.java:266)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at Conectar.creaConexion(Conectar.java:36)
at Tablas.main(Tablas.java:123)
** END NESTED EXCEPTION **
Last packet sent to the server was 33 ms ago.
Exception in thread "main" java.lang.NullPointerException
at Tablas.tablaJugadores(Tablas.java:90)
at Tablas.main(Tablas.java:125)
La linea del código es: stmt = con.createStatement();
Gracias de antemano!!! |