db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Nabbefeld <Peter.Nabbef...@gmx.de>
Subject Re: NullPointerException in derby
Date Mon, 06 Jun 2005 17:04:44 GMT
Dyre.Tjeldvoll@Sun.COM schrieb:

> Peter Nabbefeld <Peter.Nabbefeld@gmx.de> writes:
> 
> 
>>Hello,
>>
>>I've got the following NPE:
>>
>>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)
>>         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)
>>	...
>>
>>My SQL statement is:
>>CREATE TRIGGER APPBUT_USER.EMRSZDEL AFTER DELETE ON
>>APPBUT_USER.EMPLOYERS FOR EACH STATEMENT MODE DB2SQL
>>VALUES(APPBUT_USER.TRIGGER_RESIZE('APPBUT_USER','EMPLOYERS'))
>>
>>Could anybody please tell me, what's wrong with that? I'm using derby
>>10.0.2.2.
> 
> 
> Looks like you are experiencing
> http://issues.apache.org/jira/browse/DERBY-85
> 

Yes, this seems to be the problem - the issue describes exactly, what I 
did :-(


> I don't think this has been fixed yet, but if this is your problem you
> can work around it by having a non-empty table in the default
> schema. 
> 
> <details>
> Looks like the oid for the default schema is null until a row is
> inserted in a table in the default schema. This oid is referenced when
> creating a trigger, even if that trigger doesn't touch the default schema
> </details>
> 
> At least that worked for me when trying the example in
> DERBY-85:
> 
> s.execute("create table itko.t1 (i int)");
> // Workaround   
> s.execute("create table def (i int)");
> s.execute("insert into def values (0), (1), (2)");
> 
> // Example from DERBY-85
> s.execute("create trigger ikto.trig1 after update on itko.t1 for each row mode db2sql
select * from sys.systables");
> 
> [snip]
> 

That's bad - it means, that I've to manage data, which I don't need. Any 
idea, when this bug will be fixed?

Kind regards

Peter Nabbefeld


Mime
View raw message