Uploaded image for project: 'Oozie'
  1. Oozie
  2. OOZIE-1835

NullPointerException from SLAEmailEventListener

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.0.0
    • Fix Version/s: 4.1.0
    • Component/s: core
    • Labels:
      None

      Description

      Both the documentation and specification say that the "alert-contact" SLA field is optional, at least when you don't want to send email notifications. However, if you don't include it, you get a NullPointerException (though it doesn't seem to cause any problems):

      2014-04-17 22:02:16,664 ERROR org.apache.oozie.sla.listener.SLAEmailEventListener: SERVER[rkanter-5.ent.cloudera.com] USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] Failed to send EndMiss alert email
      java.lang.NullPointerException
              at org.apache.oozie.sla.listener.SLAEmailEventListener.parseAddress(SLAEmailEventListener.java:231)
              at org.apache.oozie.sla.listener.SLAEmailEventListener.setMessageHeader(SLAEmailEventListener.java:262)
              at org.apache.oozie.sla.listener.SLAEmailEventListener.sendSLAEmail(SLAEmailEventListener.java:163)
              at org.apache.oozie.sla.listener.SLAEmailEventListener.onEndMiss(SLAEmailEventListener.java:200)
              at org.apache.oozie.service.EventHandlerService$EventWorker.invokeSLAEventListener(EventHandlerService.java:297)
              at org.apache.oozie.service.EventHandlerService$EventWorker.run(EventHandlerService.java:241)
              at org.apache.oozie.service.SchedulerService$2.run(SchedulerService.java:174)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
              at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
              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:744)
      

      We should give a friendlier WARN message instead.

        Attachments

        1. OOZIE-1835.patch
          3 kB
          Robert Kanter

          Activity

            People

            • Assignee:
              rkanter Robert Kanter
              Reporter:
              rkanter Robert Kanter
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: