Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 40346 invoked from network); 16 Oct 2005 12:51:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 16 Oct 2005 12:51:34 -0000 Received: (qmail 30927 invoked by uid 500); 16 Oct 2005 12:51:32 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 30910 invoked by uid 500); 16 Oct 2005 12:51:32 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 30894 invoked by uid 99); 16 Oct 2005 12:51:32 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 16 Oct 2005 05:51:32 -0700 X-ASF-Spam-Status: No, hits=0.8 required=10.0 tests=INFO_TLD,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of dhsilva@gmail.com designates 64.233.184.197 as permitted sender) Received: from [64.233.184.197] (HELO wproxy.gmail.com) (64.233.184.197) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 16 Oct 2005 05:51:32 -0700 Received: by wproxy.gmail.com with SMTP id i28so329968wra for ; Sun, 16 Oct 2005 05:51:10 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ie8iQQk09LNTAx0+Y2bhaDz8EF1r1C0wBImm/NMzDXfrRUNc1IOYdM0Sd+6zVlGrsEuCKPPNNzjq8HtBUr+NmH1G7Ymlo7w5wbayGf6pi5v51bGmsUsZcaFx1GKyX/Tg1e5wQhtOYsA8YNw5npv2gI5GfWzOgFt183bmtqeq+KI= Received: by 10.54.152.7 with SMTP id z7mr1469121wrd; Sun, 16 Oct 2005 05:51:10 -0700 (PDT) Received: by 10.54.73.16 with HTTP; Sun, 16 Oct 2005 05:51:10 -0700 (PDT) Message-ID: <762ca9ae0510160551o48d2f439wb702de07b07a36a7@mail.gmail.com> Date: Sun, 16 Oct 2005 09:51:10 -0300 From: Daniel Henrique Ferreira e Silva To: user-java@ibatis.apache.org Subject: Re: No operations allowed after connection closed. In-Reply-To: <20051016124320.17060.qmail@web50002.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <762ca9ae0510160531q413fdbaexf86326422dcd7d2@mail.gmail.com> <20051016124320.17060.qmail@web50002.mail.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi Oak, Well, considering what you just described below, it's clear for me that you are facing a jdbc driver issue. Not sure it is a bug though. Look for anything related to this problem in MySQL JDBC driver documentation. I'm sure, if it is a problem with the driver, someone has already faced this issue before. Your configs and code look OK as well. Hope that helped. Cheers, Daniel Silva. On 10/16/05, Oak McIlwain wrote: > Thanks for your reply daniel. > > I was not using transactions, they were all > autocommit. This is why I thought it was strange as > it meant that ibatis was having trouble managing the > connections or that the mysql driver was not > functioning correctly. > > As a fix for the moment I have added a "select 1" > style ping command to the config to validate the > connection. This has resulted in fixing the error, > however I am not entirely happy with it as a solution > as is has performance implications and also has not > lead me to understanding why the original error was > occuring. I would be interested to find out the real > cause of the problem. > > Here is the config before I added the ping command: > > > > "-//iBATIS.com//DTD SQL Map Config 2.0//EN" > "http://www.ibatis.com/dtd/sql-map-config-2.dtd"> > > > > resource=3D"resources/database.properties"/> > > cacheModelsEnabled=3D"true" > enhancementEnabled=3D"true" > maxSessions=3D"64" > maxTransactions=3D"8" > maxRequests=3D"128"/> > > > > > name=3D"JDBC.ConnectionURL"/> > name=3D"JDBC.Username"/> > name=3D"JDBC.Password"/> > name=3D"Pool.MaximumActiveConnections"/> > name=3D"Pool.MaximumIdleConnections"/> > > > > > > resource=3D"persistence/sqlmaps/Property.xml"/> > > > > > resource=3D"persistence/sqlmaps/Attribute.xml"/> > resource=3D"persistence/sqlmaps/Administrator.xml"/> > resource=3D"persistence/sqlmaps/GuestbookEntry.xml"/> > > > > Here is an example of a call that was causing the > error, although when the error occured, it would > happen on ANY call: > > public Property getProperty(String propertyID) > { > logger.debug("Method: getProperty"); > logger.info("propertyID =3D " + propertyID); > return (Property) queryForObject("getProperty", > propertyID); > } > > --- Daniel Henrique Ferreira e Silva > wrote: > > > Hi Oak, > > > > Can you post your sql-maps-config.xml file in here? > > And a sample of > > your code calling SqlMaps API? > > > > Also, look at how you are invoking SQLMaps services. > > Are you using > > transactions? Or batch execution? > > People seemed to have such issues when using > > transactions/batch > > execution improperly. > > > > Cheers, > > Daniel Silva. > > > > On 10/15/05, Oak McIlwain > > wrote: > > > > > > I have just uploaded a web app to a server and I > > am getting an intermittent > > > exception as follow: > > > > > > --- The error occurred in > > > persistence/sqlmaps/Property.xml. > > > --- The error occurred while executing query. > > > --- Check the SELECT * FROM Miem_Property WHERE > > Pty_Property_ID =3D ? . > > > --- Check the SQL Statement (preparation failed). > > > --- Cause: java.sql.SQLException: No operations > > allowed after connection > > > closed. > > > Caused by: java.sql.SQLException: No operations > > allowed after connection > > > closed. > > > > > > com.ibatis.dao.client.template.SqlMapDaoTemplate.queryForObject(SqlMapDao= Template.java:164) > > > > > > persistence.sqlmapdao.PropertySqlMapDao.getProperty(Unknown > > > Source) > > > > > > sun.reflect.GeneratedMethodAccessor298.invoke(Unknown > > > Source) > > > > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI= mpl.java:25) > > > java.lang.reflect.Method.invoke(Method.java:585) > > > > > > com.ibatis.dao.engine.impl.DaoProxy.invoke(DaoProxy.java:72) > > > $Proxy29.getProperty(Unknown Source) > > > service.PropertyService.getProperty(Unknown > > Source) > > > action.view.ViewProperty.execute(Unknown Source) > > > > > > org.apache.struts.action.RequestProcessor.processActionPerform(RequestPro= cessor.java:419) > > > > > > org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:2= 24) > > > > > > org.apache.struts.action.ActionServlet.process(ActionServlet.java:1192) > > > > > > org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:412) > > > > > > javax.servlet.http.HttpServlet.service(HttpServlet.java:689) > > > > > > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > > > > > > > > > The sql is valid and works fine but ever since I > > uploaded it this has been > > > happening every 15 or so requests. > > > > > > OS: Linux > > > Mysql : 4.1.13 > > > Java: 1.5.0 > > > Connector/j: mysql-connector-java-3.2.0-alpha-bin > > (having > > > tried many others with similar results) > > > > > > Any help would be much appreciated ! > > > > > > ________________________________ > > > Yahoo! Music Unlimited - Access over 1 million > > songs. Try it free. > > > > > > > > > > > > > __________________________________ > Yahoo! Music Unlimited > Access over 1 million songs. Try it free. > http://music.yahoo.com/unlimited/ >