<div dir="ltr">Dear Christophe;<br>Thank you so much. You spotted the problem. I fixed the problem using a short command to set the current value of the sequence to a number bigger than the current maximum handle. <b>SELECT setval(&#39;public.handle_seq&#39;, 5100, true);</b><br>

but this is a bug, isn&#39;t it? I didn&#39;t do anything strange and this happened! It may happen to many other who want to migrate their items from one repository to another for any reason ( say backup or mirror) and preserve the handles.<br>

I think this must be resolved in future releases. what do you think?<br>Thanks again and happy new year!<br>SM<br><br clear="all">Saeed Moaddeli<br>IT Department<br>Encyclopaedia of Iranian Architectural History <br>
No.2175 Valiasr Ave. Tehran 1511913511, Iran<br>Tel: +98 (21) 88728125-7 W3: <a href="http://eiah.org" target="_blank">http://eiah.org</a><br>
<br><br><div class="gmail_quote">On Sun, Jan 3, 2010 at 2:01 PM, Christophe Dupriez <span dir="ltr">&lt;<a href="mailto:christophe.dupriez@destin.be" target="_blank">christophe.dupriez@destin.be</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Saeed,<br>
<br>
I think this may be caused by the &quot;sequence&quot; in PostgreSQL out of sync.<br>
If you carefuly examine it using the PgAdmin III software, you will find in your database, Schema public, Sequences, handle_seq, Properties:Current Value<br>
This CurrentValue must be equal to the latest handle created in the handle table.<br>
This can be checked by the SQL script:<br>
SELECT max(handle_id)   FROM handle;<br>
<br>
Good luck!<br>
<br>
Christophe<br>
<br>
Saeed Moaddeli a ้crit :<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
I have faced the following error after installing a fresh DSpace and importing 2-3 thousands items into the repository. I wanted to preserve the handles for the imported items so I removed the URI element from dublin_core.xml file and just kept the handle file for each exported package. The Import process completed successfully with no problem.<br>



I put some wok-flows on my collections and started to submit items manually. The submission completes and the item gets in to the related work-flow. The internal system error shows up when the collection admin presses the button for sending the item in to the repository.<br>



The weird thing is after this error; the user&#39;s workspace is empty without any messages or anything, empty at all.<br>
I tried to find the cause of this error but found nothing. I need to resolve this ASAP because this is a production repository. I looked in to the database and noticed that unlike my other DSpace installation, the handle_id (item internal ID) and and the second part of the handle in the &quot;handle&quot; table are not the same. I am not sure whether this may be the problem or not.<br>



I am looking forward for all comments and solutions,<br>
Bests,<br>
Saeed<br>
<br>
*here is the Error:*<br>
<br>
2010-01-01 16:10:26,958 WARN  org.dspace.app.webui.servlet.DSpaceServlet @ saeed@repo-ei.org:session_id=8472C2F50C508757D5E2DB93E432DB7A:ip_addr=*MailScanner warning: numerical links are often malicious:* 192.168.123.156 &lt;<a href="http://192.168.123.156" target="_blank">http://192.168.123.156</a>&gt;:*database_error:org.postgresql.util.PSQLException: ERROR: duplicate key violates unique constraint &quot;handle_handle_key&quot;*<br>



org.postgresql.util.PSQLException: ERROR: duplicate key violates unique constraint &quot;handle_handle_key&quot;<br>
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1512)<br>
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1297)<br>
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:188)<br>
        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:430)<br>
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:346)<br>
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:300)<br>
        at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)<br>
        at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)<br>
        at org.dspace.storage.rdbms.DatabaseManager.execute(DatabaseManager.java:1301)<br>
        at org.dspace.storage.rdbms.DatabaseManager.update(DatabaseManager.java:657)<br>
        at org.dspace.handle.HandleManager.createHandle(HandleManager.java:174)<br>
        at org.dspace.content.InstallItem.installItem(InstallItem.java:110)<br>
        at org.dspace.content.InstallItem.installItem(InstallItem.java:72)<br>
        at org.dspace.workflow.WorkflowManager.archive(WorkflowManager.java:650)<br>
        at org.dspace.workflow.WorkflowManager.doState(WorkflowManager.java:604)<br>
        at org.dspace.workflow.WorkflowManager.advance(WorkflowManager.java:369)<br>
        at org.dspace.app.webui.servlet.MyDSpaceServlet.processPerformTask(MyDSpaceServlet.java:442)<br>
        at org.dspace.app.webui.servlet.MyDSpaceServlet.doDSPost(MyDSpaceServlet.java:131)<br>
        at org.dspace.app.webui.servlet.DSpaceServlet.processRequest(DSpaceServlet.java:147)<br>
        at org.dspace.app.webui.servlet.DSpaceServlet.doPost(DSpaceServlet.java:105)<br>
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)<br>
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)<br>
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)<br>
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)<br>
        at org.dspace.app.webui.filter.RegisteredOnlyFilter.doFilter(RegisteredOnlyFilter.java:98)<br>
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)<br>
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)<br>
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)<br>
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)<br>
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)<br>
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)<br>
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)<br>
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)<br>
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)<br>
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)<br>
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)<br>
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)<br>
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)<br>
        at java.lang.Thread.run(Thread.java:595)<br>
<br>
Saeed Moaddeli<br>
IT Department<br>
Encyclopaedia of Iranian Architectural History<br>
No.2175 Valiasr Ave. Tehran 1511913511, Iran<br>
Tel: +98 (21) 88728125-7 W3: <a href="http://eiah.org" target="_blank">http://eiah.org</a><br>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
Dspace-general mailing list<br>
<a href="mailto:Dspace-general@mit.edu" target="_blank">Dspace-general@mit.edu</a><br>
<a href="http://mailman.mit.edu/mailman/listinfo/dspace-general" target="_blank">http://mailman.mit.edu/mailman/listinfo/dspace-general</a><br>
  <br>
</blockquote>
<br>
</blockquote></div><br></div>