db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4488) Nullpointer when performing INSERT INTO
Date Mon, 21 Dec 2009 07:52:18 GMT

    [ https://issues.apache.org/jira/browse/DERBY-4488?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12793105#action_12793105
] 

Knut Anders Hatlen commented on DERBY-4488:
-------------------------------------------

Looking at the log file, it seems like you saw the same (expected) error message twice. But
on the third execution it resulted in a NullPointerException. I also see this now:

ij> CREATE TABLE feed (fst INTEGER, snd VARCHAR(50), UNIQUE(fst));
0 rows inserted/updated/deleted
ij> INSERT INTO feed VALUES (1, 'fst');
1 row inserted/updated/deleted
ij> CREATE TABLE tbl (col1 INTEGER, col2 INTEGER NOT NULL REFERENCES feed (fst) ON DELETE
RESTRICT ON UPDATE RESTRICT);
0 rows inserted/updated/deleted
ij> prepare ps as 'INSERT INTO tbl(col1) SELECT 1 FROM feed';
ij> execute ps;
ERROR 23502: Column 'COL2'  cannot accept a NULL value.
ij> execute ps;
ERROR 23502: Column 'COL2'  cannot accept a NULL value.
ij> execute ps;
ERROR XJ001: Java exception: ': java.lang.NullPointerException'.

> Nullpointer when performing INSERT INTO
> ---------------------------------------
>
>                 Key: DERBY-4488
>                 URL: https://issues.apache.org/jira/browse/DERBY-4488
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.5.3.0
>            Reporter: Huib
>         Attachments: debug info.txt
>
>
> To replicate, execute the following 4 queries:
> CREATE TABLE feed (fst INTEGER, snd VARCHAR(50), UNIQUE(fst))
> INSERT INTO feed VALUES (1, 'fst')
> CREATE TABLE tbl (col1 INTEGER, col2 INTEGER NOT NULL REFERENCES feed (fst) ON DELETE
RESTRICT ON UPDATE RESTRICT)
> INSERT INTO tbl(col1) SELECT 1 FROM feed
> The result of the last INSERT INTO query is:
> java.lang.NullPointerException
> 	at org.apache.derby.impl.store.access.btree.BTreeScan.initScanParams(Unknown Source)
> 	at org.apache.derby.impl.store.access.btree.BTreeScan.reopenScan(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.TableScanResultSet.reopenScanController(Unknown
Source)
> 	at org.apache.derby.impl.sql.execute.TableScanResultSet.reopenScanController(Unknown
Source)
> 	at org.apache.derby.impl.sql.execute.TableScanResultSet.reopenCore(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.BulkTableScanResultSet.reopenCore(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.reopenCore(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.NormalizeResultSet.reopenCore(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.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)

-- 
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