You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Oak McIlwain <oa...@yahoo.com> on 2005/10/15 14:15:02 UTC

No operations allowed after connection closed.

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 = ? .  
--- 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(SqlMapDaoTemplate.java:164)
persistence.sqlmapdao.PropertySqlMapDao.getProperty(Unknown Source)
sun.reflect.GeneratedMethodAccessor298.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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(RequestProcessor.java:419)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
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.

Re: No operations allowed after connection closed.

Posted by Clinton Begin <cl...@gmail.com>.
You might want to consider configuring a validation query (a.k.a. ping
query). Your connections are probably being invalidated by some policy (e.g.
timeout).

Clinton


On 10/15/05, Oak McIlwain <oa...@yahoo.com> 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 = ? .
> --- 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(
> SqlMapDaoTemplate.java:164)
> persistence.sqlmapdao.PropertySqlMapDao.getProperty(Unknown Source)
> sun.reflect.GeneratedMethodAccessor298.invoke(Unknown Source)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.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(
> RequestProcessor.java:419)
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java
> :224)
> 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.<http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=36035/*http://music.yahoo.com/unlimited/>
>
>

Re: No operations allowed after connection closed.

Posted by Michael Campbell <mi...@gmail.com>.
On 10/16/05, Sven Boden <li...@pandora.be> wrote:
>
> If you're not yet using autoReconnect in the URL of your pool, can you
> try using that. As in the following way:
>
> jdbc:mysql://host/db_hame?autoReconnect=true
>
> Note the upper case R in autoReconnect (it's case sensitive).

Your suggestion here got me intrigued, as I am using an older version of the
driver, so decided to go look at the docs for this.

MySql warns: (emphasis mine)

If enabled the driver will throw an exception for a queries issued on a
stale or dead connection, which belong to the current transaction, but will
attempt reconnect before the next query issued on the connection in a new
transaction. The use of this feature is not recommended, because it has side
effects related to session state and data consistency when applications
don'thandle SQLExceptions properly, and is only designed to be used when you
are unable to configure your application to handle SQLExceptions resulting
from dead and/or stale connections properly. Alternatively, investigate
setting the MySQL server variable "wait_timeout"to some high value rather
than the default of 8 hours.


Still, if it fixes the OP's original problem, so much the better I guess.

--
I tend to view "truly flexible" by another term: "Make everything equally
hard". -- DHH

Re: No operations allowed after connection closed.

Posted by Sven Boden <li...@pandora.be>.
If you're not yet using autoReconnect in the URL of your pool, can you
try using that. As in the following way:

 jdbc:mysql://host/db_hame?autoReconnect=true

Note the upper case R in autoReconnect (it's case sensitive).

Regards,
Sven

On Sun, 16 Oct 2005 05:43:20 -0700 (PDT), you 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:
>
><?xml version="1.0" encoding="UTF-8" standalone="no"?>
>
><!DOCTYPE sqlMapConfig PUBLIC
>	"-//iBATIS.com//DTD SQL Map Config 2.0//EN"
>	"http://www.ibatis.com/dtd/sql-map-config-2.dtd">
>
><sqlMapConfig>
>
>  <properties
>resource="resources/database.properties"/>
>
>  <settings
>    cacheModelsEnabled="true"
>    enhancementEnabled="true"
>    maxSessions="64"
>    maxTransactions="8"
>    maxRequests="128"/>
>
>  <transactionManager type="JDBC">
>    <dataSource type="SIMPLE">
>      <property value="${driver}" name="JDBC.Driver"/>
>      <property value="${url}"
>name="JDBC.ConnectionURL"/>
>      <property value="${username}"
>name="JDBC.Username"/>
>      <property value="${password}"
>name="JDBC.Password"/>
>      <property value="15"
>name="Pool.MaximumActiveConnections"/>
>      <property value="15"
>name="Pool.MaximumIdleConnections"/>
>      <property value="1000" name="Pool.MaximumWait"/>
>    </dataSource>
>  </transactionManager>
>
>  <sqlMap resource="persistence/sqlmaps/Booking.xml"/>
>  <sqlMap
>resource="persistence/sqlmaps/Property.xml"/>
>  <sqlMap resource="persistence/sqlmaps/Manager.xml"/>
>  <sqlMap resource="persistence/sqlmaps/Image.xml"/>
>  <sqlMap resource="persistence/sqlmaps/Event.xml"/>
>  <sqlMap resource="persistence/sqlmaps/Holiday.xml"/>
>  <sqlMap
>resource="persistence/sqlmaps/Attribute.xml"/>
>  <sqlMap
>resource="persistence/sqlmaps/Administrator.xml"/>
>  <sqlMap
>resource="persistence/sqlmaps/GuestbookEntry.xml"/>
>
></sqlMapConfig>
>
>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 = " + propertyID);
>		return (Property) queryForObject("getProperty",
>propertyID);
>	}
>
>--- Daniel Henrique Ferreira e Silva
><dh...@gmail.com> 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 <oa...@yahoo.com>
>> 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 = ? .
>> > --- 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(SqlMapDaoTemplate.java:164)
>> >
>>
>persistence.sqlmapdao.PropertySqlMapDao.getProperty(Unknown
>> > Source)
>> >
>>
>sun.reflect.GeneratedMethodAccessor298.invoke(Unknown
>> > Source)
>> >
>>
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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(RequestProcessor.java:419)
>> >
>>
>org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
>> >
>>
>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/


Re: No operations allowed after connection closed.

Posted by Daniel Henrique Ferreira e Silva <dh...@gmail.com>.
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 <oa...@yahoo.com> 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:
>
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
>
> <!DOCTYPE sqlMapConfig PUBLIC
>         "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
>         "http://www.ibatis.com/dtd/sql-map-config-2.dtd">
>
> <sqlMapConfig>
>
>   <properties
> resource="resources/database.properties"/>
>
>   <settings
>     cacheModelsEnabled="true"
>     enhancementEnabled="true"
>     maxSessions="64"
>     maxTransactions="8"
>     maxRequests="128"/>
>
>   <transactionManager type="JDBC">
>     <dataSource type="SIMPLE">
>       <property value="${driver}" name="JDBC.Driver"/>
>       <property value="${url}"
> name="JDBC.ConnectionURL"/>
>       <property value="${username}"
> name="JDBC.Username"/>
>       <property value="${password}"
> name="JDBC.Password"/>
>       <property value="15"
> name="Pool.MaximumActiveConnections"/>
>       <property value="15"
> name="Pool.MaximumIdleConnections"/>
>       <property value="1000" name="Pool.MaximumWait"/>
>     </dataSource>
>   </transactionManager>
>
>   <sqlMap resource="persistence/sqlmaps/Booking.xml"/>
>   <sqlMap
> resource="persistence/sqlmaps/Property.xml"/>
>   <sqlMap resource="persistence/sqlmaps/Manager.xml"/>
>   <sqlMap resource="persistence/sqlmaps/Image.xml"/>
>   <sqlMap resource="persistence/sqlmaps/Event.xml"/>
>   <sqlMap resource="persistence/sqlmaps/Holiday.xml"/>
>   <sqlMap
> resource="persistence/sqlmaps/Attribute.xml"/>
>   <sqlMap
> resource="persistence/sqlmaps/Administrator.xml"/>
>   <sqlMap
> resource="persistence/sqlmaps/GuestbookEntry.xml"/>
>
> </sqlMapConfig>
>
> 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 = " + propertyID);
>                 return (Property) queryForObject("getProperty",
> propertyID);
>         }
>
> --- Daniel Henrique Ferreira e Silva
> <dh...@gmail.com> 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 <oa...@yahoo.com>
> > 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 = ? .
> > > --- 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(SqlMapDaoTemplate.java:164)
> > >
> >
> persistence.sqlmapdao.PropertySqlMapDao.getProperty(Unknown
> > > Source)
> > >
> >
> sun.reflect.GeneratedMethodAccessor298.invoke(Unknown
> > > Source)
> > >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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(RequestProcessor.java:419)
> > >
> >
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
> > >
> >
> 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/
>

Re: No operations allowed after connection closed.

Posted by Oak McIlwain <oa...@yahoo.com>.
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:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<!DOCTYPE sqlMapConfig PUBLIC
	"-//iBATIS.com//DTD SQL Map Config 2.0//EN"
	"http://www.ibatis.com/dtd/sql-map-config-2.dtd">

<sqlMapConfig>

  <properties
resource="resources/database.properties"/>

  <settings
    cacheModelsEnabled="true"
    enhancementEnabled="true"
    maxSessions="64"
    maxTransactions="8"
    maxRequests="128"/>

  <transactionManager type="JDBC">
    <dataSource type="SIMPLE">
      <property value="${driver}" name="JDBC.Driver"/>
      <property value="${url}"
name="JDBC.ConnectionURL"/>
      <property value="${username}"
name="JDBC.Username"/>
      <property value="${password}"
name="JDBC.Password"/>
      <property value="15"
name="Pool.MaximumActiveConnections"/>
      <property value="15"
name="Pool.MaximumIdleConnections"/>
      <property value="1000" name="Pool.MaximumWait"/>
    </dataSource>
  </transactionManager>

  <sqlMap resource="persistence/sqlmaps/Booking.xml"/>
  <sqlMap
resource="persistence/sqlmaps/Property.xml"/>
  <sqlMap resource="persistence/sqlmaps/Manager.xml"/>
  <sqlMap resource="persistence/sqlmaps/Image.xml"/>
  <sqlMap resource="persistence/sqlmaps/Event.xml"/>
  <sqlMap resource="persistence/sqlmaps/Holiday.xml"/>
  <sqlMap
resource="persistence/sqlmaps/Attribute.xml"/>
  <sqlMap
resource="persistence/sqlmaps/Administrator.xml"/>
  <sqlMap
resource="persistence/sqlmaps/GuestbookEntry.xml"/>

</sqlMapConfig>

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 = " + propertyID);
		return (Property) queryForObject("getProperty",
propertyID);
	}

--- Daniel Henrique Ferreira e Silva
<dh...@gmail.com> 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 <oa...@yahoo.com>
> 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 = ? .
> > --- 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(SqlMapDaoTemplate.java:164)
> >
>
persistence.sqlmapdao.PropertySqlMapDao.getProperty(Unknown
> > Source)
> >
>
sun.reflect.GeneratedMethodAccessor298.invoke(Unknown
> > Source)
> >
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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(RequestProcessor.java:419)
> >
>
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
> >
>
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/

Re: No operations allowed after connection closed.

Posted by Daniel Henrique Ferreira e Silva <dh...@gmail.com>.
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 <oa...@yahoo.com> 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 = ? .
> --- 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(SqlMapDaoTemplate.java:164)
> persistence.sqlmapdao.PropertySqlMapDao.getProperty(Unknown
> Source)
> sun.reflect.GeneratedMethodAccessor298.invoke(Unknown
> Source)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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(RequestProcessor.java:419)
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
> 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.
>
>