Thanks Kristian,

...and apologies for the lack of information. I knew as soon as I'd
posted that I should have said more about the environment...

My config is default AFAIK, with the exception that I have the error
logging set to 0. That said, I still get the OOME if I set error logging
back to the default 40k. I'm on XP Pro, running in a DOS shell. I invoke
IJ (10.2), then I "run create_db.sql" and it's towards the end of the
process that I get the OOME, after having created the tables, at the
point where I'm trying to create a load of FK constraints. 

I don't get a great deal of info in the derby.log file. Here are the
last few entries (I think the stack trace is actually related to the
problem with the PIN_FK8 constraint rather than the OOME) :

---------------------------------------------------

ERROR 42915: Foreign  Key 'PIN_FK8' is invalid because 'the delete rule
of foreign key  must be CASCADE. (The relationship would cause the table
to be delete-connected to the same table through multiple relationships
and such relationships must have the same delete rule (NO ACTION,
RESTRICT or CASCADE).) '. 
        at
org.apache.derby.iapi.error.StandardException.newException(Unknown
Source)
        at
org.apache.derby.iapi.sql.dictionary.DDUtils.generateError(Unknown
Source)
        at
org.apache.derby.iapi.sql.dictionary.DDUtils.checkForMultiplePathInvalid
Cases(Unknown Source)
        at
org.apache.derby.iapi.sql.dictionary.DDUtils.validateDeleteConnection(Un
known Source)
        at
org.apache.derby.iapi.sql.dictionary.DDUtils.validateDeleteConnection(Un
known Source)
        at
org.apache.derby.iapi.sql.dictionary.DDUtils.validateDeleteConnection(Un
known Source)
        at
org.apache.derby.iapi.sql.dictionary.DDUtils.validateReferentialActions(
Unknown Source)
        at
org.apache.derby.impl.sql.execute.CreateConstraintConstantAction.execute
ConstantAction(Unknown Source)
        at
org.apache.derby.impl.sql.execute.AlterTableConstantAction.execGuts(Unkn
own Source)
        at
org.apache.derby.impl.sql.execute.AlterTableConstantAction.executeConsta
ntAction(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)
        at org.apache.derby.impl.tools.ij.ij.executeImmediate(Unknown
Source)
        at org.apache.derby.impl.tools.ij.utilMain.doCatch(Unknown
Source)
        at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown
Source)
        at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
        at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
        at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
        at org.apache.derby.impl.tools.ij.Main14.main(Unknown Source)
        at org.apache.derby.tools.ij.main(Unknown Source)
Cleanup action completed
2007-08-14 14:00:50.978 GMT Thread[main,5,main] (XID = 9977), (SESSIONID
= 0), (DATABASE = chs), (DRDAID = null), Cleanup action starting
2007-08-14 14:00:50.978 GMT Thread[main,5,main] (XID = 9977), (SESSIONID
= 0), (DATABASE = chs), (DRDAID = null), 
Failed Statement is: ALTER TABLE logicproperty
  ADD CONSTRAINT r_186
  FOREIGN KEY
   ( zone_id )
  REFERENCES zone
  ON DELETE CASCADE
  
java.lang.OutOfMemoryError
Cleanup action completed

2007-08-14 14:00:57.087 GMT:
Shutting down instance c013800d-0114-64a7-80cd-000000100a28

----------------------------------------------------------------

BTW, it may be pertinent that the table it is working on at the time of
the OOME (that is, LOGICPROPERTY) is a poorly-constructed thing with
nearly 50 FK constraints. Unfortunately, we're stuck with it. I'll try
creating the schema without those constraints to see if I still get the
error...

HTH
Nick

Reply via email to