java.lang.RuntimeException: Error while attempting to create identifier for Item id: 27540

Sakai JIRA | Ivan Masár | 3 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    When I export an AIP package via packager (successfully) and then try to reimport it with the replace flag (-r), packager fails trying to create a new handle. I'll try to bisect to find where exactly the issue was introduced, but most likely it's either DS-1637 or DS-1535, both of which were recently merged. $ /dspace/bin/dspace packager -d -t AIP -e admin@mydspace.edu -i 123456789/21608 21608.zip ... $ /dspace/bin/dspace packager -r -t AIP -e admin@mydspace.edu 21608.zip Ingesting package located at 21608.zip java.lang.RuntimeException: Error while attempting to create identifier for Item id: 27540 at org.dspace.identifier.VersionedHandleIdentifierProvider.register(VersionedHandleIdentifierProvider.java:173) at org.dspace.identifier.IdentifierServiceImpl.register(IdentifierServiceImpl.java:96) at org.dspace.content.InstallItem.restoreItem(InstallItem.java:109) at org.dspace.content.packager.PackageUtils.finishCreateItem(PackageUtils.java:511) at org.dspace.content.packager.AbstractMETSIngester.ingestObject(AbstractMETSIngester.java:516) at org.dspace.content.packager.AbstractMETSIngester.ingest(AbstractMETSIngester.java:234) at org.dspace.app.packager.Packager.ingest(Packager.java:565) at org.dspace.app.packager.Packager.main(Packager.java:427) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:225) at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:77) Caused by: java.lang.IllegalStateException: Attempted to create a handle which is already in use: 123456789/21608 at org.dspace.identifier.VersionedHandleIdentifierProvider.createNewIdentifier(VersionedHandleIdentifierProvider.java:460) at org.dspace.identifier.VersionedHandleIdentifierProvider.register(VersionedHandleIdentifierProvider.java:165) ... 13 more java.lang.RuntimeException: Error while attempting to create identifier for Item id: 27540

    Sakai JIRA | 3 years ago | Ivan Masár
    java.lang.RuntimeException: Error while attempting to create identifier for Item id: 27540
  2. 0

    When I export an AIP package via packager (successfully) and then try to reimport it with the replace flag (-r), packager fails trying to create a new handle. I'll try to bisect to find where exactly the issue was introduced, but most likely it's either DS-1637 or DS-1535, both of which were recently merged. $ /dspace/bin/dspace packager -d -t AIP -e admin@mydspace.edu -i 123456789/21608 21608.zip ... $ /dspace/bin/dspace packager -r -t AIP -e admin@mydspace.edu 21608.zip Ingesting package located at 21608.zip java.lang.RuntimeException: Error while attempting to create identifier for Item id: 27540 at org.dspace.identifier.VersionedHandleIdentifierProvider.register(VersionedHandleIdentifierProvider.java:173) at org.dspace.identifier.IdentifierServiceImpl.register(IdentifierServiceImpl.java:96) at org.dspace.content.InstallItem.restoreItem(InstallItem.java:109) at org.dspace.content.packager.PackageUtils.finishCreateItem(PackageUtils.java:511) at org.dspace.content.packager.AbstractMETSIngester.ingestObject(AbstractMETSIngester.java:516) at org.dspace.content.packager.AbstractMETSIngester.ingest(AbstractMETSIngester.java:234) at org.dspace.app.packager.Packager.ingest(Packager.java:565) at org.dspace.app.packager.Packager.main(Packager.java:427) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:225) at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:77) Caused by: java.lang.IllegalStateException: Attempted to create a handle which is already in use: 123456789/21608 at org.dspace.identifier.VersionedHandleIdentifierProvider.createNewIdentifier(VersionedHandleIdentifierProvider.java:460) at org.dspace.identifier.VersionedHandleIdentifierProvider.register(VersionedHandleIdentifierProvider.java:165) ... 13 more java.lang.RuntimeException: Error while attempting to create identifier for Item id: 27540

    Sakai JIRA | 3 years ago | Ivan Masár
    java.lang.RuntimeException: Error while attempting to create identifier for Item id: 27540
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Attempted to create a handle which is already in use: 123456789/21608

      at org.dspace.identifier.VersionedHandleIdentifierProvider.createNewIdentifier()
    2. DSpace Kernel :: API and Implementation
      Packager.main
      1. org.dspace.identifier.VersionedHandleIdentifierProvider.createNewIdentifier(VersionedHandleIdentifierProvider.java:460)
      2. org.dspace.identifier.VersionedHandleIdentifierProvider.register(VersionedHandleIdentifierProvider.java:165)
      3. org.dspace.identifier.IdentifierServiceImpl.register(IdentifierServiceImpl.java:96)
      4. org.dspace.content.InstallItem.restoreItem(InstallItem.java:109)
      5. org.dspace.content.packager.PackageUtils.finishCreateItem(PackageUtils.java:511)
      6. org.dspace.content.packager.AbstractMETSIngester.ingestObject(AbstractMETSIngester.java:516)
      7. org.dspace.content.packager.AbstractMETSIngester.ingest(AbstractMETSIngester.java:234)
      8. org.dspace.app.packager.Packager.ingest(Packager.java:565)
      9. org.dspace.app.packager.Packager.main(Packager.java:427)
      9 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:616)
      4 frames
    4. DSpace Kernel :: API and Implementation
      ScriptLauncher.main
      1. org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:225)
      2. org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:77)
      2 frames