db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Pendleton (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3033) select query results in nullpointer exception in skipScan()
Date Tue, 18 Sep 2007 00:28:43 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12528197
] 

Bryan Pendleton commented on DERBY-3033:
----------------------------------------

I played around with the skipScan repro case and confirmed Kathey's suspicion about
BaseActivation.getColumnFromRow, as follows:
 - with the current trunk, the repro case gives me the expected NPE in skipScan.
 - with the "if" statement removed from BaseActivation.getColumnFromRow, the
   repro case gives me a NPE which matches the NPE that Kathey posted from the
   old bug 4736. So this reproduction case definitely takes the code through a
  similar code path as that of bug 4736.

Here's the stack trace I get with the current trunk with the "if" removed from getColumnFromRow:

2007-09-18 00:18:51.793 GMT Thread[DRDAConnThread_2,5,main] (XID = 352997), (SESSIONID = 0),
(DATABASE = viewer), (DRDAID = NF000001.B54B-810083792898537651{1}), Failed Statement is:
select study_id, number_of_images from (select distinct                  st.study_id,    
               st.number_of_images,                    dsr.priority,                   st.creation_datetime
      from dicom_send_requests dsr, studies st       where dsr.send_date is null       and
  dsr.workstation_id = ?       and   dsr.study_id = st.study_id       and   not exists ( 
             select 1               from dispatcher_locks               where dispatcher_locks.study_id
= st.study_id               and   dispatcher_locks.workstation_id = ?               and  
dispatcher_locks.dispatcher_id = ?               ) ) temp with 3 parameters begin parameter
#1: 4 :end parameter begin parameter #2: 4 :end parameter begin parameter #3: 100 :end parameter
ERROR 38000: The exception 'java.lang.NullPointerException' was thrown while evaluating an
expression.
        at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:294)
        at org.apache.derby.iapi.error.StandardException.unexpectedUserException(StandardException.java:554)
        at org.apache.derby.impl.services.reflect.DirectCall.invoke(ReflectGeneratedClass.java:164)
        at org.apache.derby.impl.sql.execute.TableScanResultSet.openCore(TableScanResultSet.java:258)
        at org.apache.derby.impl.sql.execute.IndexRowToBaseRowResultSet.openCore(IndexRowToBaseRowResultSet.java:225)
        at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(ProjectRestrictResultSet.java:168)
        at org.apache.derby.impl.sql.execute.JoinResultSet.openRight(JoinResultSet.java:272)
        at org.apache.derby.impl.sql.execute.JoinResultSet.openCore(JoinResultSet.java:151)
        at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(ProjectRestrictResultSet.java:168)
        at org.apache.derby.impl.sql.execute.SortResultSet.openCore(SortResultSet.java:248)
        at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(ProjectRestrictResultSet.java:168)
        at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(BasicNoPutResultSetImpl.java:248)
        at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:370)
        at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1225)
        at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(EmbedPreparedStatement.java:1649)
        at org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(EmbedPreparedStatement.java:1304)
        at org.apache.derby.impl.drda.DRDAStatement.execute(DRDAStatement.java:666)
        at org.apache.derby.impl.drda.DRDAConnThread.processCommands(DRDAConnThread.java:824)
        at org.apache.derby.impl.drda.DRDAConnThread.run(DRDAConnThread.java:275)
Caused by: java.lang.NullPointerException
        at org.apache.derby.impl.sql.execute.BaseActivation.getColumnFromRow(BaseActivation.java:1317)
        at org.apache.derby.exe.ac601a400fx0115x15fbx3163xffff9ef86e6e1.e7(Unknown Source)
        at org.apache.derby.impl.services.reflect.DirectCall.invoke(ReflectGeneratedClass.java:153)
        ... 16 more
============= begin nested exception, level (1) ===========
java.lang.NullPointerException
        at org.apache.derby.impl.sql.execute.BaseActivation.getColumnFromRow(BaseActivation.java:1317)
        at org.apache.derby.exe.ac601a400fx0115x15fbx3163xffff9ef86e6e1.e7(Unknown Source)
        at org.apache.derby.impl.services.reflect.DirectCall.invoke(ReflectGeneratedClass.java:153)
        at org.apache.derby.impl.sql.execute.TableScanResultSet.openCore(TableScanResultSet.java:258)
        at org.apache.derby.impl.sql.execute.IndexRowToBaseRowResultSet.openCore(IndexRowToBaseRowResultSet.java:225)
        at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(ProjectRestrictResultSet.java:168)
        at org.apache.derby.impl.sql.execute.JoinResultSet.openRight(JoinResultSet.java:272)
        at org.apache.derby.impl.sql.execute.JoinResultSet.openCore(JoinResultSet.java:151)
        at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(ProjectRestrictResultSet.java:168)
        at org.apache.derby.impl.sql.execute.SortResultSet.openCore(SortResultSet.java:248)
        at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(ProjectRestrictResultSet.java:168)
        at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(BasicNoPutResultSetImpl.java:248)
        at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:370)
        at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1225)
        at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(EmbedPreparedStatement.java:1649)
        at org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(EmbedPreparedStatement.java:1304)
        at org.apache.derby.impl.drda.DRDAStatement.execute(DRDAStatement.java:666)
        at org.apache.derby.impl.drda.DRDAConnThread.processCommands(DRDAConnThread.java:824)
        at org.apache.derby.impl.drda.DRDAConnThread.run(DRDAConnThread.java:275)


> select query results in nullpointer exception in skipScan()
> -----------------------------------------------------------
>
>                 Key: DERBY-3033
>                 URL: https://issues.apache.org/jira/browse/DERBY-3033
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.2.2.0
>         Environment: Windows XP, Java 5.0, JDBC, Derby 10.2.2.0
>            Reporter: Haolan Qin
>         Attachments: bug4736.sql, d3033-sane-ij-session-10.3.1.5.txt, query_plan.new,
query_plan.old, test.rar, test.zip, viewer_10_1.zip
>
>
> The following error was repeatedly thrown when we tried to run a select query via JDBC.
Strangely, the exact same select query did not trigger any error when run from the command
line console. After we added an index, the error went away completely. 
> java.lang.NullPointerException
>  at org.apache.derby.impl.sql.execute.NoPutResultSetImpl.skipScan(Unknown Source)
>  at org.apache.derby.impl.sql.execute.TableScanResultSet.openCore(Unknown Source)
>  at org.apache.derby.impl.sql.execute.IndexRowToBaseRowResultSet.openCore(Unknown Source)
>  at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(Unknown Source)
>  at org.apache.derby.impl.sql.execute.JoinResultSet.openRight(Unknown Source)
>  at org.apache.derby.impl.sql.execute.JoinResultSet.openCore(Unknown Source)
>  at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(Unknown Source)
>  at org.apache.derby.impl.sql.execute.SortResultSet.openCore(Unknown Source)
>  at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(Unknown Source)
>  at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(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)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message