org.dspace.authorize.AuthorizeException: Authorization attempted on null DSpace object OBSOLETE (DELETE) by user 350e1431-8f75-40d3-a2b0-72222a82860a

Sakai JIRA | Tim Donohue | 1 year 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

    This was discovered when attempting to run an AIP replace (packager -r -f) command. If a Community has a logo, any attempts to replace or remove it result in an AuthorizeException. Here's the full stacktrace: org.dspace.authorize.AuthorizeException: Authorization attempted on null DSpace object OBSOLETE (DELETE) by user 350e1431-8f75-40d3-a2b0-72222a82860a at org.dspace.authorize.AuthorizeServiceImpl.authorizeAction(AuthorizeServiceImpl.java:123) at org.dspace.authorize.AuthorizeServiceImpl.authorizeAction(AuthorizeServiceImpl.java:94) at org.dspace.authorize.AuthorizeServiceImpl.authorizeAction(AuthorizeServiceImpl.java:88) at org.dspace.content.BitstreamServiceImpl.delete(BitstreamServiceImpl.java:239) at org.dspace.content.BitstreamServiceImpl.delete(BitstreamServiceImpl.java:41) at org.dspace.content.CommunityServiceImpl.setLogo(CommunityServiceImpl.java:211) at org.dspace.content.packager.PackageUtils.removeAllBitstreams(PackageUtils.java:682) at org.dspace.content.packager.AbstractMETSIngester.replaceObject(AbstractMETSIngester.java:625) at org.dspace.content.packager.AbstractMETSIngester.replace(AbstractMETSIngester.java:1207) at org.dspace.content.packager.AbstractPackageIngester.replaceAll(AbstractPackageIngester.java:282) at org.dspace.content.packager.AbstractPackageIngester.replaceAll(AbstractPackageIngester.java:315) at org.dspace.app.packager.Packager.replace(Packager.java:737) at org.dspace.app.packager.Packager.main(Packager.java:377) 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:606) at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:227) at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:79) org.dspace.authorize.AuthorizeException: Authorization attempted on null DSpace object OBSOLETE (DELETE) by user 350e1431-8f75-40d3-a2b0-72222a82860a The cause is an obvious bug in the CommunityServiceImpl.setLogo() code which proceeds to nullify the logo prior to actually removing its bitstream. See this line (and the line after it): https://github.com/DSpace/DSpace/blob/feebea46bcc77a98fd1bafc933c0b8c875e7b6f4/dspace-api/src/main/java/org/dspace/content/CommunityServiceImpl.java#L210 PR coming shortly.

    Sakai JIRA | 1 year ago | Tim Donohue
    org.dspace.authorize.AuthorizeException: Authorization attempted on null DSpace object OBSOLETE (DELETE) by user 350e1431-8f75-40d3-a2b0-72222a82860a
  2. 0

    This was discovered when attempting to run an AIP replace (packager -r -f) command. If a Community has a logo, any attempts to replace or remove it result in an AuthorizeException. Here's the full stacktrace: org.dspace.authorize.AuthorizeException: Authorization attempted on null DSpace object OBSOLETE (DELETE) by user 350e1431-8f75-40d3-a2b0-72222a82860a at org.dspace.authorize.AuthorizeServiceImpl.authorizeAction(AuthorizeServiceImpl.java:123) at org.dspace.authorize.AuthorizeServiceImpl.authorizeAction(AuthorizeServiceImpl.java:94) at org.dspace.authorize.AuthorizeServiceImpl.authorizeAction(AuthorizeServiceImpl.java:88) at org.dspace.content.BitstreamServiceImpl.delete(BitstreamServiceImpl.java:239) at org.dspace.content.BitstreamServiceImpl.delete(BitstreamServiceImpl.java:41) at org.dspace.content.CommunityServiceImpl.setLogo(CommunityServiceImpl.java:211) at org.dspace.content.packager.PackageUtils.removeAllBitstreams(PackageUtils.java:682) at org.dspace.content.packager.AbstractMETSIngester.replaceObject(AbstractMETSIngester.java:625) at org.dspace.content.packager.AbstractMETSIngester.replace(AbstractMETSIngester.java:1207) at org.dspace.content.packager.AbstractPackageIngester.replaceAll(AbstractPackageIngester.java:282) at org.dspace.content.packager.AbstractPackageIngester.replaceAll(AbstractPackageIngester.java:315) at org.dspace.app.packager.Packager.replace(Packager.java:737) at org.dspace.app.packager.Packager.main(Packager.java:377) 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:606) at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:227) at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:79) org.dspace.authorize.AuthorizeException: Authorization attempted on null DSpace object OBSOLETE (DELETE) by user 350e1431-8f75-40d3-a2b0-72222a82860a The cause is an obvious bug in the CommunityServiceImpl.setLogo() code which proceeds to nullify the logo prior to actually removing its bitstream. See this line (and the line after it): https://github.com/DSpace/DSpace/blob/feebea46bcc77a98fd1bafc933c0b8c875e7b6f4/dspace-api/src/main/java/org/dspace/content/CommunityServiceImpl.java#L210 PR coming shortly.

    Sakai JIRA | 1 year ago | Tim Donohue
    org.dspace.authorize.AuthorizeException: Authorization attempted on null DSpace object OBSOLETE (DELETE) by user 350e1431-8f75-40d3-a2b0-72222a82860a

    Root Cause Analysis

    1. org.dspace.authorize.AuthorizeException

      Authorization attempted on null DSpace object OBSOLETE (DELETE) by user 350e1431-8f75-40d3-a2b0-72222a82860a

      at org.dspace.authorize.AuthorizeServiceImpl.authorizeAction()
    2. DSpace Kernel :: API and Implementation
      Packager.main
      1. org.dspace.authorize.AuthorizeServiceImpl.authorizeAction(AuthorizeServiceImpl.java:123)
      2. org.dspace.authorize.AuthorizeServiceImpl.authorizeAction(AuthorizeServiceImpl.java:94)
      3. org.dspace.authorize.AuthorizeServiceImpl.authorizeAction(AuthorizeServiceImpl.java:88)
      4. org.dspace.content.BitstreamServiceImpl.delete(BitstreamServiceImpl.java:239)
      5. org.dspace.content.BitstreamServiceImpl.delete(BitstreamServiceImpl.java:41)
      6. org.dspace.content.CommunityServiceImpl.setLogo(CommunityServiceImpl.java:211)
      7. org.dspace.content.packager.PackageUtils.removeAllBitstreams(PackageUtils.java:682)
      8. org.dspace.content.packager.AbstractMETSIngester.replaceObject(AbstractMETSIngester.java:625)
      9. org.dspace.content.packager.AbstractMETSIngester.replace(AbstractMETSIngester.java:1207)
      10. org.dspace.content.packager.AbstractPackageIngester.replaceAll(AbstractPackageIngester.java:282)
      11. org.dspace.content.packager.AbstractPackageIngester.replaceAll(AbstractPackageIngester.java:315)
      12. org.dspace.app.packager.Packager.replace(Packager.java:737)
      13. org.dspace.app.packager.Packager.main(Packager.java:377)
      13 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:606)
      4 frames
    4. DSpace Kernel :: API and Implementation
      ScriptLauncher.main
      1. org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:227)
      2. org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:79)
      2 frames