mirror of
https://github.com/alanorth/cgspace-notes.git
synced 2025-01-27 05:49:12 +01:00
Add notes for 2020-06-02
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "June, 2020"
|
||||
date: 2020-05-01T13:55:39+03:00
|
||||
date: 2020-06-01T13:55:39+03:00
|
||||
author: "Alan Orth"
|
||||
categories: ["Notes"]
|
||||
---
|
||||
@ -38,4 +38,48 @@ java.lang.NullPointerException
|
||||
at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:81)
|
||||
```
|
||||
|
||||
## 2020-06-02
|
||||
|
||||
- I noticed that I was able to do a partial OAI import (ie, without `-c`)
|
||||
- Then I tried to clear the OAI Solr core and import, but I get the same error:
|
||||
|
||||
```
|
||||
$ curl http://localhost:8080/solr/oai/update -H "Content-type: text/xml" --data-binary '<delete><query>*:*</query></delete>'
|
||||
$ curl http://localhost:8080/solr/oai/update -H "Content-type: text/xml" --data-binary '<commit />'
|
||||
$ ~/dspace63/bin/dspace oai import
|
||||
OAI 2.0 manager action started
|
||||
...
|
||||
There are no indexed documents, using full import.
|
||||
Full import
|
||||
java.lang.NullPointerException
|
||||
at org.dspace.xoai.app.XOAI.willChangeStatus(XOAI.java:438)
|
||||
at org.dspace.xoai.app.XOAI.index(XOAI.java:368)
|
||||
at org.dspace.xoai.app.XOAI.index(XOAI.java:280)
|
||||
at org.dspace.xoai.app.XOAI.indexAll(XOAI.java:227)
|
||||
at org.dspace.xoai.app.XOAI.index(XOAI.java:143)
|
||||
at org.dspace.xoai.app.XOAI.main(XOAI.java:560)
|
||||
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)
|
||||
```
|
||||
|
||||
- I found a [bug report on DSpace Jira](https://jira.lyrasis.org/browse/DS-4363) describing this issue affecting someone else running DSpace 6.3
|
||||
- They suspect it has to do with the item having some missing group names in its authorization policies
|
||||
- I added some debugging to `dspace-oai/src/main/java/org/dspace/xoai/app/XOAI.java` to print the Handle of the item that causes the crash and then I looked at its authorization policies
|
||||
- Indeed there are some blank group names:
|
||||
|
||||

|
||||
|
||||
- The same item on CGSpace (DSpace 5.8) also has groups with no name:
|
||||
|
||||

|
||||
|
||||
- I added some debugging and found exactly where this happens
|
||||
- As it turns out we can just check if the group policy is null there and it allows the OAI import to proceed
|
||||
- Aaaaand as it turns out, this was fixed in `dspace-6_x` in 2018 after DSpace 6.3 was released (see [DS-4019](https://jira.lyrasis.org/browse/DS-4019)), so that was a waste of three hours.
|
||||
- I cherry picked 150e83558103ed7f50e8f323b6407b9cbdf33717 into our current `6_x-dev-atmire-modules` branch
|
||||
|
||||
<!-- vim: set sw=2 ts=2: -->
|
||||
|
Reference in New Issue
Block a user