You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Willie Vu <ct...@ust.hk> on 2003/05/05 04:03:52 UTC

J2EEStore exception in removeRevisionDescriptors

I am trying to port J2EEStore to Sybase.  I keep running into this problem upon
JBoss startup.

org.apache.slide.store.impl.rdbms.J2EEStore@10bc995 access error : Dependent
foreign key constraint violation in a referential integrity constraint. dbname =
'time', table name = 'SLIDE_REVISION_HISTORY', constraint name =
'SLIDE_REVI_URI_ID_836194998'.
 	at
org.apache.slide.store.impl.rdbms.StandardRDBMSAdapter.removeRevisionDescriptors

The problem is caused by that fact that SLIDE_REVISION's URI_ID has a foreign
key reference to SLIDE_REVISION_HISTORY's URI_ID.  Since no records from
SLIDE_REVISION are deleted, referential integrity is violated when
SLIDE_REVISION_HISTORY records are deleted.

My questions are, 

1. why not all the SLIDE_REVISION records for the URI deleted at all in
removeRevisionDescriptors?
2. what is the correct way to resolve the above problem?


--
Willie Vu


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


RE: J2EEStore exception in removeRevisionDescriptors

Posted by Grant Gongaware <gg...@itensil.com>.
Willie-

I had the same problem porting to MySQL w/InnoDB (which enforces the
foreign keys). I need to modify the RDBMS adapter to delete all the
revision related rows in a constraint safe order. The functions I
overloaded might work directly with Sybase as well.

Here's my adapter. Feel free to change the package.

Note: the other functions I overloaded just switch the 'true'/'false'
literals to 1/0 since MySQL doesn't support those.

-Grant

-----Original Message-----
From: Willie Vu [mailto:ctwillie@ust.hk] 
Sent: Sunday, May 04, 2003 7:04 PM
To: slide-user@jakarta.apache.org
Subject: J2EEStore exception in removeRevisionDescriptors

I am trying to port J2EEStore to Sybase.  I keep running into this
problem upon
JBoss startup.

org.apache.slide.store.impl.rdbms.J2EEStore@10bc995 access error :
Dependent
foreign key constraint violation in a referential integrity constraint.
dbname =
'time', table name = 'SLIDE_REVISION_HISTORY', constraint name =
'SLIDE_REVI_URI_ID_836194998'.
 	at
org.apache.slide.store.impl.rdbms.StandardRDBMSAdapter.removeRevisionDes
criptors

The problem is caused by that fact that SLIDE_REVISION's URI_ID has a
foreign
key reference to SLIDE_REVISION_HISTORY's URI_ID.  Since no records from
SLIDE_REVISION are deleted, referential integrity is violated when
SLIDE_REVISION_HISTORY records are deleted.

My questions are, 

1. why not all the SLIDE_REVISION records for the URI deleted at all in
removeRevisionDescriptors?
2. what is the correct way to resolve the above problem?


--
Willie Vu


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org