You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Bryan Pendleton (JIRA)" <de...@db.apache.org> on 2006/10/15 17:43:36 UTC

[jira] Resolved: (DERBY-630) create trigger fails with null pointer exception

     [ http://issues.apache.org/jira/browse/DERBY-630?page=all ]

Bryan Pendleton resolved DERBY-630.
-----------------------------------

    Fix Version/s: 10.3.0.0
       Resolution: Fixed
       Derby Info:   (was: [Patch Available])

Thanks Yip and Deepa for the info on the upgrade testing infrastructure. I think
everything is good to go here, so I committed patch diff02 to subversion as
revision 464215.

Thanks Yip for all the patches and explanations. Can you verify that the fix looks
good and close this issue? 

Also, you made a comment about needing to file a follow-on issue to track the
improvement of the statement cache mechanism to avoid unnecessary
statement compilation. Did that follow-on issue get filed? If so, it would be
nice to link that issue to this one.

> create trigger fails with null pointer exception
> ------------------------------------------------
>
>                 Key: DERBY-630
>                 URL: http://issues.apache.org/jira/browse/DERBY-630
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.1.1.0
>         Environment: windows 2000, sun jdk 1.5.0
>            Reporter: mardacay
>         Assigned To: Yip Ng
>             Fix For: 10.3.0.0
>
>         Attachments: derby630-trunk-diff01.txt, derby630-trunk-diff02.txt, derby630-trunk-stat01.txt, derby630-trunk-stat02.txt
>
>
> When i create a brand new database, and execute the following statements all in one transaction or each of them in their own transaction, then it fails at trigger creation with null pointer exception. if i exclude the schema names from statement, then it runs fine. (If S1 is ommited from every statement then it runs fine). Once the version without the schema names run fine, i can run the version that has schema names, fine also. 
> create schema S1;
> create table
>   S1.PRODUCT(
>     PRODUCT_ID VARCHAR(255) unique not null,
>     VERSION BIGINT
>   );
>   
> create table
>   S1.CATEGORY(
>     CAT_ID VARCHAR(255),
>     NAME varchar(255) not null,
>     VERSION BIGINT
>   );
> create table
>   S1.PROD_IN_CAT(
>     CAT_ID VARCHAR(255) not null,
>     PRODUCT_ID VARCHAR(255) not null,
>     VERSION BIGINT
>   );
>   
> create trigger S1.product_v 
> after update of version on S1.product
> referencing new as n
> for each row
> mode db2sql
> 	update S1.prod_in_cat set version = n.version where S1.prod_in_cat.product_id=n.product_id;
> java.lang.NullPointerException
> 	at org.apache.derby.impl.sql.catalog.SYSSTATEMENTSRowFactory.makeSYSSTATEMENTSrow(Unknown Source)
> 	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addSPSDescriptor(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.CreateTriggerConstantAction.createSPS(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.CreateTriggerConstantAction.executeConstantAction(Unknown Source)Stopping progress indicator for: Executing SQL
> 	at org.apache.derby.impl.sql.execute.MiscResultSet.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.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira