Moving items ( 5000) from diffent collections under diffent communites to under
one community and diffent collections ?
-----------------------------------------------------------------------------------------------------------------------
Key: DS-865
URL: https://jira.duraspace.org/browse/DS-865
Project: DSpace
Issue Type: Task
Affects Versions: 1.6.2
Environment: Live
Reporter: Hafeez Qazi
Hello ,
this is my first post for DSPACE .
I am trying to Moving items ( 5000) from diffent collections under diffent
communites to under one community and diffent collections ?? what is the best
method to do this ?
i treid these two SQL scripts but now getting error for reindex
update item
set owning_collection=NewCollectionID
where item_id=ItemID;
update collection2item
set collection_id=new collection it
where collection_id= old collection;
once it run these two scripts i can see total number of items by title under
new collections
but can't see them under new community .
i tried to update this table communities2item , then its showing total number
of items under community as well as differnt collections but
when i am trying to reindexing getting this error message
./dspace index-update
Exception: org.postgresql.util.PSQLException: ERROR: duplicate key value
violates unique constraint "communities2item_pkey"
org.dspace.browse.BrowseException: org.postgresql.util.PSQLException: ERROR:
duplicate key value violates unique constraint "communities2item_pkey"
at
org.dspace.browse.BrowseCreateDAOPostgres.updateCommunityMappings(BrowseCreateDAOPostgres.java:661)
at org.dspace.browse.IndexBrowse.indexItem(IndexBrowse.java:402)
at org.dspace.browse.IndexBrowse.createIndex(IndexBrowse.java:1148)
at org.dspace.browse.IndexBrowse.main(IndexBrowse.java:703)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:212)
Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value
violates unique constraint "communities2item_pkey"
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1531)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1313)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:188)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:354)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:308)
at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)
at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)
at
org.dspace.storage.rdbms.DatabaseManager.execute(DatabaseManager.java:1429)
at
org.dspace.storage.rdbms.DatabaseManager.insert(DatabaseManager.java:736)
at
org.dspace.storage.rdbms.DatabaseManager.create(DatabaseManager.java:490)
at
org.dspace.browse.BrowseCreateDAOPostgres.updateCommunityMappings(BrowseCreateDAOPostgres.java:651)
... 8 more
Please help me to solve this issue ?
Kind Regards and manythanks
Hafeez Qazi
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.duraspace.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself;
WebMatrix provides all the features you need to develop and
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel