org.dspace.content.crosswalk.CrosswalkInternalException: Failed to export Roles via packager (see wrapped error message for more details)

Sakai JIRA | Tim Donohue | 4 years ago
  1. 0

    If a single user in DSpace happens to have a "null" password (e.g. external authentication system is being used), and the RoleDisseminator is called with "emitPassword=true", then a NullPointerException will occur. For example, passing the "passwords=true" flag to the AIP Packager will result in a NPE if a single user has a null password: dspace packager -d -a -t AIP -e [admin-email] -i 10673/0 -o passwords=true SITE@10673-0.zip Here's the resulting error message: org.dspace.content.crosswalk.CrosswalkInternalException: Failed to export Roles via packager (see wrapped error message for more details) at org.dspace.content.crosswalk.RoleCrosswalk.disseminateElement(RoleCrosswalk.java:234) at org.dspace.content.packager.AbstractMETSDisseminator.crosswalkToMetsElement(AbstractMETSDisseminator.java:135 9) at org.dspace.content.packager.AbstractMETSDisseminator.makeMdSec(AbstractMETSDisseminator.java:614) at org.dspace.content.packager.AbstractMETSDisseminator.addToAmdSec(AbstractMETSDisseminator.java:727) at org.dspace.content.packager.AbstractMETSDisseminator.addAmdSec(AbstractMETSDisseminator.java:753) at org.dspace.content.packager.AbstractMETSDisseminator.makeManifest(AbstractMETSDisseminator.java:839) at org.dspace.content.packager.AbstractMETSDisseminator.writeZipPackage(AbstractMETSDisseminator.java:311) at org.dspace.content.packager.AbstractMETSDisseminator.disseminate(AbstractMETSDisseminator.java:258) at org.dspace.content.packager.DSpaceAIPDisseminator.disseminate(DSpaceAIPDisseminator.java:160) at org.dspace.content.packager.AbstractPackageDisseminator.disseminateAll(AbstractPackageDisseminator.java:86) at org.dspace.app.packager.Packager.disseminate(Packager.java:636) at org.dspace.app.packager.Packager.main(Packager.java:460) 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:601) at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:183) Caused by: org.dspace.content.packager.PackageException: java.lang.NullPointerException, Reason: java.lang.NullPointerEx ception at org.dspace.content.packager.RoleDisseminator.writeToStream(RoleDisseminator.java:257) at org.dspace.content.packager.RoleDisseminator.disseminate(RoleDisseminator.java:108) at org.dspace.content.crosswalk.RoleCrosswalk.disseminateElement(RoleCrosswalk.java:202) ... 16 more Caused by: java.lang.NullPointerException at com.ctc.wstx.sw.BaseStreamWriter.writeCharacters(BaseStreamWriter.java:498) at org.dspace.content.packager.RoleDisseminator.writeEPerson(RoleDisseminator.java:493) at org.dspace.content.packager.RoleDisseminator.writeToStream(RoleDisseminator.java:244) ... 18 more The problem area of the code is here -- it fails to check for a possible null value. https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/content/packager/RoleDisseminator.java#L481

    Sakai JIRA | 4 years ago | Tim Donohue
    org.dspace.content.crosswalk.CrosswalkInternalException: Failed to export Roles via packager (see wrapped error message for more details)
  2. 0

    If a single user in DSpace happens to have a "null" password (e.g. external authentication system is being used), and the RoleDisseminator is called with "emitPassword=true", then a NullPointerException will occur. For example, passing the "passwords=true" flag to the AIP Packager will result in a NPE if a single user has a null password: dspace packager -d -a -t AIP -e [admin-email] -i 10673/0 -o passwords=true SITE@10673-0.zip Here's the resulting error message: org.dspace.content.crosswalk.CrosswalkInternalException: Failed to export Roles via packager (see wrapped error message for more details) at org.dspace.content.crosswalk.RoleCrosswalk.disseminateElement(RoleCrosswalk.java:234) at org.dspace.content.packager.AbstractMETSDisseminator.crosswalkToMetsElement(AbstractMETSDisseminator.java:135 9) at org.dspace.content.packager.AbstractMETSDisseminator.makeMdSec(AbstractMETSDisseminator.java:614) at org.dspace.content.packager.AbstractMETSDisseminator.addToAmdSec(AbstractMETSDisseminator.java:727) at org.dspace.content.packager.AbstractMETSDisseminator.addAmdSec(AbstractMETSDisseminator.java:753) at org.dspace.content.packager.AbstractMETSDisseminator.makeManifest(AbstractMETSDisseminator.java:839) at org.dspace.content.packager.AbstractMETSDisseminator.writeZipPackage(AbstractMETSDisseminator.java:311) at org.dspace.content.packager.AbstractMETSDisseminator.disseminate(AbstractMETSDisseminator.java:258) at org.dspace.content.packager.DSpaceAIPDisseminator.disseminate(DSpaceAIPDisseminator.java:160) at org.dspace.content.packager.AbstractPackageDisseminator.disseminateAll(AbstractPackageDisseminator.java:86) at org.dspace.app.packager.Packager.disseminate(Packager.java:636) at org.dspace.app.packager.Packager.main(Packager.java:460) 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:601) at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:183) Caused by: org.dspace.content.packager.PackageException: java.lang.NullPointerException, Reason: java.lang.NullPointerEx ception at org.dspace.content.packager.RoleDisseminator.writeToStream(RoleDisseminator.java:257) at org.dspace.content.packager.RoleDisseminator.disseminate(RoleDisseminator.java:108) at org.dspace.content.crosswalk.RoleCrosswalk.disseminateElement(RoleCrosswalk.java:202) ... 16 more Caused by: java.lang.NullPointerException at com.ctc.wstx.sw.BaseStreamWriter.writeCharacters(BaseStreamWriter.java:498) at org.dspace.content.packager.RoleDisseminator.writeEPerson(RoleDisseminator.java:493) at org.dspace.content.packager.RoleDisseminator.writeToStream(RoleDisseminator.java:244) ... 18 more The problem area of the code is here -- it fails to check for a possible null value. https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/content/packager/RoleDisseminator.java#L481

    Sakai JIRA | 4 years ago | Tim Donohue
    org.dspace.content.crosswalk.CrosswalkInternalException: Failed to export Roles via packager (see wrapped error message for more details)

    Root Cause Analysis

    1. org.dspace.content.crosswalk.CrosswalkInternalException

      Failed to export Roles via packager (see wrapped error message for more details)

      at org.dspace.content.crosswalk.RoleCrosswalk.disseminateElement()
    2. DSpace Kernel :: API and Implementation
      RoleCrosswalk.disseminateElement
      1. org.dspace.content.crosswalk.RoleCrosswalk.disseminateElement(RoleCrosswalk.java:234)
      1 frame