[
https://issues.apache.org/jira/browse/DERBY-3033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12523951
]
Dag H. Wanvik commented on DERBY-3033:
--------------------------------------
More data points:
- happens with embedded driver as well
- happens when database is running in soft upgrade to 10.3
- happens in 10.3 after hard upgrade
- happens when using ij/embedded with prepared statement thus:
ij> connect 'jdbc:derby:viewer;user=view;password=view';
ij> set schema viewer;
ij> prepare foo as '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';
ij> execute foo using 'values (4,4,100)';
ERROR XJ001: Java exception: ': java.lang.NullPointerException'
Without prepared statement (direct execution) there is no error.
I will leave this one the the execution experts ;-)
> 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: test.rar
>
>
> 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.