This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 119236 - UPGRADE: Constraint violation running RickshawPublishAPIUpgrade
UPGRADE: Constraint violation running RickshawPublishAPIUpgrade
Status: CLOSED NOTABUG
Product: Red Hat Enterprise CMS
Classification: Retired
Component: other (Show other bugs)
nightly
All Linux
medium Severity medium
: ---
: ---
Assigned To: Archit Shah
Jon Orris
:
Depends On:
Blocks: 113496
  Show dependency treegraph
 
Reported: 2004-03-26 16:56 EST by Jon Orris
Modified: 2007-04-18 13:04 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-03-29 12:24:53 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Log with persistence debugging (128.16 KB, text/plain)
2004-03-26 18:01 EST, Jon Orris
no flags Details

  None (edit)
Description Jon Orris 2004-03-26 16:56:30 EST
Description of problem:
@41832/postgres

With the latest changes to upgrade, the publishing API upgrade no
longer completes. A constraint error occurs between cms_items and
ca_file_attachments.


ltiPartArticleInitializer (13 out of 14)
2004-03-26 16:42:13,141 [ main] INFO  runtime.Startup - Running Legacy
Init for class com.arsdigita.cms.formbuilder.FormItemInitializer (14
out of 14)
2004-03-26 16:42:13,163 [ main] INFO  runtime.Startup - Initialization
complete
2004-03-26 16:42:17,375 [ main] ERROR rdbms.RDBMSEngine - delete from
cms_items
where cms_items.item_id = ?
java.sql.SQLException: ERROR:  ct_ite_fil_atta_own_id_f_28vk4
referential integrity violation - key in cms_items still referenced
from ca_file_attachments
 
        at
org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:142)
        at
org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:505)
        at
org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1Statement.java:320)
        at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:48)
        at
com.redhat.persistence.engine.rdbms.RDBMSEngine.execute(RDBMSEngine.java:489)
        at
com.redhat.persistence.engine.rdbms.RDBMSEngine.execute(RDBMSEngine.java:431)
        at
com.redhat.persistence.engine.rdbms.RDBMSEngine.flush(RDBMSEngine.java:395)
        at com.redhat.persistence.Session.flushInternal(Session.java:703)
        at com.redhat.persistence.Session.flush(Session.java:648)
        at com.redhat.persistence.Cursor.next(Cursor.java:114)
        at
com.arsdigita.persistence.DataQueryImpl.next(DataQueryImpl.java:646)
        at
com.arsdigita.cms.ContentBundle.getInstance(ContentBundle.java:296)
        at
com.arsdigita.cms.ContentBundle.getPrimaryInstance(ContentBundle.java:256)
        at
com.arsdigita.cms.ContentBundle.beforeSave(ContentBundle.java:508)
        at
com.arsdigita.domain.DomainObject$SaveObserver.beforeSave(DomainObject.java:601)
        at
com.arsdigita.persistence.BeforeSaveEvent.doInvoke(DataEvent.java:187)
        at com.arsdigita.persistence.DataEvent.invoke(DataEvent.java:39)
        at
com.arsdigita.persistence.DataObjectImpl.fireObserver(DataObjectImpl.java:514)
        at com.arsdigita.persistence.DataEvent.fire(DataEvent.java:48)
        at
com.arsdigita.persistence.Session$FlushEventProcessor.flush(Session.java:684)
        at com.redhat.persistence.Session.flushInternal(Session.java:683)
        at com.redhat.persistence.Session.flush(Session.java:648)
        at
com.arsdigita.persistence.DataObjectImpl.delete(DataObjectImpl.java:391)
        at com.arsdigita.domain.DomainObject.delete(DomainObject.java:324)
        at com.arsdigita.cms.ContentItem.setLive(ContentItem.java:1102)
        at com.arsdigita.cms.ContentItem.unpublish(ContentItem.java:1208)
        at
com.arsdigita.cms.RickshawPublishAPIUpgrade.unpublishLiveItems(RickshawPublishAPIUpgrade.java:321)
        at
com.arsdigita.cms.RickshawPublishAPIUpgrade.doStartup(RickshawPublishAPIUpgrade.java:159)
        at
com.arsdigita.cms.RickshawPublishAPIUpgrade.main(RickshawPublishAPIUpgrade.java:203)
2004-03-26 16:42:17,382 [ main] ERROR rdbms.RDBMSEngine - [24018]
2004-03-26 16:42:17,383 [ main] ERROR rdbms.RDBMSEngine - [INTEGER]
2004-03-26 16:42:17,384 [ main] ERROR rdbms.RDBMSEngine -
{__key__.id=24018}
Exception in thread "main"
com.arsdigita.persistence.PersistenceException (root cause:
com.redhat.persistence.engine.rdbms.RDBMSEngine$4: ERROR: 
ct_ite_fil_atta_own_id_f_28vk4 referential integrity violation - key
in cms_items still referenced from ca_file_attachments
)
        at
com.arsdigita.persistence.PersistenceException.newInstance(PersistenceException.java:100)
        at
com.arsdigita.persistence.PersistenceException.newInstance(PersistenceException.java:86)
        at
com.arsdigita.persistence.DataQueryImpl.next(DataQueryImpl.java:648)
        at
com.arsdigita.cms.ContentBundle.getInstance(ContentBundle.java:296)
        at
com.arsdigita.cms.ContentBundle.getPrimaryInstance(ContentBundle.java:256)
        at
com.arsdigita.cms.ContentBundle.beforeSave(ContentBundle.java:508)
        at
com.arsdigita.domain.DomainObject$SaveObserver.beforeSave(DomainObject.java:601)
        at
com.arsdigita.persistence.BeforeSaveEvent.doInvoke(DataEvent.java:187)
        at com.arsdigita.persistence.DataEvent.invoke(DataEvent.java:39)
        at
com.arsdigita.persistence.DataObjectImpl.fireObserver(DataObjectImpl.java:514)
        at com.arsdigita.persistence.DataEvent.fire(DataEvent.java:48)
        at
com.arsdigita.persistence.Session$FlushEventProcessor.flush(Session.java:684)
        at com.redhat.persistence.Session.flushInternal(Session.java:683)
        at com.redhat.persistence.Session.flush(Session.java:648)
        at
com.arsdigita.persistence.DataObjectImpl.delete(DataObjectImpl.java:391)
        at com.arsdigita.domain.DomainObject.delete(DomainObject.java:324)
        at com.arsdigita.cms.ContentItem.setLive(ContentItem.java:1102)
        at com.arsdigita.cms.ContentItem.unpublish(ContentItem.java:1208)
        at
com.arsdigita.cms.RickshawPublishAPIUpgrade.unpublishLiveItems(RickshawPublishAPIUpgrade.java:321)
        at
com.arsdigita.cms.RickshawPublishAPIUpgrade.doStartup(RickshawPublishAPIUpgrade.java:159)
        at
com.arsdigita.cms.RickshawPublishAPIUpgrade.main(RickshawPublishAPIUpgrade.java:203)
Root cause:
com.redhat.persistence.engine.rdbms.RDBMSEngine$4: ERROR: 
ct_ite_fil_atta_own_id_f_28vk4 referential integrity violation - key
in cms_items still referenced from ca_file_attachments
 
        at
com.redhat.persistence.engine.rdbms.RDBMSEngine.execute(RDBMSEngine.java:517)
        at
com.redhat.persistence.engine.rdbms.RDBMSEngine.execute(RDBMSEngine.java:431)
        at
com.redhat.persistence.engine.rdbms.RDBMSEngine.flush(RDBMSEngine.java:395)
        at com.redhat.persistence.Session.flushInternal(Session.java:703)
        at com.redhat.persistence.Session.flush(Session.java:648)
        at com.redhat.persistence.Cursor.next(Cursor.java:114)
        at
com.arsdigita.persistence.DataQueryImpl.next(DataQueryImpl.java:646)
        at
com.arsdigita.cms.ContentBundle.getInstance(ContentBundle.java:296)
        at
com.arsdigita.cms.ContentBundle.getPrimaryInstance(ContentBundle.java:256)
        at
com.arsdigita.cms.ContentBundle.beforeSave(ContentBundle.java:508)
        at
com.arsdigita.domain.DomainObject$SaveObserver.beforeSave(DomainObject.java:601)
        at
com.arsdigita.persistence.BeforeSaveEvent.doInvoke(DataEvent.java:187)
        at com.arsdigita.persistence.DataEvent.invoke(DataEvent.java:39)
        at
com.arsdigita.persistence.DataObjectImpl.fireObserver(DataObjectImpl.java:514)
        at com.arsdigita.persistence.DataEvent.fire(DataEvent.java:48)
        at
com.arsdigita.persistence.Session$FlushEventProcessor.flush(Session.java:684)
        at com.redhat.persistence.Session.flushInternal(Session.java:683)
        at com.redhat.persistence.Session.flush(Session.java:648)
        at
com.arsdigita.persistence.DataObjectImpl.delete(DataObjectImpl.java:391)
        at com.arsdigita.domain.DomainObject.delete(DomainObject.java:324)
        at com.arsdigita.cms.ContentItem.setLive(ContentItem.java:1102)
        at com.arsdigita.cms.ContentItem.unpublish(ContentItem.java:1208)
        at
com.arsdigita.cms.RickshawPublishAPIUpgrade.unpublishLiveItems(RickshawPublishAPIUpgrade.java:321)
        at
com.arsdigita.cms.RickshawPublishAPIUpgrade.doStartup(RickshawPublishAPIUpgrade.java:159)
        at
com.arsdigita.cms.RickshawPublishAPIUpgrade.main(RickshawPublishAPIUpgrade.java:203)
Root cause: com.redhat.persistence.engine.rdbms.RDBMSEngine$4: ERROR:
 ct_ite_fil_atta_own_id_f_28vk4 referential integrity violation - key
in cms_items still referenced from ca_file_attachments
 
        at
com.redhat.persistence.engine.rdbms.RDBMSEngine.execute(RDBMSEngine.java:517)
        at
com.redhat.persistence.engine.rdbms.RDBMSEngine.execute(RDBMSEngine.java:431)
        at
com.redhat.persistence.engine.rdbms.RDBMSEngine.flush(RDBMSEngine.java:395)
        at com.redhat.persistence.Session.flushInternal(Session.java:703)
        at com.redhat.persistence.Session.flush(Session.java:648)
        at com.redhat.persistence.Cursor.next(Cursor.java:114)
        at
com.arsdigita.persistence.DataQueryImpl.next(DataQueryImpl.java:646)
        at
com.arsdigita.cms.ContentBundle.getInstance(ContentBundle.java:296)
        at
com.arsdigita.cms.ContentBundle.getPrimaryInstance(ContentBundle.java:256)
        at
com.arsdigita.cms.ContentBundle.beforeSave(ContentBundle.java:508)
        at
com.arsdigita.domain.DomainObject$SaveObserver.beforeSave(DomainObject.java:601)
        at
com.arsdigita.persistence.BeforeSaveEvent.doInvoke(DataEvent.java:187)
        at com.arsdigita.persistence.DataEvent.invoke(DataEvent.java:39)
        at
com.arsdigita.persistence.DataObjectImpl.fireObserver(DataObjectImpl.java:514)
        at com.arsdigita.persistence.DataEvent.fire(DataEvent.java:48)
        at
com.arsdigita.persistence.Session$FlushEventProcessor.flush(Session.java:684)
        at com.redhat.persistence.Session.flushInternal(Session.java:683)
        at com.redhat.persistence.Session.flush(Session.java:648)
        at
com.arsdigita.persistence.DataObjectImpl.delete(DataObjectImpl.java:391)
        at com.arsdigita.domain.DomainObject.delete(DomainObject.java:324)
        at com.arsdigita.cms.ContentItem.setLive(ContentItem.java:1102)
        at com.arsdigita.cms.ContentItem.unpublish(ContentItem.java:1208)
        at
com.arsdigita.cms.RickshawPublishAPIUpgrade.unpublishLiveItems(RickshawPublishAPIUpgrade.java:321)
        at
com.arsdigita.cms.RickshawPublishAPIUpgrade.doStartup(RickshawPublishAPIUpgrade.java:159)
        at
com.arsdigita.cms.RickshawPublishAPIUpgrade.main(RickshawPublishAPIUpgrade.java:203)
Comment 1 Jon Orris 2004-03-26 17:13:56 EST
Debug info from upgrade code so we know which item is barfing.

publishing API content upgrade...
2004-03-26 17:12:38,425 [ main] INFO  cms.RickshawPublishAPIUpgrade -
Starting publishing API content upgrade
2004-03-26 17:12:38,438 [ main] INFO  cms.RickshawPublishAPIUpgrade -
Unpublishing pending items
2004-03-26 17:12:38,485 [ main] DEBUG cms.RickshawPublishAPIUpgrade -
Publish API upgrade: transaction commit
2004-03-26 17:12:38,498 [ main] INFO  cms.RickshawPublishAPIUpgrade -
Unpublishing live items
2004-03-26 17:12:38,604 [ main] DEBUG cms.RickshawPublishAPIUpgrade -
Unpublishing live item: draft ID=28006, live ID=28018,
name=upgrade-item-two, lifecycle ID=28016
2004-03-26 17:12:41,690 [ main] DEBUG cms.RickshawPublishAPIUpgrade -
Unpublishing live item: draft ID=18014, live ID=24018, name=first,
lifecycle ID=24016
Comment 2 Jon Orris 2004-03-26 18:01:06 EST
Created attachment 98894 [details]
Log with persistence debugging

Log of ccm-run com.arsdigita.cms.RickshawPublishAPIUpgrade with persistence
logging turned up
Comment 3 Jon Orris 2004-03-26 18:03:06 EST
Justin though it could be the denorm triggers causing unexpected evil.
Wasn't them. Re-assigning to Archit to take a look.

Worked yesterday as of 41798. Going to try reverting to that point &
see what the difference is.
Comment 4 Jon Orris 2004-03-26 18:40:40 EST
Naturally, reverting to that point and doing everything I did
yesterday fails to fix the problem.

Possibly I need to go back a changelist or two, just in case I'd
synced & failed to deploy fully. Other than that, I'm going to wait
for archit or rafi to look at the log.
Comment 5 Jon Orris 2004-03-29 11:25:59 EST
Verified on the tip (41844) with the simplest case:
Article containing nothing but a file attachment & published.
Comment 6 Jon Orris 2004-03-29 12:24:53 EST
Ugh. This is a minor bug in the upgrade release notes.
It was missing ccm-cms-assets-fileattachment in step 1.

Comment 7 Richard Li 2004-03-29 12:41:12 EST
docs fixed @41867

Note You need to log in before you can comment on or make changes to this bug.