Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 33468 invoked from network); 26 Mar 2008 08:45:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Mar 2008 08:45:47 -0000 Received: (qmail 21357 invoked by uid 500); 26 Mar 2008 08:45:45 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 21340 invoked by uid 500); 26 Mar 2008 08:45:45 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 21331 invoked by uid 99); 26 Mar 2008 08:45:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Mar 2008 01:45:45 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [217.197.215.36] (HELO mail.rodanotech.ch) (217.197.215.36) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Mar 2008 08:45:03 +0000 Received: from [192.168.1.44] (222-112.5-85.cust.bluewin.ch [85.5.112.222]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.rodanotech.ch (Postfix) with ESMTP id D82A3C025 for ; Wed, 26 Mar 2008 09:45:12 +0100 (CET) Message-Id: <5DADD352-8648-4903-B11F-5D33263EA642@rodanotech.ch> From: Alexander Lamb To: user@cayenne.apache.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v919.2) Subject: Crash when reconnecting to MySQL (3.0M3) Date: Wed, 26 Mar 2008 09:44:42 +0100 X-Mailer: Apple Mail (2.919.2) X-Virus-Checked: Checked by ClamAV on apache.org Hello List, We have an application, deployed successfully with Tapestry 5.0.11 and =20= Cayenne 3.0M3 on Tomcat 6 with MySQL 5.0. Everything is fine until the point where a long period of inactivity =20 has passed and (we suppose) all the DataContexts are garbage collected =20= (we create one DataContext per user session). The first user who logs in will generate an error on (again, what we =20 suppose) is a problem reconnecting to MySQL. To avoid the problem, we "ping" the app to keep it alive... We also =20 tried to catch the Exception but doing so simply pushes the problem to =20= another part of the program. The funny thing is that it is not the =20 first attempt to connect to the database but maybe the first attempt =20 using either a stored query in the model or raw SQL. Here is the kind of message we get: 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:1905) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2351) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2862) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1571) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1666) at com.mysql.jdbc.Connection.execSQL(Connection.java:2988) at com.mysql.jdbc.Connection.setAutoCommit(Connection.java:4913) at =20 org=20 .apache=20 .cayenne=20 .conn.PooledConnectionImpl.getConnection(PooledConnectionImpl.java:129) at =20 org.apache.cayenne.conn.PoolManager.uncheckConnection(PoolManager.java:=20= 383) at = org.apache.cayenne.conn.PoolManager.getConnection(PoolManager.java:=20 367) at = org.apache.cayenne.conn.PoolManager.getConnection(PoolManager.java:=20 344) at org.apache.cayenne.access.DataNode=20 $TransactionDataSource.getConnection(DataNode.java:321) at = org.apache.cayenne.access.DataNode.performQueries(DataNode.java:209) at =20 org=20 .apache=20 .cayenne=20 .access.DataDomainQueryAction.runQuery(DataDomainQueryAction.java:442) at org.apache.cayenne.access.DataDomainQueryAction.access=20 $000(DataDomainQueryAction.java:67) at org.apache.cayenne.access.DataDomainQueryAction=20 $2.transform(DataDomainQueryAction.java:415) at =20 org.apache.cayenne.access.DataDomain.runInTransaction(DataDomain.java:=20= 847) at =20 org=20 .apache=20 .cayenne=20 .access=20 .DataDomainQueryAction=20 .runQueryInTransaction(DataDomainQueryAction.java:412) at =20 org=20 .apache=20 .cayenne=20 .access.DataDomainQueryAction.execute(DataDomainQueryAction.java:119) at = org.apache.cayenne.access.DataDomain.onQuery(DataDomain.java:740) at =20 org=20 .apache=20 .cayenne=20 .util.ObjectContextQueryAction.runQuery(ObjectContextQueryAction.java:=20= 296) at org.apache.cayenne.util.ObjectContextQueryAction=20 $1.createObject(ObjectContextQueryAction.java:286) at = org.apache.cayenne.cache.MapQueryCache.get(MapQueryCache.java:74) at =20 org=20 .apache=20 .cayenne=20 .util=20 .ObjectContextQueryAction=20 .interceptLocalCache(ObjectContextQueryAction.java:258) at =20 org=20 .apache=20 .cayenne=20 .util.ObjectContextQueryAction.execute(ObjectContextQueryAction.java:82) at = org.apache.cayenne.access.DataContext.onQuery(DataContext.java:1331) at =20 org.apache.cayenne.access.DataContext.performQuery(DataContext.java:=20 1320) at =20 ch=20 .rodano=20 .studies=20 .services=20 .StudySession=20 .getRunningTotalPatientsByMonthForRegistryCenters(StudySession.java:466) etc... Thanks for any idea! Alex -- Alexander Lamb Founding Associate RODANOTECH S=E0rl 4 ch. de la Tour de Champel 1206 Geneva Switzerland Tel: 022 347 77 37 Fax: 022 347 77 38 http://www.rodanotech.ch