sim4000
Lebende Foren Legende
Hallo.
Ich versuche gerade einem Java Programm mit dem JDBC Connector MySQL beizubringen. Das Problem ist nur, das dass nich ganz klappen will.
Hier ist der stackTrace, der beim Verbindungsaufbau ausgegeben wird:
Dazu muss ich sagen, das ich gerade frisch auf Arch Linux gewechselt bin. Als ich noch bei Debian war, lief das Programm noch sauber. Am Programm kann es also nicht liegen.
System: Arch Linux
Kernel: 2.6.24
Java: 1.6.0_05
JDBC Connector: mysql-connector-java-5.1.6-bin.jar
Java IDE: Netbeans
Hat jemand von euch eine Idee woran das liegen kann?
Lg, sim.
//edit
Ich hab die selbe Frage auch noch einmal im Java-Forum gestellt: http://www.java-forum.org/de/viewtopic.php?p=416783
//edit2
Ich habe das Programm noch einmal in einer Windows VM getestet, und da funktioniert es ohne Fehler.
Ich versuche gerade einem Java Programm mit dem JDBC Connector MySQL beizubringen. Das Problem ist nur, das dass nich ganz klappen will.
Hier ist der stackTrace, der beim Verbindungsaufbau ausgegeben wird:
Code:
init:
deps-jar:
Compiling 1 source file to /home/sim4000/NetBeansProjects/QBv2/build/classes
compile:
run:
Locking assertion failure. Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xb4bc0767]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_unlock+0x31) [0xb4bc08b1]
#2 /usr/lib/libX11.so.6(_XReply+0x244) [0x905909e4]
#3 /opt/java/jre/lib/i386/xawt/libmawt.so [0x906a08ce]
#4 /opt/java/jre/lib/i386/xawt/libmawt.so [0x9067d067]
#5 /opt/java/jre/lib/i386/xawt/libmawt.so [0x9067d318]
#6 /opt/java/jre/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0x2f) [0x9067d61f]
#7 [0xb4c933aa]
#8 [0xb4c8bf0d]
#9 [0xb4c8bf0d]
#10 [0xb4c89249]
#11 /opt/java/jre/lib/i386/server/libjvm.so [0x637338d]
#12 /opt/java/jre/lib/i386/server/libjvm.so [0x64fd168]
#13 /opt/java/jre/lib/i386/server/libjvm.so [0x6373220]
#14 /opt/java/jre/lib/i386/server/libjvm.so(JVM_DoPrivileged+0x363) [0x63c90d3]
#15 /opt/java/jre/lib/i386/libjava.so(Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2+0x3d) [0xb7c9396d]
#16 [0xb4c933aa]
#17 [0xb4c8bda7]
#18 [0xb4c89249]
#19 /opt/java/jre/lib/i386/server/libjvm.so [0x637338d]
Locking assertion failure. Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xb4bc0767]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_lock+0x2e) [0xb4bc081e]
#2 /usr/lib/libX11.so.6 [0x9058fba9]
#3 /usr/lib/libX11.so.6(XGetVisualInfo+0x26) [0x90585fe6]
#4 /opt/java/jre/lib/i386/xawt/libmawt.so [0x9067c319]
#5 /opt/java/jre/lib/i386/xawt/libmawt.so [0x9067c565]
#6 /opt/java/jre/lib/i386/xawt/libmawt.so [0x9067d3c9]
#7 /opt/java/jre/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0x2f) [0x9067d61f]
#8 [0xb4c933aa]
#9 [0xb4c8bf0d]
#10 [0xb4c8bf0d]
#11 [0xb4c89249]
#12 /opt/java/jre/lib/i386/server/libjvm.so [0x637338d]
#13 /opt/java/jre/lib/i386/server/libjvm.so [0x64fd168]
#14 /opt/java/jre/lib/i386/server/libjvm.so [0x6373220]
#15 /opt/java/jre/lib/i386/server/libjvm.so(JVM_DoPrivileged+0x363) [0x63c90d3]
#16 /opt/java/jre/lib/i386/libjava.so(Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2+0x3d) [0xb7c9396d]
#17 [0xb4c933aa]
#18 [0xb4c8bda7]
#19 [0xb4c89249]
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
Last packet sent to the server was 1 ms ago.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2103)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:718)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at qbv2.MySQL_Class.connect(MySQL_Class.java:24)
at qbv2.GUI.serverConnectActionPerformed(GUI.java:763)
at qbv2.GUI.access$300(GUI.java:17)
at qbv2.GUI$2.actionPerformed(GUI.java:268)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6041)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
at java.awt.Component.processEvent(Component.java:5806)
at java.awt.Container.processEvent(Container.java:2058)
at java.awt.Component.dispatchEventImpl(Component.java:4413)
at java.awt.Container.dispatchEventImpl(Container.java:2116)
at java.awt.Component.dispatchEvent(Component.java:4243)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
at java.awt.Container.dispatchEventImpl(Container.java:2102)
at java.awt.Window.dispatchEventImpl(Window.java:2440)
at java.awt.Component.dispatchEvent(Component.java:4243)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at java.net.Socket.<init>(Socket.java:366)
at java.net.Socket.<init>(Socket.java:209)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:253)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:280)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2026)
... 40 more
BUILD SUCCESSFUL (total time: 4 seconds)
System: Arch Linux
Kernel: 2.6.24
Java: 1.6.0_05
JDBC Connector: mysql-connector-java-5.1.6-bin.jar
Java IDE: Netbeans
Hat jemand von euch eine Idee woran das liegen kann?
Lg, sim.
//edit
Ich hab die selbe Frage auch noch einmal im Java-Forum gestellt: http://www.java-forum.org/de/viewtopic.php?p=416783
//edit2
Ich habe das Programm noch einmal in einer Windows VM getestet, und da funktioniert es ohne Fehler.
Zuletzt bearbeitet: