[Dspace-tech] Simple Archive Format

82 views
Skip to first unread message

Webshet, Sisay (ILRI)

unread,
Aug 26, 2015, 11:48:28 AM8/26/15
to dspac...@lists.sourceforge.net

 

Hi all , we are running  dsapce 3.1 using linux/xmlui version,tomcat 6

I tried to use command line tools for importing items in batches.

 

But I faced this error java.lang.RuntimeException: Error while attempting to create identifier for Item id: 30115

 

Can any body has hint on this

 

Thanks

helix84

unread,
Aug 26, 2015, 11:48:29 AM8/26/15
to Webshet, Sisay (ILRI), dspac...@lists.sourceforge.net
Hi Sisay, yes, other people have encountered this or similar errors,
but we need the full stack trace (including the "Caused by:" lines)
from your log files to determine the source of the problem.


Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Webshet, Sisay (ILRI)

unread,
Aug 26, 2015, 11:48:32 AM8/26/15
to hel...@centrum.sk, dspac...@lists.sourceforge.net
Hi Helix,
Here is the information from the log file
Thanks

2013-09-03 15:03:17,517 INFO org.dspace.content.Item @ s.we...@cgiar.org::update_item:item_id=30118
2013-09-03 15:03:17,537 INFO org.dspace.content.Item @ s.we...@cgiar.org::create_item:item_id=30118
2013-09-03 15:03:17,590 INFO org.dspace.content.Item @ s.we...@cgiar.org::update_item:item_id=30118
2013-09-03 15:03:17,608 INFO org.dspace.content.WorkspaceItem @ s.we...@cgiar.org::create_workspace_item:workspace_item_id=-1item_id=30118collection_id=671
2013-09-03 15:03:17,890 INFO org.dspace.content.Bundle @ s.we...@cgiar.org::create_bundle:bundle_id=17759
2013-09-03 15:03:17,894 INFO org.dspace.content.Bundle @ s.we...@cgiar.org::update_bundle:bundle_id=17759
2013-09-03 15:03:17,895 INFO org.dspace.content.Item @ s.we...@cgiar.org::add_bundle:item_id=30118,bundle_id=17759
2013-09-03 15:03:18,147 INFO org.dspace.content.Bitstream @ s.we...@cgiar.org::create_bitstream:bitstream_id=20104
2013-09-03 15:03:18,159 INFO org.dspace.content.Bundle @ s.we...@cgiar.org::add_bitstream:bundle_id=17759,bitstream_id=20104
2013-09-03 15:03:18,174 INFO org.dspace.content.Bitstream @ s.we...@cgiar.org::update_bitstream:bitstream_id=20104
2013-09-03 15:03:18,175 INFO org.dspace.content.Bundle @ s.we...@cgiar.org::create_bundle:bundle_id=17760
2013-09-03 15:03:18,176 INFO org.dspace.content.Bundle @ s.we...@cgiar.org::update_bundle:bundle_id=17760
2013-09-03 15:03:18,177 INFO org.dspace.content.Item @ s.we...@cgiar.org::add_bundle:item_id=30118,bundle_id=17760
2013-09-03 15:03:18,191 INFO org.dspace.content.Bitstream @ s.we...@cgiar.org::create_bitstream:bitstream_id=20105
2013-09-03 15:03:18,194 INFO org.dspace.content.Bundle @ s.we...@cgiar.org::add_bitstream:bundle_id=17760,bitstream_id=20105
2013-09-03 15:03:18,200 INFO org.dspace.content.Bitstream @ s.we...@cgiar.org::update_bitstream:bitstream_id=20105
2013-09-03 15:03:18,203 ERROR org.dspace.identifier.VersionedHandleIdentifierProvider @ s.we...@cgiar.org::Error while attempting to create handle:Item id\colon; 30118
java.lang.ClassCastException: org.dspace.content.Collection cannot be cast to org.dspace.content.Item
at org.dspace.identifier.VersionedHandleIdentifierProvider.getHistory(VersionedHandleIdentifierProvider.java:181)
at org.dspace.identifier.VersionedHandleIdentifierProvider.register(VersionedHandleIdentifierProvider.java:132)
at org.dspace.identifier.IdentifierServiceImpl.register(IdentifierServiceImpl.java:93)
at org.dspace.content.InstallItem.installItem(InstallItem.java:69)
at org.dspace.app.itemimport.ItemImport.addItem(ItemImport.java:900)
at org.dspace.app.itemimport.ItemImport.addItems(ItemImport.java:727)
at org.dspace.app.itemimport.ItemImport.main(ItemImport.java:563)
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:183)

Webshet, Sisay (ILRI)

unread,
Aug 26, 2015, 11:48:33 AM8/26/15
to hel...@centrum.sk, dspac...@lists.sourceforge.net
This is also from the screenshot after running the command


INFO [main] (DSpaceKernelInit.java:52) - Created new kernel: DSpaceKernel:org.dspace:name=00307bc2-5b04-42c9-8cce-613874cef7a1,type=DSpaceKernel:lastLoad=null:loadTime=0:running=false:kernel=null
INFO [main] (ConfigurationManager.java:1224) - Loading from classloader: file:/home/dspace/config/dspace.cfg
INFO [main] (ConfigurationManager.java:1224) - Using dspace provided log configuration (log.init.config)
INFO [main] (ConfigurationManager.java:1224) - Loading: /home/dspace/config/log4j.properties
Destination collections:
Owning Collection: Import Test
Adding items from directory: /home/dspace/cgimport
Generating mapfile: sisay
Adding item from directory 1
Loading dublin core from /home/dspace/cgimport/1/dublin_core.xml
Schema: dc Element: contributor Qualifier: author Value: CCAFS
Schema: dc Element: date Qualifier: accessioned Value: 2013-03-01T17:40:03Z
Schema: dc Element: date Qualifier: available Value: 2013-03-01T17:40:03Z
Schema: dc Element: date Qualifier: issued Value: 2012-11
Schema: dc Element: identifier Qualifier: citation Value: Tackling the gender gap in agriculture. Copenhagen, Denmark: The CGIAR Research Program on Climate Change, Agriculture and Food Security (CCAFS)
Schema: dc Element: language Qualifier: iso Value: en
Schema: dc Element: publisher Qualifier: none Value: The CGIAR Research Program on Climate Change, Agriculture and Food Security (CCAFS)
Schema: dc Element: subject Qualifier: none Value: GENDER
Schema: dc Element: subject Qualifier: none Value: AGRICULTURE
Schema: dc Element: subject Qualifier: none Value: CLIMATE
Schema: dc Element: subject Qualifier: none Value: FOOD SECURITY
Schema: dc Element: title Qualifier: none Value: Tackling the gender gap in agriculture
Schema: dc Element: type Qualifier: output Value: Brochure
Schema: dc Element: identifier Qualifier: status Value: Open Access
Schema: dc Element: cpsubject Qualifier: cpwfsubject Value: WOMEN
Schema: dc Element: crsubject Qualifier: crpsubject Value: CLIMATE CHANGE, AGRICULTURE AND FOOD SECURITY
Schema: dc Element: ccsubject Qualifier: ccafsubject Value: LINKING KNOWLEDGE TO ACTION
Schema: dc Element: targetaudience Qualifier: none Value: ACADEMICS
Processing contents file: /home/dspace/cgimport/1/contents
Bitstream: CCAFS_Gender.pdf Bundle: ORIGINAL
Bitstream: gender-brochure.png Bundle: THUMBNAIL
Processing handle file: handle
read handle: '10568/29000'
java.lang.RuntimeException: Error while attempting to create identifier for Item id: 30118
at org.dspace.identifier.VersionedHandleIdentifierProvider.register(VersionedHandleIdentifierProvider.java:173)
at org.dspace.identifier.IdentifierServiceImpl.register(IdentifierServiceImpl.java:93)
at org.dspace.content.InstallItem.installItem(InstallItem.java:69)
at org.dspace.app.itemimport.ItemImport.addItem(ItemImport.java:900)
at org.dspace.app.itemimport.ItemImport.addItems(ItemImport.java:727)
at org.dspace.app.itemimport.ItemImport.main(ItemImport.java:563)
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:183)
Caused by: java.lang.ClassCastException: org.dspace.content.Collection cannot be cast to org.dspace.content.Item
at org.dspace.identifier.VersionedHandleIdentifierProvider.getHistory(VersionedHandleIdentifierProvider.java:181)
at org.dspace.identifier.VersionedHandleIdentifierProvider.register(VersionedHandleIdentifierProvider.java:132)
... 10 more
java.lang.RuntimeException: Error while attempting to create identifier for Item id: 30118
Started: 1378209797283
Ended: 1378209798204
Elapsed time: 0 secs (921 msecs)
swebshet@DSpace:~$


-----Original Message-----
From: ivan....@gmail.com [mailto:ivan....@gmail.com] On Behalf Of helix84
Sent: Tuesday, September 03, 2013 3:00 PM
To: Webshet, Sisay (ILRI)
Cc: dspac...@lists.sourceforge.net
Subject: Re: [Dspace-tech] Simple Archive Format

helix84

unread,
Aug 26, 2015, 11:48:37 AM8/26/15
to Webshet, Sisay (ILRI), dspac...@lists.sourceforge.net
During handle creation for an item, you're passing a collection where
an item is expected.

It seems to me that during item creation it's checked whether that
handle already exists and it's found to exist (this shouldn't happen!)
and it is a collection.

Run [dspace]/etc/postgres/update-sequences.sql to reset handle_seq to
the value of the highest handle postfix you have. That should ensure
that DSpace doesn't try to assign a handle that was already assigned
once.

Webshet, Sisay (ILRI)

unread,
Aug 26, 2015, 11:48:53 AM8/26/15
to hel...@centrum.sk, dspac...@lists.sourceforge.net
Thanks helix,

Yes you are right I was passing the destination's collections handle.
I imported items successfully however the imported items were doubled when viewed to the destination collection

Thanks


-----Original Message-----
From: ivan....@gmail.com [mailto:ivan....@gmail.com] On Behalf Of helix84
Sent: Tuesday, September 03, 2013 3:51 PM
To: Webshet, Sisay (ILRI)
Cc: dspac...@lists.sourceforge.net
Subject: Re: [Dspace-tech] Simple Archive Format

Reply all
Reply to author
Forward
0 new messages