# JBC Will nicht connecten !



## Fretful (13. Apr 2006)

Nachdem bei mir nun eine DB erfolgreich läuft und ich auch daten auslesen kann etc. wollte ich es nun auch auf einem anderen rechner installierten aber wenn ich dort in netbeans auf run gehe kommen fehler und nochmal fehler ! 


Das sind meine Exceptions die meine Log Funktion mit protokolliert hat:



```
Thu Apr 13 15:45:27 CEST 2006  Driver: com.mysql.jdbc.DriverUser: root Passwort: pbfsoftware URL: jdbc:mysql://localhost/pbf
Thu Apr 13 15:45:27 CEST 2006  Connection Manager: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(StandardSocketFactory.java:156)
	at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:284)
	at com.mysql.jdbc.Connection.createNewIO(Connection.java:2555)
	at com.mysql.jdbc.Connection.<init>(Connection.java:1485)
	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
	at java.sql.DriverManager.getConnection(DriverManager.java:525)
	at java.sql.DriverManager.getConnection(DriverManager.java:171)
	at SQLBase.ConnectionManager.getConnection(ConnectionManager.java:52)
	at SQLQueries.SqlMitarbeiter.<init>(SqlMitarbeiter.java:33)
	at GUIPanels.PanelMitarbeiter.refreshList(PanelMitarbeiter.java:53)
	at GUIPanels.PanelMitarbeiter.<init>(PanelMitarbeiter.java:34)
	at GUI.MainFrame.<init>(MainFrame.java:39)
	at GUI.MainFrame.main(MainFrame.java:101)


** END NESTED EXCEPTION **



Last packet sent to the server was 0 ms ago.
Thu Apr 13 15:45:27 CEST 2006  Driver: com.mysql.jdbc.DriverUser: root Passwort: pbfsoftware URL: jdbc:mysql://localhost/pbf
Thu Apr 13 15:45:27 CEST 2006  Connection Manager: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(StandardSocketFactory.java:156)
	at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:284)
	at com.mysql.jdbc.Connection.createNewIO(Connection.java:2555)
	at com.mysql.jdbc.Connection.<init>(Connection.java:1485)
	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
	at java.sql.DriverManager.getConnection(DriverManager.java:525)
	at java.sql.DriverManager.getConnection(DriverManager.java:171)
	at SQLBase.ConnectionManager.getConnection(ConnectionManager.java:52)
	at SQLBase.SqlQuery.query(SqlQuery.java:68)
	at SQLQueries.SqlMitarbeiter.getList(SqlMitarbeiter.java:69)
	at GUIPanels.PanelMitarbeiter.refreshList(PanelMitarbeiter.java:55)
	at GUIPanels.PanelMitarbeiter.<init>(PanelMitarbeiter.java:34)
	at GUI.MainFrame.<init>(MainFrame.java:39)
	at GUI.MainFrame.main(MainFrame.java:101)


** END NESTED EXCEPTION **



Last packet sent to the server was 16 ms ago.
Thu Apr 13 15:45:27 CEST 2006  Fehler beim auslesen eines Datensatzes: java.lang.NullPointerException
Thu Apr 13 15:45:27 CEST 2006  Driver: com.mysql.jdbc.DriverUser: root Passwort: pbfsoftware URL: jdbc:mysql://localhost/pbf
Thu Apr 13 15:45:27 CEST 2006  Connection Manager: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(StandardSocketFactory.java:156)
	at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:284)
	at com.mysql.jdbc.Connection.createNewIO(Connection.java:2555)
	at com.mysql.jdbc.Connection.<init>(Connection.java:1485)
	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
	at java.sql.DriverManager.getConnection(DriverManager.java:525)
	at java.sql.DriverManager.getConnection(DriverManager.java:171)
	at SQLBase.ConnectionManager.getConnection(ConnectionManager.java:52)
	at SQLQueries.SqlMitarbeiter.<init>(SqlMitarbeiter.java:33)
	at GUIPanels.PanelMitarbeiter.refreshList(PanelMitarbeiter.java:53)
	at GUIPanels.PanelMitarbeiter.<init>(PanelMitarbeiter.java:34)
	at GUI.MainFrame.<init>(MainFrame.java:40)
	at GUI.MainFrame.main(MainFrame.java:101)


** END NESTED EXCEPTION **



Last packet sent to the server was 0 ms ago.
Thu Apr 13 15:45:27 CEST 2006  Driver: com.mysql.jdbc.DriverUser: root Passwort: pbfsoftware URL: jdbc:mysql://localhost/pbf
Thu Apr 13 15:45:27 CEST 2006  Connection Manager: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(StandardSocketFactory.java:156)
	at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:284)
	at com.mysql.jdbc.Connection.createNewIO(Connection.java:2555)
	at com.mysql.jdbc.Connection.<init>(Connection.java:1485)
	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
	at java.sql.DriverManager.getConnection(DriverManager.java:525)
	at java.sql.DriverManager.getConnection(DriverManager.java:171)
	at SQLBase.ConnectionManager.getConnection(ConnectionManager.java:52)
	at SQLBase.SqlQuery.query(SqlQuery.java:68)
	at SQLQueries.SqlMitarbeiter.getList(SqlMitarbeiter.java:69)
	at GUIPanels.PanelMitarbeiter.refreshList(PanelMitarbeiter.java:55)
	at GUIPanels.PanelMitarbeiter.<init>(PanelMitarbeiter.java:34)
	at GUI.MainFrame.<init>(MainFrame.java:40)
	at GUI.MainFrame.main(MainFrame.java:101)


** END NESTED EXCEPTION **



Last packet sent to the server was 0 ms ago.
Thu Apr 13 15:45:27 CEST 2006  Fehler beim auslesen eines Datensatzes: java.lang.NullPointerException
Thu Apr 13 15:45:27 CEST 2006  Driver: com.mysql.jdbc.DriverUser: root Passwort: pbfsoftware URL: jdbc:mysql://localhost/pbf
Thu Apr 13 15:45:27 CEST 2006  Connection Manager: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(StandardSocketFactory.java:156)
	at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:284)
	at com.mysql.jdbc.Connection.createNewIO(Connection.java:2555)
	at com.mysql.jdbc.Connection.<init>(Connection.java:1485)
	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
	at java.sql.DriverManager.getConnection(DriverManager.java:525)
	at java.sql.DriverManager.getConnection(DriverManager.java:171)
	at SQLBase.ConnectionManager.getConnection(ConnectionManager.java:52)
	at SQLQueries.SqlMitarbeiter.<init>(SqlMitarbeiter.java:33)
	at GUIPanels.PanelMitarbeiter.refreshList(PanelMitarbeiter.java:53)
	at GUIPanels.PanelMitarbeiter.<init>(PanelMitarbeiter.java:34)
	at GUI.MainFrame.<init>(MainFrame.java:41)
	at GUI.MainFrame.main(MainFrame.java:101)


** END NESTED EXCEPTION **



Last packet sent to the server was 0 ms ago.
Thu Apr 13 15:45:27 CEST 2006  Driver: com.mysql.jdbc.DriverUser: root Passwort: pbfsoftware URL: jdbc:mysql://localhost/pbf
Thu Apr 13 15:45:27 CEST 2006  Connection Manager: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(StandardSocketFactory.java:156)
	at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:284)
	at com.mysql.jdbc.Connection.createNewIO(Connection.java:2555)
	at com.mysql.jdbc.Connection.<init>(Connection.java:1485)
	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
	at java.sql.DriverManager.getConnection(DriverManager.java:525)
	at java.sql.DriverManager.getConnection(DriverManager.java:171)
	at SQLBase.ConnectionManager.getConnection(ConnectionManager.java:52)
	at SQLBase.SqlQuery.query(SqlQuery.java:68)
	at SQLQueries.SqlMitarbeiter.getList(SqlMitarbeiter.java:69)
	at GUIPanels.PanelMitarbeiter.refreshList(PanelMitarbeiter.java:55)
	at GUIPanels.PanelMitarbeiter.<init>(PanelMitarbeiter.java:34)
	at GUI.MainFrame.<init>(MainFrame.java:41)
	at GUI.MainFrame.main(MainFrame.java:101)


** END NESTED EXCEPTION **



Last packet sent to the server was 0 ms ago.
Thu Apr 13 15:45:27 CEST 2006  Fehler beim auslesen eines Datensatzes: java.lang.NullPointerException
Thu Apr 13 15:45:27 CEST 2006  Driver: com.mysql.jdbc.DriverUser: root Passwort: pbfsoftware URL: jdbc:mysql://localhost/pbf
Thu Apr 13 15:45:27 CEST 2006  Connection Manager: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(StandardSocketFactory.java:156)
	at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:284)
	at com.mysql.jdbc.Connection.createNewIO(Connection.java:2555)
	at com.mysql.jdbc.Connection.<init>(Connection.java:1485)
	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
	at java.sql.DriverManager.getConnection(DriverManager.java:525)
	at java.sql.DriverManager.getConnection(DriverManager.java:171)
	at SQLBase.ConnectionManager.getConnection(ConnectionManager.java:52)
	at SQLQueries.SqlMitarbeiter.<init>(SqlMitarbeiter.java:33)
	at GUIPanels.PanelMitarbeiter.refreshList(PanelMitarbeiter.java:53)
	at GUIPanels.PanelMitarbeiter.<init>(PanelMitarbeiter.java:34)
	at GUI.MainFrame.<init>(MainFrame.java:42)
	at GUI.MainFrame.main(MainFrame.java:101)


** END NESTED EXCEPTION **



Last packet sent to the server was 0 ms ago.
Thu Apr 13 15:45:27 CEST 2006  Driver: com.mysql.jdbc.DriverUser: root Passwort: pbfsoftware URL: jdbc:mysql://localhost/pbf
Thu Apr 13 15:45:27 CEST 2006  Connection Manager: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(StandardSocketFactory.java:156)
	at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:284)
	at com.mysql.jdbc.Connection.createNewIO(Connection.java:2555)
	at com.mysql.jdbc.Connection.<init>(Connection.java:1485)
	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
	at java.sql.DriverManager.getConnection(DriverManager.java:525)
	at java.sql.DriverManager.getConnection(DriverManager.java:171)
	at SQLBase.ConnectionManager.getConnection(ConnectionManager.java:52)
	at SQLBase.SqlQuery.query(SqlQuery.java:68)
	at SQLQueries.SqlMitarbeiter.getList(SqlMitarbeiter.java:69)
	at GUIPanels.PanelMitarbeiter.refreshList(PanelMitarbeiter.java:55)
	at GUIPanels.PanelMitarbeiter.<init>(PanelMitarbeiter.java:34)
	at GUI.MainFrame.<init>(MainFrame.java:42)
	at GUI.MainFrame.main(MainFrame.java:101)


** END NESTED EXCEPTION **



Last packet sent to the server was 0 ms ago.
Thu Apr 13 15:45:27 CEST 2006  Fehler beim auslesen eines Datensatzes: java.lang.NullPointerException
```

und das nur bei einmaligen ausführen !!! habe die selbe MySQL Version und Connector auf meinem rechner laufen und funzt ! J Connector ist auch der gleiche und projekt hab ich 1 zu 1 kopiert bn ratlos !

mfg
Fretful


----------



## Fretful (13. Apr 2006)

Es lag an Zone Alarm habe anscheinend nicht alles zugelassen. trozdem danke


----------

