[ http://issues.apache.org/jira/browse/DERBY-630?page=all ] Susan Cline reopened DERBY-630: -------------------------------
DERBY-630 is listed as a duplicate of DERBY-85 and was marked fixed in release 10.1.3, however, I believe it is not a duplicate, and although DERBY-85 is fixed in 10.1.3, DERBY-630 is not. the test case for DERBY-85 consists of this: creates a table in the non-default schema creates a trigger in the default schema on a table in the non-default schema. the test case for DERBY-630 consists of this: creates a table in the non-default schema creates a trigger in the non-default schema on a table in the non-default schema Below is the output from the two test cases run against the 10.1.3 release, plus an additional one that shows creating a table in the default schema, then a trigger in the default schema on the table in the default schema does succeed. DERBY- 85: ij> connect 'jdbc:derby:firstDB;create=true;user=someUser;password=somePwd'; ij> create table itko.t1 (i int); 0 rows inserted/updated/deleted ij> create trigger trig1 after update on itko.t1 for each row mode db2sql select * from sys.systables; 0 rows inserted/updated/deleted DERBY-630 (simplified test case): ij> connect 'jdbc:derby:myDB;create=true;user=someUser;password=somePwd'; ij> create table itko.t1 (i int); 0 rows inserted/updated/deleted ij> create trigger itko.trig1 after update on itko.t1 for each row mode db2sql s elect * from sys.systables; ERROR XJ001: Java exception: ': java.lang.NullPointerException'. Test case showing creating everything in the default schema is OK: ij> connect 'jdbc:derby:newDB;create=true;user=someUser;password=somePwd'; ij> create table t1 (i int); 0 rows inserted/updated/deleted ij> create trigger trig1 after update on t1 for each row mode db2sql select * fr om sys.systables; 0 rows inserted/updated/deleted Sysinfo: java org.apache.derby.tools.sysinfo ------------------ Java Information ------------------ Java Version: 1.5.0_06 Java Vendor: Sun Microsystems Inc. Java home: C:\JDK\jdk1.5.0_06\jre Java classpath: derby.jar;.;derbytools.jar; OS name: Windows XP OS architecture: x86 OS version: 5.1 Java user name: slc Java user home: C:\Documents and Settings\Administrator Java user dir: C:\projects\gilles_tool\releases\Nov_refresh\installs\db-derby- 10.1.3.1-lib\lib java.specification.name: Java Platform API Specification java.specification.version: 1.5 --------- Derby Information -------- JRE - JDBC: J2SE 5.0 - JDBC 3.0 [C:\projects\gilles_tool\releases\Nov_refresh\installs\db-derby-10.1.3.1-lib\lib \derby.jar] 10.1.3.1 - (417277) [C:\projects\gilles_tool\releases\Nov_refresh\installs\db-derby-10.1.3.1-lib\lib \derbytools.jar] 10.1.3.1 - (417277) ------------------------------------------------------ ----------------- Locale Information ----------------- ------------------------------------------------------ > 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