Peter Nabbefeld schrieb:
[EMAIL PROTECTED] schrieb:
Peter Nabbefeld <[EMAIL PROTECTED]> 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, [...]
Just some thoughts (without knowing the source):
- Table creation isn't affected by the issue, while trigger creation is,
so both seem to get the oid from different algorithms.
- I guess, that the original implementation used the oid from the
default schema, while it has been changed later to be stored into and
used from the system tables.
- Thus, it would probably help to (1) add a method like "getOID()" to
the "UserObject" (don't know the class name used in derby, but there
should be an object representing the user); (2) use this method instead
of a direct access to schema or system tables.
Just a guess, just because it seems to already take some time to fix the
bug. From my point of view, it should be easy for a derby developer to
fix this (but probably that is the cause for it to still exist ;-) ).
Kind regards
Peter Nabbefeld