My understanding is that the deprecation of the autoReconnect is in the J/Connector, not the database (please note, i've never gotten under the hood of a database, or a jdbc, just used them). I'm a bit puzzled by Nicolas's problem since it exists while using J/Connector 3.0.17 which autoReconnect was still supported. This may be another connection related problem. Perhaps he has multiple things hitting his MySql server (read not OFBiz) and not enough connections allocated.
In addition, EOFException doesn't sound right for the error Nicolas is describing. Jonathon, if you could verify that an EOFException is thrown when all connections are timed out on what you still have rigged up with MySql, it may be helpful for Nicolas. --- Jonathon -- Improov <[EMAIL PROTECTED]> wrote: > This definitely has to do with the XAPoolDatasource. If you're using > MySQL, you've got bad news. > Either fix XAPoolDatasource, or downgrade to MySQL 4.x. > > I'm using mysql-connector-java-5.0.4-bin.jar with no problems. > > Your problem is likely to do with timed out MySQL connections in the > Database Connection Pool > (DBCP). The DBCP commonly used in OFBiz is the XAPoolDatasource. I > have yet to pull out the source > codes for this DBCP to fix this problem. > > If you're interested in fixing this problem, you can grab the > XAPoolDatasource source codes from > http://svn.ofbiz.org/viewcvs (David Jones said it's there). > > There's another post that said MySQL 5.0 is deprecating the > autoReconnect feature (if I read > right). That would make things worse. With MySQL 4.x, OFBiz can try > to use a timed out connection, > fail once, but won't fail the second time onwards because the > connection is autoReconnected. With > MySQL 5.0, it seems you'll have to restart OFBiz! > > As for why MySQL 5.0 is deprecating the autoReconnect feature, or why > it's not doing away with its > wait_timeout security(?) feature, you can probably find more > conclusively enlightening discussions > on RDBMS forums. > > Here's what I wrote for a colleague, not comprehensive, but you > should get a rough idea: > > A database connection given out by a RDBMS (eg MySQL, MSSQL, > PostgreSQL) should always time out > after a period of inactivity. That's just prudence. So far, all > decent enterprise-grade RDBMSes > have that feature (MySQL, MSSQL). > > A Database Connection Pool (DBCP) is a tool that manages a pool of > pre-created database > connections. It takes out a (configurable) number of connections and > keeps them in a pool, ready > to dish them out to the application (eg OFBiz) on-demand. Benefit: > saves time, since taking out a > connection from any RDBMS requires a substantial waiting period. > > The proper implementation for DBCP: > > 1. Get a connection from pool. > > 2. Check connection status. > > (usually by sending it a query like 'SELECT 1', which will throw > up an error > if the connection is bad). > > 3. If bad, drop it from the pool, get another one from the pool. > > 4. Repeat steps 2 and 3 until we get a good one. > > 5. Return good connection to application > > (OFBiz's DBCP XAPoolDatasource currently throws a bad connection > back to > application with a "choke on this" attitude.) > > 6. Check pool size, and replenish if necessary. > > Jonathon > > Passalacqua Nicolas wrote: > > Hi, > > > > I use the default one: mysql-connector-java-3.0.17-ga-bin.jar > > > > But everything works fine during something like 1 or 2 week, and > after a while I get this error. > > And then I need to restart ofbiz .... > > > > Regards. > > > > > > > > > > -----Message d'origine----- > > De : Chris Howe [mailto:[EMAIL PROTECTED] > > Envoyé : jeudi 19 avril 2007 18:58 > > À : [email protected] > > Objet : Re: TR: ofbiz down > > > > ******* ERROR: No database connection found for helperName > > "localmysql" > > > > Have you copied the correct mysql jdbc driver to > > ofbiz.home/framework/entity/lib/jdbc ??? > > > > > > --- Passalacqua Nicolas <[EMAIL PROTECTED]> wrote: > > > >> -----Message d'origine----- > >> De : [EMAIL PROTECTED] > >> [mailto:[EMAIL PROTECTED] De la part de Ashish > >> Vijaywargiya > >> Envoyé : jeudi 19 avril 2007 15:19 > >> À : [email protected] > >> Objet : Re: ofbiz down > >> > >> > >> Hi Nick, > >> > >> It might be much better if you will provide some more details. > >> > >> 1) Log Error. > >> Please find them below.... > >> > >> 2) Which revision of Ofbiz are you using ?? > >> I currently use opentaps 0.9.2 > >> > >> 3) Have you kept the postgres connector in > framework/entity/lib/jdbc > >> ?? > >> I kept it. Actually the application run but after a few day I get > >> this error. > >> > >> > >> > >> > >> --- runtime exception report > >> -------------------------------------------------- > >> There was an error getting a Minerva datasource. > >> Exception: java.lang.RuntimeException > >> Message: Unable to setTransactionIsolation: Communication link > >> failure: java.io.EOFException, underlying cause: null > >> > >> ** BEGIN NESTED EXCEPTION ** > >> > >> java.io.EOFException > >> > >> STACKTRACE: > >> > >> java.io.EOFException > >> at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1395) > >> at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:1539) > >> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1930) > >> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1168) > >> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1279) > >> at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:1225) > >> at com.mysql.jdbc.Connection.execSQL(Connection.java:2278) > >> at com.mysql.jdbc.Connection.execSQL(Connection.java:2237) > >> at com.mysql.jdbc.Connection.execSQL(Connection.java:2218) > >> at > >> > > > com.mysql.jdbc.Connection.setTransactionIsolation(Connection.java:913) > >> at > >> > > > org.ofbiz.minerva.pool.jdbc.xa.wrapper.XAConnectionImpl.setTransactionIsolation(XAConnectionImpl.java:117) > >> at > >> > > > org.ofbiz.minerva.pool.jdbc.xa.XAConnectionFactory.prepareObject(XAConnectionFactory.java:412) > >> at > org.ofbiz.minerva.pool.ObjectPool.getObject(ObjectPool.java:645) > >> at > >> > > > org.ofbiz.minerva.pool.jdbc.xa.XAPoolDataSource.getConnection(XAPoolDataSource.java:355) > >> at > >> > > > org.ofbiz.entity.transaction.MinervaConnectionFactory.getConnection(MinervaConnectionFactory.java:56) > >> at > >> > > > org.ofbiz.entity.jdbc.ConnectionFactory.tryGenericConnectionSources(ConnectionFactory.java:92) > >> at > >> > > > org.ofbiz.entity.transaction.JNDIFactory.getConnection(JNDIFactory.java:158) > >> at > >> > > > org.ofbiz.entity.transaction.TransactionFactory.getConnection(TransactionFactory.java:104) > >> at > >> > > > org.ofbiz.entity.jdbc.ConnectionFactory.getConnection(ConnectionFactory.java:82) > >> at > >> > > > org.ofbiz.entity.util.SequenceUtil$SequenceBank.fillBank(SequenceUtil.java:177) > >> at > >> > > > org.ofbiz.entity.util.SequenceUtil$SequenceBank.<init>(SequenceUtil.java:120) > >> at > >> > org.ofbiz.entity.util.SequenceUtil.getNextSeqId(SequenceUtil.java:94) > >> at > === message truncated ===
