You are not logged in.

#1 2007-05-22 20:48:06

karmapolice
Member
Registered: 2007-01-31
Posts: 113

MySQL + Java doesn't work

I've been trying to get a connection using MySQL and Java without luck, I've been messing with every solution I have found in google without luck. It worked the last time I used mysql + java a few months ago (in Ubuntu) but now I can't even get a connection.

MySQL works with PHP, MySQL Administrator and CLI but I just can't get it to work with Java.

Has anybody been able to run Java applications that use JDBC + MySQL in Arch?

The stack trace I get is like the following and it changes a little bit if I use different versions of the Connector

java.sql.SQLException: Server connection failure during transaction. 
Due to underlying exception: 'com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: 

** BEGIN NESTED EXCEPTION ** 

java.io.EOFException

STACKTRACE:

java.io.EOFException
        at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1934)
        at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:483)
        at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:992)
        at com.mysql.jdbc.Connection.createNewIO(Connection.java:2709)
        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:582)
        at java.sql.DriverManager.getConnection(DriverManager.java:185)
        at MySQLConnectTest.main(MySQLConnectTest.java:12)

Last edited by karmapolice (2007-05-22 20:48:25)

Offline

#2 2007-05-24 14:53:59

gothicknight
Member
From: Portugal
Registered: 2006-04-08
Posts: 219

Re: MySQL + Java doesn't work

I second that, i'll see for a bug report

Offline

#3 2007-05-24 14:59:42

gothicknight
Member
From: Portugal
Registered: 2006-04-08
Posts: 219

Re: MySQL + Java doesn't work

Offline

#4 2007-05-28 19:20:43

karmapolice
Member
Registered: 2007-01-31
Posts: 113

Re: MySQL + Java doesn't work

Thank you, finally I can connect to mysql.

Offline

Board footer

Powered by FluxBB