Job Execution Context map can have a Null values resulting in an error

Description

Job Execution Context map can have a Null keys or values resulting in an error

The method (JpaJobExecution#getJobExecutionContextAsMap()) needs to check for null key entries

2017-12-21 05:19:13 INFO DefaultMessageListenerContainer-1:JpaBatchJobExecutionProvider:384 - Finishing Job: 4190 with a status of: FAILED for event: 49946599
2017-12-21 05:19:13 INFO DefaultMessageListenerContainer-1:JpaBatchStepExecutionProvider:141 - New Step Execution Failed Flow on Job: 4190 using event 49946599
2017-12-21 05:19:13 INFO DefaultMessageListenerContainer-1:NifiBulletinExceptionExtractor:113 - Query for cecf3d5a-3528-4449-88ea-4a2001a08779 bulletins returned 1 results
2017-12-21 05:19:13 WARN DefaultMessageListenerContainer-1:JcrMetadataAccess:249 - Exception while execution a transactional operation - rolling back
java.lang.NullPointerException
at java.util.HashMap.merge(HashMap.java:1224)
at java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1320)
at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at com.thinkbiganalytics.metadata.jpa.jobrepo.job.JpaBatchJobExecution.getJobExecutionContextAsMap(JpaBatchJobExecution.java:348)
at com.thinkbiganalytics.metadata.jpa.jobrepo.job.JpaBatchJobExecutionProvider.notifyFailure(JpaBatchJobExecutionProvider.java:1049)
at com.thinkbiganalytics.metadata.jpa.jobrepo.job.JpaBatchJobExecutionProvider$$FastClassBySpringCGLIB$$54c5346a.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)

Environment

None

Assignee

Scott Reisdorf

Reporter

Scott Reisdorf

Labels

None

Reviewer

None

Story point estimate

None

Sprint

None

Fix versions

Affects versions

Priority

Medium
Configure