java.io.EOFException

Pentaho BI Platform Tracking | Jared Cornelius | 9 years ago
  1. 0

    This problem has been reported by just about every customer trying to use MySQL as the platform repository. Every morning the connection to MySQL has been closed and the platform must be restarted. The following error occurs (complete log attached): - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 07:36:45,982 ERROR [JDBCExceptionReporter] 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:1963) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2375) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2874) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1623) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1715) at com.mysql.jdbc.Connection.execSQL(Connection.java:3249) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1268) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1403) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92) at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186) at org.hibernate.loader.Loader.getResultSet(Loader.java:1669) at org.hibernate.loader.Loader.doQuery(Loader.java:662) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224) at org.hibernate.loader.Loader.doList(Loader.java:2145) ... - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - I have instructed customers to use connection pooling, however this hasn't been 100% successful. Here are the steps I provide as a "solution".: = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 1) Download the attached DBCPConnectionProvider.class. 2) Copy DBCPConnectionProvider.class to /pentaho.war/WEB-INF/classes/org/hibernate/connection (create the directories if they do not exist). 3) Edit /pentaho.war/WEB-INF/classes/hibernate.cfg.xml and add the following hibernate.cfg.xml: <!-- begin connection pooling example --> <property name="connection.provider_class">org.hibernate.connection.DBCPConnectionProvider</property> <property name="hibernate.dbcp.validationQuery">select 1 from dual</property> <property name="hibernate.dbcp.initialSize">5</property> <property name="hibernate.dbcp.maxWait">3000</property> <!-- end example --> 4) Restart Pentaho = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = I've searched and searched the internet looking for solutions. The most common answer is to use "autoReconnect=true" URL, however MySQL warns against it and says the problem needs to be addressed in the application code. Here is the MySQL documentation on the issue: http://dev.mysql.com/doc/refman/5.0/en/connector-j-usagenotes-troubleshooting.html I need help from development determining the correct way to resolve this problem.

    Pentaho BI Platform Tracking | 9 years ago | Jared Cornelius
    java.io.EOFException
  2. 0

    This problem has been reported by just about every customer trying to use MySQL as the platform repository. Every morning the connection to MySQL has been closed and the platform must be restarted. The following error occurs (complete log attached): - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 07:36:45,982 ERROR [JDBCExceptionReporter] 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:1963) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2375) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2874) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1623) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1715) at com.mysql.jdbc.Connection.execSQL(Connection.java:3249) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1268) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1403) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92) at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186) at org.hibernate.loader.Loader.getResultSet(Loader.java:1669) at org.hibernate.loader.Loader.doQuery(Loader.java:662) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224) at org.hibernate.loader.Loader.doList(Loader.java:2145) ... - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - I have instructed customers to use connection pooling, however this hasn't been 100% successful. Here are the steps I provide as a "solution".: = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 1) Download the attached DBCPConnectionProvider.class. 2) Copy DBCPConnectionProvider.class to /pentaho.war/WEB-INF/classes/org/hibernate/connection (create the directories if they do not exist). 3) Edit /pentaho.war/WEB-INF/classes/hibernate.cfg.xml and add the following hibernate.cfg.xml: <!-- begin connection pooling example --> <property name="connection.provider_class">org.hibernate.connection.DBCPConnectionProvider</property> <property name="hibernate.dbcp.validationQuery">select 1 from dual</property> <property name="hibernate.dbcp.initialSize">5</property> <property name="hibernate.dbcp.maxWait">3000</property> <!-- end example --> 4) Restart Pentaho = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = I've searched and searched the internet looking for solutions. The most common answer is to use "autoReconnect=true" URL, however MySQL warns against it and says the problem needs to be addressed in the application code. Here is the MySQL documentation on the issue: http://dev.mysql.com/doc/refman/5.0/en/connector-j-usagenotes-troubleshooting.html I need help from development determining the correct way to resolve this problem.

    Pentaho BI Platform Tracking | 9 years ago | Jared Cornelius
    java.io.EOFException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  1. mortalman7 1 times, last 5 months ago
2 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.io.EOFException

    No message provided

    at com.mysql.jdbc.MysqlIO.readFully()
  2. MySQL jdbc
    PreparedStatement.executeQuery
    1. com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1963)
    2. com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2375)
    3. com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2874)
    4. com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1623)
    5. com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1715)
    6. com.mysql.jdbc.Connection.execSQL(Connection.java:3249)
    7. com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1268)
    8. com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1403)
    8 frames
  3. Commons DBCP
    DelegatingPreparedStatement.executeQuery
    1. org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92)
    1 frame
  4. Hibernate
    Loader.doList
    1. org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
    2. org.hibernate.loader.Loader.getResultSet(Loader.java:1669)
    3. org.hibernate.loader.Loader.doQuery(Loader.java:662)
    4. org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
    5. org.hibernate.loader.Loader.doList(Loader.java:2145)
    5 frames