NPE prevents incident logging from succeeding

Steps to reproduce

Twice we have run into errors on a worker node, and the underlying cause is not visible because the incident().recordFailure() code is giving an NPE.

Example strack trace in the logs:

2014-11-03 12:48:29 WARN (ComposerServiceImpl:306) - Error encoding http://mediadev.cet.uct.ac.za/files/mediapackage/25360578/track-3/presentation2.avi and http://mediadev.cet.uct.ac.za/files/mediapackage/25360578/track-1/audio.flac
java.lang.NullPointerException
at org.opencastproject.composer.impl.ComposerServiceImpl.encode(ComposerServiceImpl.java:284)
at org.opencastproject.composer.impl.ComposerServiceImpl.mux(ComposerServiceImpl.java:454)
at org.opencastproject.composer.impl.ComposerServiceImpl.process(ComposerServiceImpl.java:1400)
at org.opencastproject.job.api.AbstractJobProducer$JobRunner.call(AbstractJobProducer.java:202)
at org.opencastproject.job.api.AbstractJobProducer$JobRunner.call(AbstractJobProducer.java:167)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

Line 284 of ComposerServiceImpl is:

incident().recordFailure(job, ENCODING_FAILED, e, params, detailsFor(e, encoderEngine));

We have also seen an NPE from line 1002:

line 1002 in ComposerServiceImpl.java is:

incident().recordFailure(job, WORKSPACE_PUT_COLLECTION_IO_EXCEPTION, e,
getWorkspaceCollectionParams("extracted image file", COLLECTION, output.toURI()), NO_DETAILS);

This is a serious obstacle to QA because the underlying cause of a failure is hidden.

Status

Assignee

RĂ¼diger Rolf

Reporter

Stephen Marquard

Severity

Incorrectly Functioning Without Workaround

Tags (folksonomy)

None

Components

Fix versions

Affects versions

Priority

Critical
Configure