[ http://issues.apache.org/jira/browse/OJB-70?page=all ]
Armin Waibel resolved OJB-70:
-----------------------------
Fix Version: 1.0.4
Resolution: Won't Fix
Seems that the connection in the pool is outdated and the call
connection.isClosed() still returns 'false' (by default OJB does this check
before a connection was returned).
Some jdbc-drivers support reconnect of timed out connections, if possible
enable it. Furthermore you could specify a validation query, then OJB will
perform a real query before a connection was returned from the connection-pool
(e.g. select 1 from dual) and reject all invalid connections. See attribute
'validationQuery' in connection-pool element.
http://db.apache.org/ojb/docu/guides/repository.html#connection-pool
> Connection reset by peer: socket write error
> --------------------------------------------
>
> Key: OJB-70
> URL: http://issues.apache.org/jira/browse/OJB-70
> Project: OJB
> Type: Bug
> Components: PB-API
> Versions: 1.1
> Environment: Windows XP, MySQL on Fedora FC4.0
> Reporter: William Gu
> Fix For: 1.0.4
>
> Hi,
> I'm using PB-API to make connections to MySQL database on Fedora Fc4.0.
> Everything works fine until after the system stay idle for a couple of hours.
> When I access the site again, the system throw the following exception for
> database connection. Seems the program got a un-closed connection from pool.
> If I try to access the database again, it works fine again. I'm not sure
> whether this is a bug or not. Please advise.
> Thanks in advance.
> William
> [org.apache.ojb.broker.accesslayer.JdbcAccessImpl] ERROR: SQLException during
> th
> e execution of the query (for com.diygifts.giftlab.valueobject.MemberVO):
> Commun
> ications link failure due to underlying exception:
> ** BEGIN NESTED EXCEPTION **
> java.net.SocketException
> MESSAGE: Connection reset by peer: socket write error
> STACKTRACE:
> java.net.SocketException: Connection reset by peer: socket write error
> at java.net.SocketOutputStream.socketWrite0(Native Method)
> at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
> at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
> at
> java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65
> )
> at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
> at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2689)
> at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2618)
> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1551)
> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
> at com.mysql.jdbc.Connection.execSQL(Connection.java:2978)
> at com.mysql.jdbc.Connection.execSQL(Connection.java:2902)
> at
> com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.ja
> va:930)
> at
> com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:
> 1024)
> at
> org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(JdbcAcc
> essImpl.java:312)
> at
> org.apache.ojb.broker.accesslayer.RsQueryObject.performQuery(RsQueryO
> bject.java:74)
> at
> org.apache.ojb.broker.accesslayer.RsIterator.<init>(RsIterator.java:1
> 85)
> at
> org.apache.ojb.broker.core.RsIteratorFactoryImpl.createRsIterator(RsI
> teratorFactoryImpl.java:58)
> at
> org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQue
> ry(PersistenceBrokerImpl.java:1918)
> at
> org.apache.ojb.broker.core.PersistenceBrokerImpl.getIteratorFromQuery
> (PersistenceBrokerImpl.java:1493)
> at
> org.apache.ojb.broker.core.PersistenceBrokerImpl.getObjectByQuery(Per
> sistenceBrokerImpl.java:1620)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]