You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Jason Ward <jw...@sdsusa.com> on 2009/07/28 17:16:32 UTC

exception in getMaxRows() with derby 10.5.1.1

I'm curious if anyone else has had problems with 10.5.1.1, getMaxRows() and
CLOBs?
 
I'm getting the following exception :
 
2009-07-27 10:33:53,188 -  WARN -  exception clearing maxRows/queryTimeout 
java.sql.SQLNonTransientConnectionException: No current connection.
 at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown
Source)
 at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
 at org.apache.derby.client.am.Statement.getMaxRows(Unknown Source)
 at
com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.getMaxRows(NewProxyPrepar
edStatement.java:1200)
 at
org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:
298)
 at
org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:
234)
 at org.hibernate.loader.Loader.getResultSet(Loader.java:1826)
 at org.hibernate.loader.Loader.doQuery(Loader.java:697)
 at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.ja
va:259)
 at org.hibernate.loader.Loader.doList(Loader.java:2232)
 at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2129)
 at org.hibernate.loader.Loader.list(Loader.java:2124)
 at
org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:118)
 at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1597)
 at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:306)
...
 
In digging into the stacktrace a little more it seems that hibernates call
to getMaxRows() blows up because checkForClosedStatement() throws the
SQLException, but I have no idea why. (I've verified the connection is open
prior to executing hibenates list(), and it happens too quickly to be a true
timeout.) 
 
It only happens once my table reaches any significant size ( > 20K rows),
and only on this particular table which includes a CLOB column. Has anyone
else seen this? Curiously 10.4.2.1 doesn't exhibit this behavior. 
 
-J

Re: exception in getMaxRows() with derby 10.5.1.1

Posted by Kathey Marsden <km...@sbcglobal.net>.
Jason Ward wrote:
> I'm curious if anyone else has had problems with 10.5.1.1, 
> getMaxRows() and CLOBs?
>
I have not heard any reports of this behavior in 10.5.1.1.  I think we 
should work to narrow it down a little more and then get an issue 
filed.  Can you provide the schema of the table and the query that was 
last executed  before this happens?  Are there any errors in the 
derby.log file?


> I'm getting the following exception :
>  
> 2009-07-27 10:33:53,188 -  WARN -  exception clearing 
> maxRows/queryTimeout
> java.sql.SQLNonTransientConnectionException: No current connection.
>  at 
> org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown 
> Source)
>  at org.apache.derby.client.am.SqlException.getSQLException(Unknown 
> Source)
>  at org.apache.derby.client.am.Statement.getMaxRows(Unknown Source)
>  at 
> com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.getMaxRows(NewProxyPreparedStatement.java:1200)
>  at 
> org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:298)
>  at 
> org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:234)
>  at org.hibernate.loader.Loader.getResultSet(Loader.java:1826)
>  at org.hibernate.loader.Loader.doQuery(Loader.java:697)
>  at 
> org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
>  at org.hibernate.loader.Loader.doList(Loader.java:2232)
>  at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2129)
>  at org.hibernate.loader.Loader.list(Loader.java:2124)
>  at 
> org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:118)
>  at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1597)
>  at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:306)
> ...
>  
> In digging into the stacktrace a little more it seems that hibernates 
> call to getMaxRows() blows up because |checkForClosedStatement() 
> throws the SQLException, but I have no idea why. (I've verified the 
> connection is open prior to executing hibenates list(), and it happens 
> too quickly to be a true timeout.) |
> || 
> |||It only happens once my table reaches any significant size ( > 20K 
> rows), and only on this particular table which includes a CLOB column. 
> ||Has anyone else seen this? Curiously 10.4.2.1 doesn't exhibit this 
> behavior. |
> || 
> |-J|