Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 36288 invoked from network); 17 Oct 2005 05:37:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 17 Oct 2005 05:37:08 -0000 Received: (qmail 12218 invoked by uid 500); 17 Oct 2005 05:37:07 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 12198 invoked by uid 500); 17 Oct 2005 05:37:06 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 12189 invoked by uid 99); 17 Oct 2005 05:37:06 -0000 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 16 Oct 2005 22:37:06 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 81DE2237 for ; Mon, 17 Oct 2005 07:36:45 +0200 (CEST) Message-ID: <238468767.1129527405530.JavaMail.jira@ajax.apache.org> Date: Mon, 17 Oct 2005 07:36:45 +0200 (CEST) From: "Mamta A. Satoor (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-630) create trigger fails with null pointer exception In-Reply-To: <1917665868.1129497645522.JavaMail.jira@ajax.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-630?page=comments#action_12332185 ] Mamta A. Satoor commented on DERBY-630: --------------------------------------- This looks like duplicate of bug (DERBY-85) NPE when creating a trigger on a table and default schema doesn't exist. If that is correct, we should mark this bug as duplicate. > create trigger fails with null pointer exception > ------------------------------------------------ > > Key: DERBY-630 > URL: http://issues.apache.org/jira/browse/DERBY-630 > Project: Derby > Type: Bug > Components: SQL > Versions: 10.1.1.0 > Environment: windows 2000, sun jdk 1.5.0 > Reporter: mardacay > > 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