Hello,
After recently upgrading from DSpace 1.5.1 to 1.7.1, we are getting the
following error whenever we try to delete an Item online:
2012-02-01 14:40:17,883 WARN org.dspace.app.webui.servlet.DSpaceServlet @
[email protected]:session_id=B6C011F3369B678E2FB9ED4B0050:ip_addr=999.99.99.999:database_error:org.postgresql.util.PSQLException\colon;
ERROR\colon; update or delete on table "item" violates foreign key constraint
"$2" on table "collection2item"
Detail\colon; Key (item_id)=(429349) is still referenced from table
"collection2item".
org.postgresql.util.PSQLException: ERROR: update or delete on table "item"
violates foreign key constraint "$2" on table "collection2item"
Detail: Key (item_id)=(429349) is still referenced from table
"collection2item".
I found some old dspace-tech postings regarding this error and am wondering if
the recommended fix is correct?
Not sure how this one happened: after upgrading to dspace 1.6, we're having
trouble deleting items from dspace. We get an error message explaining that
'update or delete on "item" violates foreign key constraint "$2" on
"collection2item"'. Describing collection2item yields:
Table "public.collection2item"
Column | Type | Modifiers
---------------+---------+-----------
id | integer | not null
collection_id | integer |
item_id | integer |
Indexes:
"collection2item_pkey" PRIMARY KEY, btree (id)
"collection2item_collection_idx" btree (collection_id)
"collection2item_item_id_idx" btree (item_id)
Foreign-key constraints:
"$1" FOREIGN KEY (collection_id) REFERENCES collection(collection_id)
"$2" FOREIGN KEY (item_id) REFERENCES item(item_id)
"coll2item_item_fk" FOREIGN KEY (item_id) REFERENCES item(item_id)
DEFERRABLE
I ran the database scheme update script, and it seems to have added the final,
deferrable foreign key constraint; but I can't find any reference at all to the
first two FKCs ($1 and $2). As far as I can tell, they aren't supposed to
exist at all; I assume they're left over from some previous version of dspace,
didn't get removed at some point in the past, and just never caused problems
until now. Can anybody confirm that I can go ahead and drop these constraints
(and similar constraints in Community2Collection?
Bill Anderson
Software Developer
Digital Library Development
Georgia Tech Library
Thanks in advance!
Sue
Sue Walker-Thornton
Software Developer/Database Administrator
NASA Langley Research Center - LITES Contract
[email protected]
(W) 757-864-2368
(M) 757-506-9903
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech