TAMULib / SAGE

Search Aggregation Engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NULL Pointers in values when reading from Fedora Repos results in failed Operation.

kaladay opened this issue · comments

Describe the bug

java.util.ConcurrentModificationException 
	at java.base/java.util.ArrayList$Itr.checkForComodification(Unknown Source) 
	at java.base/java.util.ArrayList$Itr.next(Unknown Source) 
	at org.apache.solr.common.SolrInputField.addValue(SolrInputField.java:92) 
	at org.apache.solr.common.SolrInputDocument.addField(SolrInputDocument.java:103) 
	at edu.tamu.sage.service.SimpleProcessorService.lambda$writeSolrCore$1(SimpleProcessorService.java:163) 
	at java.base/java.lang.Iterable.forEach(Unknown Source) 
	at edu.tamu.sage.service.SimpleProcessorService.lambda$writeSolrCore$2(SimpleProcessorService.java:160) 
	at java.base/java.lang.Iterable.forEach(Unknown Source) 
	at edu.tamu.sage.service.SimpleProcessorService.writeSolrCore(SimpleProcessorService.java:157) 
	at edu.tamu.sage.service.SimpleProcessorService.lambda$process$4(SimpleProcessorService.java:230) 
	at java.base/java.lang.Iterable.forEach(Unknown Source) 
	at edu.tamu.sage.service.SimpleProcessorService.lambda$process$5(SimpleProcessorService.java:230) 
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(Unknown Source) 
	at java.base/java.lang.Thread.run(Unknown Source) 

It seems likely that this code is doing only a single NULL check.
There likely needs to be a NULL check on on the value outputMapping.getInputField() or for the map.get().

This happens with bb97f23e-803a-4bd6-8406-06802623554c/berger_cloonan_public_domain-2020-07-30_objects/18 data.

Also consider this issue:

And also, there is metatdata spelling error in the relevant code.

To Reproduce
Steps to reproduce the behavior:

  1. Attempt to read from Fedora pre-production Core into Sage Core.

Expected behavior
No NULL error appear and the Operation completes.