java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Batch update of preferred names for ORCIDs?
    via by Alan Orth,
  • The [documentation for DSpace's ORCID integration|https://wiki.duraspace.org/display/DSDOC5x/ORCID+Integration] mentions that the {{UpdateAuthorities}} script can be used to update the names in authority cache from the ORCID service. When you run the script, it always outputs the following: {code} $ /home/dspace/bin/dspace dsrun org.dspace.authority.UpdateAuthorities 10 authorities found. {code} ... but no records appear to be updated. Also, if you give it a specific ID, it crashes with an null pointer exception: {code} $ /dspace/bin/dspace dsrun org.dspace.authority.UpdateAuthorities -i 58b55f8c-4950-40af-ba58-2fc835eda26f 1 authorities found. Exception: null java.lang.NullPointerException at org.apache.xpath.XPathAPI.eval(XPathAPI.java:231) at org.apache.xpath.XPathAPI.selectNodeList(XPathAPI.java:167) at org.apache.xpath.XPathAPI.selectNodeList(XPathAPI.java:147) at org.dspace.authority.util.XMLUtils.getNodeList(XMLUtils.java:86) at org.dspace.authority.util.XMLUtils.getNodeListIterator(XMLUtils.java:94) at org.dspace.authority.orcid.xml.XMLtoBio.convert(XMLtoBio.java:91) at org.dspace.authority.orcid.Orcid.getBio(Orcid.java:54) at org.dspace.authority.orcid.Orcid.queryAuthorityID(Orcid.java:83) at org.dspace.authority.orcid.OrcidAuthorityValue.newInstance(OrcidAuthorityValue.java:249) at org.dspace.authority.AuthorityValueServiceImpl.generateRaw(AuthorityValueServiceImpl.java:86) at org.dspace.authority.AuthorityValueServiceImpl.update(AuthorityValueServiceImpl.java:100) at org.dspace.authority.UpdateAuthorities.run(UpdateAuthorities.java:135) at org.dspace.authority.UpdateAuthorities.main(UpdateAuthorities.java:66) 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.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:229) at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:81) {code} In a [recent discussion on dspace-tech|https://groups.google.com/forum/#!topic/dspace-tech/do-0D7OsAYU] it seems that this behavior happens on at least DSpace 5.1 and 6.0-rc2.
    via by Alan Orth,
    • java.lang.NullPointerException at org.apache.xpath.XPathAPI.eval(XPathAPI.java:231) at org.apache.xpath.XPathAPI.selectNodeList(XPathAPI.java:167) at org.apache.xpath.XPathAPI.selectNodeList(XPathAPI.java:147) at org.dspace.authority.util.XMLUtils.getNodeList(XMLUtils.java:86) at org.dspace.authority.util.XMLUtils.getNodeListIterator(XMLUtils.java:94) at org.dspace.authority.orcid.xml.XMLtoBio.convert(XMLtoBio.java:91) at org.dspace.authority.orcid.Orcid.getBio(Orcid.java:54) at org.dspace.authority.orcid.Orcid.queryAuthorityID(Orcid.java:83) at org.dspace.authority.orcid.OrcidAuthorityValue.newInstance(OrcidAuthorityValue.java:249) at org.dspace.authority.AuthorityValueServiceImpl.generateRaw(AuthorityValueServiceImpl.java:86) at org.dspace.authority.AuthorityValueServiceImpl.update(AuthorityValueServiceImpl.java:100) at org.dspace.authority.UpdateAuthorities.run(UpdateAuthorities.java:135) at org.dspace.authority.UpdateAuthorities.main(UpdateAuthorities.java:66) 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.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:229) at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:81)
    No Bugmate found.