Project

General

Profile

Bug #8735

NPE in IndexTask causes indexing job to fail

Added by Rob Nahf about 6 years ago. Updated about 6 years ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
d1_indexer
Target version:
Start date:
2018-10-18
Due date:
% Done:

30%

Milestone:
None
Product Version:
*
Story Points:
Sprint:

Description

the isArchived() method calls a method that can return null, and doesn't check for null values before using it.

(IndexTask is in d1_cn_common component)

Associated revisions

Revision 19379
Added by Rob Nahf about 6 years ago

refs #8735: limiting the scope of the unMarshallSystemMetadata method, because it isn't documented and swallows serious errors. (Shouldn't be generally used)

Revision 19379
Added by Rob Nahf about 6 years ago

refs #8735: limiting the scope of the unMarshallSystemMetadata method, because it isn't documented and swallows serious errors. (Shouldn't be generally used)

History

#1 Updated by Rob Nahf about 6 years ago

here's an abbreviated stack trace

[ERROR] 2018-10-18 14:37:55,117 (IndexTask:unMarshalSystemMetadata:223) 
org.dataone.exceptions.MarshallingException
    at org.dataone.service.util.TypeMarshaller.unmarshalTypeFromStream(TypeMarshaller.java:299)
    at org.dataone.cn.index.task.IndexTask.unMarshalSystemMetadata(IndexTask.java:215)
    at org.dataone.cn.index.task.IndexTask.isArchived(IndexTask.java:253)
    at org.dataone.cn.index.task.IndexTask.isDeleteTask(IndexTask.java:267)
    at org.dataone.cn.index.processor.IndexTaskProcessor.getNextIndexTask(IndexTaskProcessor.java:623)
    at org.dataone.cn.index.processor.IndexTaskProcessor.processFailedIndexTaskQueue(IndexTaskProcessor.java:226)
    at org.dataone.cn.index.processor.IndexTaskProcessor.processIndexTaskQueue(IndexTaskProcessor.java:192)
    at org.dataone.cn.index.processor.IndexTaskProcessorJob.execute(IndexTaskProcessorJob.java:57)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
Caused by: javax.xml.bind.UnmarshalException
 - with linked exception:
[org.xml.sax.SAXParseException; Premature end of file.]
    at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:335)
    at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(UnmarshallerImpl.java:563)
    at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:249)
    at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:214)
    at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:157)
    at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:204)
    at org.dataone.service.util.TypeMarshaller.unmarshalTypeFromStream(TypeMarshaller.java:297)
    ... 9 more
Caused by: org.xml.sax.SAXParseException; Premature end of file.
    at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
         ........
    ... 13 more
[ERROR] 2018-10-18 14:37:55,118 (JobRunShell:run:222) Job d1-cn-index-processor.d1-index-processor-job threw an unhandled Exception: 
java.lang.NullPointerException
[ERROR] 2018-10-18 14:37:55,119 (ErrorLogger:schedulerError:2360) Job (d1-cn-index-processor.d1-index-processor-job threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.NullPointerException]
    at org.quartz.core.JobRunShell.run(JobRunShell.java:224)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
Caused by: java.lang.NullPointerException

#2 Updated by Rob Nahf about 6 years ago

  • % Done changed from 0 to 30
  • Status changed from New to In Progress

catching the null systemmetadata error properly requires us to make decisions about what to do with a task when we don't know whether it is archived or not.

isArchived itself it a private method that is called only by isDeleteTask. We plan to keep archived objects in the index, so hold off trying to fix this now, as it will go away soon.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 14.8 MB)