[
https://issues.apache.org/jira/browse/DERBY-6735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14131260#comment-14131260
]
Thomas Meyer commented on DERBY-6735:
-------------------------------------
Hi,
this is what I found in the log file, along with the SQL statement that
produces the NPE:
Thu Sep 11 15:28:57 CEST 2014 Thread[DRDAConnThread_2,5,main] (XID = 9194075),
(SESSIONID = 7), (DATABASE = db001), (DRDAID =
????????.????-4255618762446274492{4}), Cleanup action starting
Thu Sep 11 15:28:57 CEST 2014 Thread[DRDAConnThread_2,5,main] (XID = 9194075),
(SESSIONID = 7), (DATABASE = db001), (DRDAID =
????????.????-4255618762446274492{4}), Failed Statement is: select
row_number() over () as row_no,
(select
case when k1.FLAG_ZINS_KOMP is not null and k1.FLAG_SAMMEL_LIMIT is
not null then 'ZK/SL'
when k1.FLAG_ZINS_KOMP is not null then 'ZK'
when k1.FLAG_SAMMEL_LIMIT is not null then 'SL'
else null
end as mcm_type
from MIG.MCM_SL_ZK k1
where 1 = 1
and k1.BUSI_CONTR_KEY = d.contract_key
) as mcm_type1,
(select
case when a.branch_no is not null then 'CPE'
else null
end as mcm_type
from MIG.CPEKTO a
where 1 = 1
and a.branch_no = d.branch_no
and a.account_no_root = d.account_no_root
and a.account_no_sub = d.account_no_sub
) as mcm_type2,
d.*
from mig.multi_mdn c
join MIG.MAP_RESULT_HISTORY d
on c.fil = d.branch_no
and c.kdn = d.account_no_root
where 1 = 1
and exists (
select name, count(*)
from mig.multi_mdn a
where a.name = c.name
group by name
having count(*) > 1
)
and (exists
(select 1
from MIG.MCM_SL_ZK k1
where 1 = 1
and k1.BUSI_CONTR_KEY = d.contract_key
)
or exists
(select 1
from MIG.CPEKTO a
where 1 = 1
and a.branch_no = d.branch_no
and a.account_no_root = d.account_no_root
and a.account_no_sub = d.account_no_sub
)
)
java.lang.NullPointerException
at
org.apache.derby.impl.sql.compile.BinaryRelationalOperatorNode.generateExpressionOperand(Unknown
Source)
at
org.apache.derby.impl.sql.compile.Predicate.generateExpressionOperand(Unknown
Source)
at
org.apache.derby.impl.sql.compile.PredicateList.generateSetColumn(Unknown
Source)
at
org.apache.derby.impl.sql.compile.PredicateList.generateStartKey(Unknown Source)
at
org.apache.derby.impl.sql.compile.BaseJoinStrategy.fillInScanArgs1(Unknown
Source)
at
org.apache.derby.impl.sql.compile.NestedLoopJoinStrategy.getScanArgs(Unknown
Source)
at
org.apache.derby.impl.sql.compile.FromBaseTable.getScanArguments(Unknown Source)
at
org.apache.derby.impl.sql.compile.FromBaseTable.generateResultSet(Unknown
Source)
at org.apache.derby.impl.sql.compile.FromBaseTable.generate(Unknown
Source)
at
org.apache.derby.impl.sql.compile.IndexToBaseRowNode.generate(Unknown Source)
at
org.apache.derby.impl.sql.compile.ProjectRestrictNode.generateMinion(Unknown
Source)
at
org.apache.derby.impl.sql.compile.ProjectRestrictNode.generate(Unknown Source)
at
org.apache.derby.impl.sql.compile.ProjectRestrictNode.generateMinion(Unknown
Source)
at
org.apache.derby.impl.sql.compile.ProjectRestrictNode.generate(Unknown Source)
at
org.apache.derby.impl.sql.compile.SubqueryNode.generateExpression(Unknown
Source)
at
org.apache.derby.impl.sql.compile.ResultColumn.generateExpression(Unknown
Source)
at
org.apache.derby.impl.sql.compile.ResultColumnList.generateEvaluatedRow(Unknown
Source)
at
org.apache.derby.impl.sql.compile.ResultColumnList.generateCore(Unknown Source)
at
org.apache.derby.impl.sql.compile.ProjectRestrictNode.generateMinion(Unknown
Source)
at
org.apache.derby.impl.sql.compile.ProjectRestrictNode.generate(Unknown Source)
at
org.apache.derby.impl.sql.compile.ScrollInsensitiveResultSetNode.generate(Unknown
Source)
at org.apache.derby.impl.sql.compile.CursorNode.generate(Unknown Source)
at org.apache.derby.impl.sql.compile.StatementNode.generate(Unknown
Source)
at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
at
org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement42.<init>(Unknown
Source)
at org.apache.derby.jdbc.Driver42.newEmbedPreparedStatement(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown
Source)
at org.apache.derby.impl.drda.DRDAStatement.prepare(Unknown Source)
at org.apache.derby.impl.drda.DRDAStatement.explicitPrepare(Unknown
Source)
at org.apache.derby.impl.drda.DRDAConnThread.parsePRPSQLSTT(Unknown
Source)
at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown
Source)
at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
Cleanup action completed
> NPE in org.apache.derby.client.am.ClientStatement.completeSqlca
> ---------------------------------------------------------------
>
> Key: DERBY-6735
> URL: https://issues.apache.org/jira/browse/DERBY-6735
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.11.1.1
> Environment: Windows 7 64Bit, Java8_20 64Bit
> Reporter: Thomas Meyer
>
> When using row_number() over() in an SQL I get this exception:
> ERROR XJ001: DERBY SQL error: ERRORCODE: 0, SQLSTATE: XJ001, SQLERRMC:
> java.lang.NullPointerException¶¶XJ001.U
> java.sql.SQLException: DERBY SQL error: ERRORCODE: 0, SQLSTATE: XJ001,
> SQLERRMC: java.lang.NullPointerException¶¶XJ001.U
> 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.ClientStatement.execute(Unknown Source)
> at org.apache.derby.impl.tools.ij.ij.executeImmediate(Unknown Source)
> at org.apache.derby.impl.tools.ij.utilMain.doCatch(Unknown Source)
> at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown
> Source)
> at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
> at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
> at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
> at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)
> at org.apache.derby.tools.ij.main(Unknown Source)
> Caused by: ERROR XJ001: DERBY SQL error: ERRORCODE: 0, SQLSTATE: XJ001,
> SQLERRMC: java.lang.NullPointerException¶¶XJ001.U
> at org.apache.derby.client.am.ClientStatement.completeSqlca(Unknown
> Source)
> at
> org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown
> Source)
> at
> org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown
> Source)
> at
> org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown
> Source)
> at
> org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown
> Source)
> at
> org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown
> Source)
> at
> org.apache.derby.client.am.ClientStatement.readPrepareDescribeOutput(Unknown
> Source)
> at org.apache.derby.client.am.ClientStatement.flowExecute(Unknown
> Source)
> at org.apache.derby.client.am.ClientStatement.executeX(Unknown Source)
> ... 9 more
> ij>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)