Connection Reset
am 03.10.2006 00:37:08 von Phillip ParrHallo,
ich habe eine MySQL-DB auf welche ich über jdbc zugreife. Grundsätzlich geht
es auch - nur bekomme ich nun diesen Fehler:
java.net.SocketException
MESSAGE: Connection reset
STACKTRACE:
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at
com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingS treamIfNecessary
(ReadAheadInputStream.java:157)
at
com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInput Stream.java:188)
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1910)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2357)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2803)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:812)
at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1295)
at com.mysql.jdbc.MysqlIO.readSingleRowSet(MysqlIO.java:2251)
at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:439)
at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.j ava:1970)
at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:1387)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1727)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3118)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3047)
at com.mysql.jdbc.Statement.executeQuery(Statement.java:1166)
at legion.mp3search.tools.DBHelper.executeQuery(DBHelper.java:1 38)
Das tritt auf, wenn ich einen grösseren BLOB auslese, ca. 1.5MB.
Max_packet_Size ist gesetzt auf 6MB.
Meine Connection sieht so aus:
public static Connection getConnection() throws CMExceptionCreationFailed{
try {
if(conn == null) {
try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
} catch (Exception e) {
throw new CMExceptionCreationFailed("Unable to instantiate
MYSQL-drivers.");
}
}
if(conn == null || conn.isClosed()) {
conn =
DriverManager.getConnection("jdbc:mysql://"+HOST+":"+PORT+"/ "+SCHEME,
USERNAME, PASSWD);
}
} catch (SQLException ex) {
throw new CMExceptionCreationFailed("Unable to get connection to
the database.\n" +
"SQLException: " + ex.getMessage()+"\n"+
"SQLState: " + ex.getSQLState()+"\n"+
"VendorError: " + ex.getErrorCode());
}
return conn;
}
Habe ich da was vergessen ? Danke für eure Hilfe und Grüsse,
oliver