ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | c-jdbc List | August 2006 Index

<--  Date Index  --> <--  Thread Index  -->

Connection lost between MYSQLand C-JDBC


Hi,

 

Connection between MySQL and C-JDBC is lost because timeout expire. The timeout value can be set in mysql config file my.cnf (wait_time_out and interactive_timeout) but can’t be disabled. My problem is I have a web application that all time is right but I have java application that if I try to run after the timeout expire is raised a exception (both use the cjdbc). If i do some operation in my web apps that update my Database this succeed and after this my java application run ok.

I don’t understand why the timeout is not expire for the web application, why the connection between MySQL and CJDBC is only lost for my java application?

 

 

Best Regards,

Emanuel Barbosa

 

 

P.S.:

I’m using:

 

c-jdbc 2.0.2

Java 1.5.0_02

Tomcat  5.5

 

 

The Excepion:

 

C:\DBRestoreJar>java -jar DBSeed.jar

Restore database in course...

Error restoring Database.

org.dbunit.dataset.DataSetException: org.objectweb.cjdbc.common.exceptions.drive

r.DriverSQLException: Message of cause: Communications link failure due to under

lying exception:

 

** BEGIN NESTED EXCEPTION **

 

java.io.EOFException

 

STACKTRACE:

 

java.io.EOFException

        at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1842)

        at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2288)

        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2788)

        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1531)

        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1622)

        at com.mysql.jdbc.Connection.execSQL(Connection.java:2379)

        at com.mysql.jdbc.Connection.execSQL(Connection.java:2306)

        at com.mysql.jdbc.Statement.executeQuery(Statement.java:1192)

        at com.mysql.jdbc.DatabaseMetaData.getTables(DatabaseMetaData.java:3450)

 

        at org.objectweb.cjdbc.controller.virtualdatabase.VirtualDatabaseDynamic

MetaData.getTables(VirtualDatabaseDynamicMetaData.java:1348)

        at org.objectweb.cjdbc.controller.virtualdatabase.VirtualDatabaseWorkerT

hread.databaseMetaDataGetTables(VirtualDatabaseWorkerThread.java:1275)

        at org.objectweb.cjdbc.controller.virtualdatabase.VirtualDatabaseWorkerT

hread.run(VirtualDatabaseWorkerThread.java:469)

 

 

** END NESTED EXCEPTION **

 

 

        at org.dbunit.database.DatabaseDataSet.initialize(DatabaseDataSet.java:1

66)

        at org.dbunit.database.DatabaseDataSet.getTableMetaData(DatabaseDataSet.

java:197)

        at org.dbunit.operation.DeleteAllOperation.execute(DeleteAllOperation.ja

va:82)

        at DBManager.DBSeed.restoreDB(DBSeed.java:77)

        at DBManager.DBSeed.main(DBSeed.java:158)

org.objectweb.cjdbc.common.exceptions.driver.DriverSQLException: Message of caus

e: 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:1842)

        at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2288)

        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2788)

        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1531)

        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1622)

        at com.mysql.jdbc.Connection.execSQL(Connection.java:2379)

        at com.mysql.jdbc.Connection.execSQL(Connection.java:2306)

        at com.mysql.jdbc.Statement.executeQuery(Statement.java:1192)

        at com.mysql.jdbc.DatabaseMetaData.getTables(DatabaseMetaData.java:3450)

 

        at org.objectweb.cjdbc.controller.virtualdatabase.VirtualDatabaseDynamic

MetaData.getTables(VirtualDatabaseDynamicMetaData.java:1348)

        at org.objectweb.cjdbc.controller.virtualdatabase.VirtualDatabaseWorkerT

hread.databaseMetaDataGetTables(VirtualDatabaseWorkerThread.java:1275)

        at org.objectweb.cjdbc.controller.virtualdatabase.VirtualDatabaseWorkerT

hread.run(VirtualDatabaseWorkerThread.java:469)

 

 

** END NESTED EXCEPTION **

 

 

        at org.objectweb.cjdbc.driver.Connection.getTables(Connection.java:2273)

 

        at org.objectweb.cjdbc.driver.DatabaseMetaData.getTables(DatabaseMetaDat

a.java:691)

        at org.dbunit.database.DatabaseDataSet.initialize(DatabaseDataSet.java:1

34)

        at org.dbunit.database.DatabaseDataSet.getTableMetaData(DatabaseDataSet.

java:197)

        at org.dbunit.operation.DeleteAllOperation.execute(DeleteAllOperation.ja

va:82)

        at DBManager.DBSeed.restoreDB(DBSeed.java:77)

        at DBManager.DBSeed.main(DBSeed.java:158)

org.objectweb.cjdbc.common.exceptions.driver.DriverSQLException: Message of caus

e: 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:1842)

        at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2288)

        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2788)

        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1531)

        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1622)

        at com.mysql.jdbc.Connection.execSQL(Connection.java:2379)

        at com.mysql.jdbc.Connection.execSQL(Connection.java:2306)

        at com.mysql.jdbc.Statement.executeQuery(Statement.java:1192)

        at com.mysql.jdbc.DatabaseMetaData.getTables(DatabaseMetaData.java:3450)

 

        at org.objectweb.cjdbc.controller.virtualdatabase.VirtualDatabaseDynamic

MetaData.getTables(VirtualDatabaseDynamicMetaData.java:1348)

        at org.objectweb.cjdbc.controller.virtualdatabase.VirtualDatabaseWorkerT

hread.databaseMetaDataGetTables(VirtualDatabaseWorkerThread.java:1275)

        at org.objectweb.cjdbc.controller.virtualdatabase.VirtualDatabaseWorkerT

hread.run(VirtualDatabaseWorkerThread.java:469)

 

 

** END NESTED EXCEPTION **

 

 

        at org.objectweb.cjdbc.driver.Connection.getTables(Connection.java:2273)

 

        at org.objectweb.cjdbc.driver.DatabaseMetaData.getTables(DatabaseMetaDat

a.java:691)

        at org.dbunit.database.DatabaseDataSet.initialize(DatabaseDataSet.java:1

34)

        at org.dbunit.database.DatabaseDataSet.getTableMetaData(DatabaseDataSet.

java:197)

        at org.dbunit.operation.DeleteAllOperation.execute(DeleteAllOperation.ja

va:82)

        at DBManager.DBSeed.restoreDB(DBSeed.java:77)

        at DBManager.DBSeed.main(DBSeed.java:158)

org.objectweb.cjdbc.common.exceptions.driver.DriverSQLException: Message of caus

e: 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:1842)

        at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2288)

        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2788)

        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1531)

        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1622)

        at com.mysql.jdbc.Connection.execSQL(Connection.java:2379)

        at com.mysql.jdbc.Connection.execSQL(Connection.java:2306)

        at com.mysql.jdbc.Statement.executeQuery(Statement.java:1192)

        at com.mysql.jdbc.DatabaseMetaData.getTables(DatabaseMetaData.java:3450)

 

        at org.objectweb.cjdbc.controller.virtualdatabase.VirtualDatabaseDynamic

MetaData.getTables(VirtualDatabaseDynamicMetaData.java:1348)

        at org.objectweb.cjdbc.controller.virtualdatabase.VirtualDatabaseWorkerT

hread.databaseMetaDataGetTables(VirtualDatabaseWorkerThread.java:1275)

        at org.objectweb.cjdbc.controller.virtualdatabase.VirtualDatabaseWorkerT

hread.run(VirtualDatabaseWorkerThread.java:469)

 

 

** END NESTED EXCEPTION **

 

 

 



<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.