Hello Tim,

Thank you! It did the job perfectly. I found and deleted 3 duplicate items.

Another question now.
All the imported items have URI 
http://oldserver/jspui/handle/123456789/12345
But I need them https://newserver/handle/123456789/12345
What is the best way to replace all at once?

Thanks,
Andrew

понеділок, 16 жовтня 2023 р. о 23:13:11 UTC+3 DSpace Technical Support пише:

> Hi Andrew,
>
> Apologies for not getting back to this. I'm not always able to answer 
> questions on this list quickly, but I see no one else has gotten to this 
> one.
>
> The "More than one result found" error appears to be saying that somehow 
> you have *two* WorkspaceItem objects that link to the same Item.  In other 
> words, somehow you have two entries in the "workspaceitem" table which have 
> the *same value* in the "item_id" column.  That's not supposed to be 
> possible in DSpace, as every workspace Item should be linked to a different 
> Item.
>
> You should be able to find the duplicate entry by running something like 
> this:
>
>  select item_id, COUNT(item_id) from workspaceitem group by item_id having 
> count(item_id)>1;
>
> That should return duplicate "item_id" values.  Then, for each, you'd have 
> to find the duplicate rows:
> select * from workspaceitem where item_id=[value];
>
> It's unclear to me why you have duplicates, but there should not be two 
> rows with the same "item_id".  So, you should delete one of them.
>
> It's difficult to answer your other question about the "psql" role.  It 
> might be possible to ignore if that role is no longer necessary in your new 
> setup.  But, if you notice odd permissions errors, then it's possible that 
> role is needed.
>
> Tim
> On Friday, October 6, 2023 at 3:02:06 PM UTC-5 Andrew K wrote:
>
>> I probably should have mentioned that I run 
>> *sudo /dspace/bin/dspace index-discovery -b*
>> on the new server first and it went OK.
>> After that I did 
>> *sudo /dspace/bin/dspace filter-media*
>> and then 
>> *sudo /dspace/bin/dspace index-discovery*
>> throws the error *java.lang.IllegalArgumentException: More than one 
>> result found*
>>
>> Another question.
>> I moved the database and assetstore to the new server.
>> Then I did 
>> *sudo /dspace/bin/dspace filter-media*
>> It took more than a day to complete (12+K items).
>> Now I try 
>> *sudo /dspace/bin/dspace index-discovery*
>> but it fails:
>>
>>
>>
>>
>> *The script has startedUpdating Indexjava.lang.IllegalArgumentException: 
>> More than one result found        at 
>> org.dspace.core.AbstractHibernateDAO.uniqueResult(AbstractHibernateDAO.java:242)
>>   
>>       at 
>> org.dspace.content.dao.impl.WorkspaceItemDAOImpl.findByItem(WorkspaceItemDAOImpl.java:81)*
>>
>>

-- 
All messages to this mailing list should adhere to the Code of Conduct: 
https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
--- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-tech/f40e822b-7406-4947-bc09-38b0fa44c8abn%40googlegroups.com.

Reply via email to