Uploaded image for project: 'MyCoRe'
  1. MCR-1895

Superuser can't delete mycore objects with registered PI

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 2017.06.0, 2018.05
    • Fix Version/s: 2018.06.0
    • Component/s: mycore-pi
    • Labels:
      None
    • Sprint:

      Description

      Try to delete mycore object with PI entries in table as superuser.
      Get the following stacktrace:

      WARN: SuperUser deletes object mir_mods_00003774 with registered doi 10.17176/20180625-102129-0. Try to set DOI inactive.
      
      ERROR: Exception caught while calling event handler
      
      org.mycore.common.MCRException: MyCoRe Exception: org.mycore.pi.exceptions.MCRPersistentIdentifierException
      
      Message:
      Not supported!
      
      Stack trace:
      org.mycore.pi.exceptions.MCRPersistentIdentifierException: Not supported!
      	at org.mycore.pi.urn.MCRURNOAIRegistrationService.delete(MCRURNOAIRegistrationService.java:40)
      	at org.mycore.pi.urn.MCRURNOAIRegistrationService.delete(MCRURNOAIRegistrationService.java:19)
      	at org.mycore.pi.MCRPIRegistrationService.onDelete(MCRPIRegistrationService.java:322)
      	at org.mycore.pi.MCRPersistentIdentifierEventHandler.lambda$handleObjectDeleted$5(MCRPersistentIdentifierEventHandler.java:62)
      	at org.mycore.pi.MCRPersistentIdentifierEventHandler.detectServices(MCRPersistentIdentifierEventHandler.java:81)
      	at org.mycore.pi.MCRPersistentIdentifierEventHandler.handleObjectDeleted(MCRPersistentIdentifierEventHandler.java:60)
      	at org.mycore.common.events.MCREventHandlerBase.doHandleEvent(MCREventHandlerBase.java:66)
      	at org.mycore.common.events.MCREventManager.handleEvent(MCREventManager.java:202)
      	at org.mycore.datamodel.metadata.MCRMetadataManager.fireEvent(MCRMetadataManager.java:1021)
      	at org.mycore.datamodel.metadata.MCRMetadataManager.delete(MCRMetadataManager.java:487)
      	at org.mycore.datamodel.metadata.MCRMetadataManager.deleteMCRObject(MCRMetadataManager.java:574)
      	at org.mycore.datamodel.metadata.MCRMetadataManager.deleteMCRObject(MCRMetadataManager.java:555)
      	at org.mycore.frontend.cli.MCRObjectCommands.delete(MCRObjectCommands.java:182)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.mycore.frontend.cli.MCRCommand.invoke(MCRCommand.java:253)
      	at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.runCommand(MCRWebCLIContainer.java:314)
      	at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.processCommand(MCRWebCLIContainer.java:282)
      	at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.processCommands(MCRWebCLIContainer.java:377)
      	at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.call(MCRWebCLIContainer.java:261)
      	at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.call(MCRWebCLIContainer.java:192)
      	at org.mycore.util.concurrent.processing.MCRProcessableSupplier.get(MCRProcessableSupplier.java:79)
      	at org.mycore.util.concurrent.MCRPrioritySupplier.get(MCRPrioritySupplier.java:27)
      	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      
      	at org.mycore.pi.MCRPersistentIdentifierEventHandler.lambda$handleObjectDeleted$5(MCRPersistentIdentifierEventHandler.java:64)
      	at org.mycore.pi.MCRPersistentIdentifierEventHandler.detectServices(MCRPersistentIdentifierEventHandler.java:81)
      	at org.mycore.pi.MCRPersistentIdentifierEventHandler.handleObjectDeleted(MCRPersistentIdentifierEventHandler.java:60)
      	at org.mycore.common.events.MCREventHandlerBase.doHandleEvent(MCREventHandlerBase.java:66)
      	at org.mycore.common.events.MCREventManager.handleEvent(MCREventManager.java:202)
      	at org.mycore.datamodel.metadata.MCRMetadataManager.fireEvent(MCRMetadataManager.java:1021)
      	at org.mycore.datamodel.metadata.MCRMetadataManager.delete(MCRMetadataManager.java:487)
      	at org.mycore.datamodel.metadata.MCRMetadataManager.deleteMCRObject(MCRMetadataManager.java:574)
      	at org.mycore.datamodel.metadata.MCRMetadataManager.deleteMCRObject(MCRMetadataManager.java:555)
      	at org.mycore.frontend.cli.MCRObjectCommands.delete(MCRObjectCommands.java:182)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.mycore.frontend.cli.MCRCommand.invoke(MCRCommand.java:253)
      	at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.runCommand(MCRWebCLIContainer.java:314)
      	at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.processCommand(MCRWebCLIContainer.java:282)
      	at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.processCommands(MCRWebCLIContainer.java:377)
      	at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.call(MCRWebCLIContainer.java:261)
      	at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.call(MCRWebCLIContainer.java:192)
      	at org.mycore.util.concurrent.processing.MCRProcessableSupplier.get(MCRProcessableSupplier.java:79)
      	at org.mycore.util.concurrent.MCRPrioritySupplier.get(MCRPrioritySupplier.java:27)
      	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: org.mycore.pi.exceptions.MCRPersistentIdentifierException: Not supported!
      	at org.mycore.pi.urn.MCRURNOAIRegistrationService.delete(MCRURNOAIRegistrationService.java:40)
      	at org.mycore.pi.urn.MCRURNOAIRegistrationService.delete(MCRURNOAIRegistrationService.java:19)
      	at org.mycore.pi.MCRPIRegistrationService.onDelete(MCRPIRegistrationService.java:322)
      	at org.mycore.pi.MCRPersistentIdentifierEventHandler.lambda$handleObjectDeleted$5(MCRPersistentIdentifierEventHandler.java:62)
      	... 29 more
      
      ERROR: Trying rollback by calling undo method of event handlers
      
      ERROR: Command 'delete object mir_mods_00003774' failed. Performing transaction rollback...
      
      java.lang.reflect.InvocationTargetException
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.mycore.frontend.cli.MCRCommand.invoke(MCRCommand.java:253)
      	at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.runCommand(MCRWebCLIContainer.java:314)
      	at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.processCommand(MCRWebCLIContainer.java:282)
      	at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.processCommands(MCRWebCLIContainer.java:377)
      	at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.call(MCRWebCLIContainer.java:261)
      	at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.call(MCRWebCLIContainer.java:192)
      	at org.mycore.util.concurrent.processing.MCRProcessableSupplier.get(MCRProcessableSupplier.java:79)
      	at org.mycore.util.concurrent.MCRPrioritySupplier.get(MCRPrioritySupplier.java:27)
      	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: org.mycore.common.MCRException: Exception caught in EventHandler, rollback by calling undo of successfull handlers done.
      	at org.mycore.common.events.MCREventManager.handleEvent(MCREventManager.java:229)
      	at org.mycore.datamodel.metadata.MCRMetadataManager.fireEvent(MCRMetadataManager.java:1021)
      	at org.mycore.datamodel.metadata.MCRMetadataManager.delete(MCRMetadataManager.java:487)
      	at org.mycore.datamodel.metadata.MCRMetadataManager.deleteMCRObject(MCRMetadataManager.java:574)
      	at org.mycore.datamodel.metadata.MCRMetadataManager.deleteMCRObject(MCRMetadataManager.java:555)
      	at org.mycore.frontend.cli.MCRObjectCommands.delete(MCRObjectCommands.java:182)
      	... 20 more
      Caused by: org.mycore.common.MCRException: MyCoRe Exception: org.mycore.pi.exceptions.MCRPersistentIdentifierException
      
      Message:
      Not supported!
      
      Stack trace:
      org.mycore.pi.exceptions.MCRPersistentIdentifierException: Not supported!
      	at org.mycore.pi.urn.MCRURNOAIRegistrationService.delete(MCRURNOAIRegistrationService.java:40)
      	at org.mycore.pi.urn.MCRURNOAIRegistrationService.delete(MCRURNOAIRegistrationService.java:19)
      	at org.mycore.pi.MCRPIRegistrationService.onDelete(MCRPIRegistrationService.java:322)
      	at org.mycore.pi.MCRPersistentIdentifierEventHandler.lambda$handleObjectDeleted$5(MCRPersistentIdentifierEventHandler.java:62)
      	at org.mycore.pi.MCRPersistentIdentifierEventHandler.detectServices(MCRPersistentIdentifierEventHandler.java:81)
      	at org.mycore.pi.MCRPersistentIdentifierEventHandler.handleObjectDeleted(MCRPersistentIdentifierEventHandler.java:60)
      	at org.mycore.common.events.MCREventHandlerBase.doHandleEvent(MCREventHandlerBase.java:66)
      	at org.mycore.common.events.MCREventManager.handleEvent(MCREventManager.java:202)
      	at org.mycore.datamodel.metadata.MCRMetadataManager.fireEvent(MCRMetadataManager.java:1021)
      	at org.mycore.datamodel.metadata.MCRMetadataManager.delete(MCRMetadataManager.java:487)
      	at org.mycore.datamodel.metadata.MCRMetadataManager.deleteMCRObject(MCRMetadataManager.java:574)
      	at org.mycore.datamodel.metadata.MCRMetadataManager.deleteMCRObject(MCRMetadataManager.java:555)
      	at org.mycore.frontend.cli.MCRObjectCommands.delete(MCRObjectCommands.java:182)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.mycore.frontend.cli.MCRCommand.invoke(MCRCommand.java:253)
      	at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.runCommand(MCRWebCLIContainer.java:314)
      	at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.processCommand(MCRWebCLIContainer.java:282)
      	at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.processCommands(MCRWebCLIContainer.java:377)
      	at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.call(MCRWebCLIContainer.java:261)
      	at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.call(MCRWebCLIContainer.java:192)
      	at org.mycore.util.concurrent.processing.MCRProcessableSupplier.get(MCRProcessableSupplier.java:79)
      	at org.mycore.util.concurrent.MCRPrioritySupplier.get(MCRPrioritySupplier.java:27)
      	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      
      	at org.mycore.pi.MCRPersistentIdentifierEventHandler.lambda$handleObjectDeleted$5(MCRPersistentIdentifierEventHandler.java:64)
      	at org.mycore.pi.MCRPersistentIdentifierEventHandler.detectServices(MCRPersistentIdentifierEventHandler.java:81)
      	at org.mycore.pi.MCRPersistentIdentifierEventHandler.handleObjectDeleted(MCRPersistentIdentifierEventHandler.java:60)
      	at org.mycore.common.events.MCREventHandlerBase.doHandleEvent(MCREventHandlerBase.java:66)
      	at org.mycore.common.events.MCREventManager.handleEvent(MCREventManager.java:202)
      	... 25 more
      Caused by: org.mycore.pi.exceptions.MCRPersistentIdentifierException: Not supported!
      	at org.mycore.pi.urn.MCRURNOAIRegistrationService.delete(MCRURNOAIRegistrationService.java:40)
      	at org.mycore.pi.urn.MCRURNOAIRegistrationService.delete(MCRURNOAIRegistrationService.java:19)
      	at org.mycore.pi.MCRPIRegistrationService.onDelete(MCRPIRegistrationService.java:322)
      	at org.mycore.pi.MCRPersistentIdentifierEventHandler.lambda$handleObjectDeleted$5(MCRPersistentIdentifierEventHandler.java:62)
      	... 29 more
      
      ERROR: The following command failed: 'delete object mir_mods_00003774'
      
      INFO: Writing unprocessed commands to file /mcr/IntR2Dok/.mycore/IntR2Dok/MCRWebCLI-unprocessed-commands.txt
      

        Attachments

          Activity

            People

            • Assignee:
              mcrshofm Sebastian Hofmann
              Reporter:
              mcrkrebs Kathleen Neumann
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: