[
https://issues.apache.org/jira/browse/DERBY-4333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kathey Marsden updated DERBY-4333:
----------------------------------
Component/s: SQL
Issue & fix info: [High Value Fix, Repro attached]
Summary: Exception in getMaxRows() after NullPointerException in
SQLClob.readExternal() during query in table with CLOB column (was: Exception
in getMaxRows() during query in table with CLOB column)
The relevant trace in derby.log is
2009-08-03 18:44:00.579 GMT Thread[DRDAConnThread_14,5,derby.daemons] (XID =
35612), (SESSIONID = 17), (DATABASE = DERBY_DEBUG), (DRDAID =
NF000001.H180-508905508567890672{12}), Failed Statement is: select this_.id as
id0_0_, this_.name as name0_0_, this_.cluster as cluster0_0_,
this_.descriptionCode as descript4_0_0_, this_.jobName as jobName0_0_,
this_.msg as msg0_0_, this_.prefix as prefix0_0_, this_.severity as
severity0_0_, this_.timestamp as timestamp0_0_, this_.userID as userID0_0_ from
Log this_ where this_.timestamp>=? and this_.name in (?) order by
this_.timestamp asc with 2 parameters begin parameter #1: 2009-07-01 00:00:00.0
:end parameter begin parameter #2: agent1 :end parameter
java.lang.NullPointerException
at org.apache.derby.iapi.types.SQLClob.readExternal(Unknown Source)
at
org.apache.derby.impl.store.raw.data.StreamFileContainer.fetchNext(Unknown
Source)
at
org.apache.derby.impl.store.raw.data.StreamFileContainerHandle.fetchNext(Unknown
Source)
at org.apache.derby.impl.store.access.sort.MergeScan.mergeARow(Unknown
Source)
at org.apache.derby.impl.store.access.sort.MergeScan.init(Unknown
Source)
at
org.apache.derby.impl.store.access.sort.MergeSort.openSortScan(Unknown Source)
at
org.apache.derby.impl.store.access.RAMTransaction.openSortScan(Unknown Source)
at org.apache.derby.impl.sql.execute.SortResultSet.loadSorter(Unknown
Source)
at org.apache.derby.impl.sql.execute.SortResultSet.openCore(Unknown
Source)
at
org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(Unknown Source)
at
org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown
Source)
at
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(Unknown
Source)
at org.apache.derby.impl.drda.DRDAStatement.execute(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown
Source)
at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
Original thread
http://www.nabble.com/exception-in-getMaxRows()-with-derby-10.5.1.1-tt24701515.html#a24701515
mentions this was not an issue with 10.4.2.1
Although exposed with network client, it looks like an embedded bug.
Marking repro attached even though the reproduction requires hibernate.
> Exception in getMaxRows() after NullPointerException in
> SQLClob.readExternal() during query in table with CLOB column
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-4333
> URL: https://issues.apache.org/jira/browse/DERBY-4333
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.5.1.1
> Reporter: Jason Ward
> Attachments: derby.log, derby_10.5_debug.zip
>
>
> Observed derby 10.5.1.1 throwing exception in getMaxRows() when querying
> table with greater than ~20K rows and CLOB column.
> The exception is :
> java.sql.SQLException: No current connection.
> at
> org.apache.derby.client.am.SQLExceptionFactory.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)
> at com.jw.TestMain.query(TestMain.java:175)
> at com.jw.TestMain.main(TestMain.java:189)
> Caused by: org.apache.derby.client.am.SqlException: No current connection.
> at org.apache.derby.client.am.Statement.checkForClosedStatement(Unknown
> Source)
>
> 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.
> Curiously 10.4.2.1 does not exhibit this behavior.
> I have prepared a small eclipse project which repros the error and will
> attach.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.