java.lang.IllegalStateException: No associated resource type

Sakai JIRA | Tim Donohue | 2 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    When restoring items with the AIP Backup and Restore process, the VersionedHandleIdentifierProvider always logs the following unnecessary (and ignorable) error message: 2015-01-09 09:56:51,075 ERROR org.dspace.identifier.VersionedHandleIdentifierProvider @ test@email.com::Error while resolving handle to item:handle\colon; 123456789/544 java.lang.IllegalStateException: No associated resource type at org.dspace.identifier.VersionedHandleIdentifierProvider.resolve(VersionedHandleIdentifierProvider.java:290) at org.dspace.identifier.VersionedHandleIdentifierProvider.getHistory(VersionedHandleIdentifierProvider.java:179) at org.dspace.identifier.VersionedHandleIdentifierProvider.register(VersionedHandleIdentifierProvider.java:132) at org.dspace.identifier.IdentifierServiceImpl.register(IdentifierServiceImpl.java:100) 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.content.packager.AbstractPackageIngester.ingestAll(AbstractPackageIngester.java:143) at org.dspace.content.packager.AbstractPackageIngester.ingestAll(AbstractPackageIngester.java:193) at org.dspace.content.packager.AbstractPackageIngester.ingestAll(AbstractPackageIngester.java:193) at org.dspace.content.packager.AbstractPackageIngester.ingestAll(AbstractPackageIngester.java:193) at org.dspace.content.packager.AbstractPackageIngester.ingestAll(AbstractPackageIngester.java:193) The error is logged by a seemingly overzealous "resolve()" method which assumes that any Handle without a resource_id is an ERROR: https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/identifier/VersionedHandleIdentifierProvider.java#L287 However, in the situation where you are *restoring* content to DSpace, the content has been previously DELETED in DSpace. When content is Deleted, it's handle is "reserved" (so that it will not be used again), but it's "resource_id" is cleared out. See HandleManager.unbindHandle(): https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/handle/HandleManager.java#L276 If you look closely at the stacktrace above, this "Error while resolving handle" is reported during the process of attempting to *register()* a known handle after calling "InstallItem.restoreItem()" While these errors are essentially harmless, they are rather confusing as they seem to be a problem during the restoration process. However, the error is never actually *thrown* outside of the resolve() method, it is just logged. So the restoring the identifier on the Item actually DOES SUCCEED even though an error appears in the logs. Looking at the code a bit, there may be some refactoring work necessary to fix this problem. As it is likely too late in the game to fix for 5.0, I'm just logging this as a known issue. Again, this error can be ignored if you are simply performing an Item restore.

    Sakai JIRA | 2 years ago | Tim Donohue
    java.lang.IllegalStateException: No associated resource type
  2. 0

    When restoring items with the AIP Backup and Restore process, the VersionedHandleIdentifierProvider always logs the following unnecessary (and ignorable) error message: 2015-01-09 09:56:51,075 ERROR org.dspace.identifier.VersionedHandleIdentifierProvider @ test@email.com::Error while resolving handle to item:handle\colon; 123456789/544 java.lang.IllegalStateException: No associated resource type at org.dspace.identifier.VersionedHandleIdentifierProvider.resolve(VersionedHandleIdentifierProvider.java:290) at org.dspace.identifier.VersionedHandleIdentifierProvider.getHistory(VersionedHandleIdentifierProvider.java:179) at org.dspace.identifier.VersionedHandleIdentifierProvider.register(VersionedHandleIdentifierProvider.java:132) at org.dspace.identifier.IdentifierServiceImpl.register(IdentifierServiceImpl.java:100) 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.content.packager.AbstractPackageIngester.ingestAll(AbstractPackageIngester.java:143) at org.dspace.content.packager.AbstractPackageIngester.ingestAll(AbstractPackageIngester.java:193) at org.dspace.content.packager.AbstractPackageIngester.ingestAll(AbstractPackageIngester.java:193) at org.dspace.content.packager.AbstractPackageIngester.ingestAll(AbstractPackageIngester.java:193) at org.dspace.content.packager.AbstractPackageIngester.ingestAll(AbstractPackageIngester.java:193) The error is logged by a seemingly overzealous "resolve()" method which assumes that any Handle without a resource_id is an ERROR: https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/identifier/VersionedHandleIdentifierProvider.java#L287 However, in the situation where you are *restoring* content to DSpace, the content has been previously DELETED in DSpace. When content is Deleted, it's handle is "reserved" (so that it will not be used again), but it's "resource_id" is cleared out. See HandleManager.unbindHandle(): https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/handle/HandleManager.java#L276 If you look closely at the stacktrace above, this "Error while resolving handle" is reported during the process of attempting to *register()* a known handle after calling "InstallItem.restoreItem()" While these errors are essentially harmless, they are rather confusing as they seem to be a problem during the restoration process. However, the error is never actually *thrown* outside of the resolve() method, it is just logged. So the restoring the identifier on the Item actually DOES SUCCEED even though an error appears in the logs. Looking at the code a bit, there may be some refactoring work necessary to fix this problem. As it is likely too late in the game to fix for 5.0, I'm just logging this as a known issue. Again, this error can be ignored if you are simply performing an Item restore.

    Sakai JIRA | 2 years ago | Tim Donohue
    java.lang.IllegalStateException: No associated resource type

    Root Cause Analysis

    1. java.lang.IllegalStateException

      No associated resource type

      at org.dspace.identifier.VersionedHandleIdentifierProvider.resolve()
    2. DSpace Kernel :: API and Implementation
      AbstractPackageIngester.ingestAll
      1. org.dspace.identifier.VersionedHandleIdentifierProvider.resolve(VersionedHandleIdentifierProvider.java:290)
      2. org.dspace.identifier.VersionedHandleIdentifierProvider.getHistory(VersionedHandleIdentifierProvider.java:179)
      3. org.dspace.identifier.VersionedHandleIdentifierProvider.register(VersionedHandleIdentifierProvider.java:132)
      4. org.dspace.identifier.IdentifierServiceImpl.register(IdentifierServiceImpl.java:100)
      5. org.dspace.content.InstallItem.restoreItem(InstallItem.java:109)
      6. org.dspace.content.packager.PackageUtils.finishCreateItem(PackageUtils.java:511)
      7. org.dspace.content.packager.AbstractMETSIngester.ingestObject(AbstractMETSIngester.java:516)
      8. org.dspace.content.packager.AbstractMETSIngester.ingest(AbstractMETSIngester.java:234)
      9. org.dspace.content.packager.AbstractPackageIngester.ingestAll(AbstractPackageIngester.java:143)
      10. org.dspace.content.packager.AbstractPackageIngester.ingestAll(AbstractPackageIngester.java:193)
      11. org.dspace.content.packager.AbstractPackageIngester.ingestAll(AbstractPackageIngester.java:193)
      12. org.dspace.content.packager.AbstractPackageIngester.ingestAll(AbstractPackageIngester.java:193)
      13. org.dspace.content.packager.AbstractPackageIngester.ingestAll(AbstractPackageIngester.java:193)
      13 frames