MySQL Forums
Forum List  »  Connector/JDBC and Java

Re: MySQL java.net.SocketException: Broken pipe
Posted by: Jeyendran Balakrishnan
Date: August 31, 2009 06:33PM

Hello,

I am also getting the same kind of exception after the server has been runing for a while:

My system configuration:
* Tomcat 6.0.18
* mySQL 5.0.45
* Database connection type: Java JPA
* JPA library: Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))
* No connection pooling of any kind.

Exception:
[TopLink Warning]: 2009.08.31 04:41:43.369--ClientSession(25914126)--Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.DatabaseException
Internal Exception: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.net.SocketException
MESSAGE: Broken pipe

STACKTRACE:

java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:110)
at java.net.SocketOutputStream.write(SocketOutputStream.java:154)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:83)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:141)
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2744)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1612)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3277)
at com.mysql.jdbc.Connection.setAutoCommit(Connection.java:5442)
at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.basicBeginTransaction(DatabaseAccessor.java:174)
at oracle.toplink.essentials.internal.databaseaccess.DatasourceAccessor.beginTransaction(DatasourceAccessor.java:159)
at oracle.toplink.essentials.internal.sessions.AbstractSession.basicBeginTransaction(AbstractSession.java:298)
at oracle.toplink.essentials.threetier.ClientSession.basicBeginTransaction(ClientSession.java:138)
at oracle.toplink.essentials.internal.sessions.AbstractSession.beginTransaction(AbstractSession.java:393)
at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.beginTransaction(UnitOfWorkImpl.java:433)
at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1008)
at oracle.toplink.essentials.internal.ejb.cmp3.base.RepeatableWriteUnitOfWork.commitToDatabase(RepeatableWriteUnitOfWork.java:403)
at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1126)
at oracle.toplink.essentials.internal.ejb.cmp3.base.RepeatableWriteUnitOfWork.commitRootUnitOfWork(RepeatableWriteUnitOfWork.java:107)
at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.commitAndResume(UnitOfWorkImpl.java:856)
at oracle.toplink.essentials.internal.ejb.cmp3.transaction.base.EntityTransactionImpl.commit(EntityTransactionImpl.java:102)
at oracle.toplink.essentials.internal.ejb.cmp3.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:60)
at com.personaltube.db.impl.rdb.CResourceLocalDBManager.endTransaction(CResourceLocalDBManager.java:163)

where the last line calls:
em.getTransaction().commit()

So the exception occurs while the EntityManager is trying to commit the transaction. My transaction here is merely trying to add a row to a table.

mySQL shell seems to be working fine and I can manually do CRUD operations on the same table.

Please help, I don't know of any solutions that can help.

Thanks a lot.

Options: ReplyQuote


Subject
Written By
Posted
Re: MySQL java.net.SocketException: Broken pipe
August 31, 2009 06:33PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.