NULL Pointer Exception when running discover indexing on DSpace 6.3

13 views
Skip to first unread message

Nason Bimbe

unread,
Apr 7, 2022, 10:52:25 AMApr 7
to DSpace Community
When I run index-discovery on a Dspace 6.3 I am getting the NPE recorded in the dspace.log

2022-04-07 14:24:18,309 ERROR org.dspace.discovery.SolrServiceImpl @
java.lang.NullPointerException
        at org.dspace.discovery.SolrServiceResourceRestrictionPlugin.additionalIndex(SolrServiceResourceRestrictionPlugin.java:67)
        at org.dspace.discovery.SolrServiceImpl.buildDocument(SolrServiceImpl.java:856)
        at org.dspace.discovery.SolrServiceImpl.indexContent(SolrServiceImpl.java:245)
        at org.dspace.discovery.SolrServiceImpl.updateIndex(SolrServiceImpl.java:420)
        at org.dspace.discovery.IndexClient.main(IndexClient.java:152)
        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)

Does anyone has an idea what is causing this problem and also how I can resolve it?

Regards
Nason

Nason Bimbe

unread,
Apr 12, 2022, 7:12:41 AMApr 12
to DSpace Community
SOLVED

I went through the code to see where the exception was being thrown (see attached) and noticed the logic was that resource policy has to have a either a group or a person attached which then pointed me to think there could be such a record. Fortunately there was one record in the resourcepolicy table. I have since deleted that record and now discovery indexing is completing successfully.
Screenshot 2022-04-11 125050.png
Reply all
Reply to author
Forward
0 new messages