java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • When one tries to cancel a job (in this case of type=command), the cancellation (in reading through the code/setting break points) tries to send off a notification email PRIOR to actually killing the process. This means that when email properties are not set up, a NullPointerException ensues, and the location in which it is caught (in IndexServlet's cancelJob method) means that the code that actually kills the process is bypassed completely! (See call stack info below for details) I feel like, ideally, the killing of the job should occur prior to the sending off of the error email (and the email sending should occur in the background as well, so that the UI does not hang while waiting on the SMTP server). This way the email is a notification of WHAT ALREADY HAPPENED rather than what is expected to happen, because in the event that an email gets sent, but for some reason the process doesn't get terminated, then the process may still be running, giving the user a false impression on the status of the job. Additionally, it'd be nice if the UI did not hang while canceling a job until after the email is sent. Lastly, I think that either your code or your documentation needs to be changed, because this is part of the reason I found this bug in the first place. For instance, nowhere is it mentioned that one should include a "mail.sender" property in the system.properties file, and that it is "notify.emails" that is used for the recipient list (whereas in the documentation it says "success.emails" and "failure.emails"). These type of static property names SHOULD NOT have to be found via digging through the code. Without setting the mail.sender property is what causes this specific exception, but from the documentation I didn't know I even needed to set that property. 10/12/22 10:17:04 ERROR pages.IndexServlet: Exception while attempting to cancel flow 'long-running'. java.lang.NullPointerException at javax.mail.internet.InternetAddress.parse(InternetAddress.java:609) at javax.mail.internet.InternetAddress.parse(InternetAddress.java:569) at javax.mail.internet.InternetAddress.<init>(InternetAddress.java:105) at javax.mail.internet.InternetAddress.<init>(InternetAddress.java:133) at azkaban.app.Mailman.sendEmail(Mailman.java:63) at azkaban.app.Mailman.sendEmailIfPossible(Mailman.java:78) at azkaban.app.Scheduler.sendErrorEmail(Scheduler.java:549) at azkaban.app.Scheduler.access$1000(Scheduler.java:67) at azkaban.app.Scheduler$ScheduledRunnable$1.completed(Scheduler.java:733) at azkaban.flow.IndividualJobExecutableFlow.cancel(IndividualJobExecutableFlow.java:232) at azkaban.flow.WrappingExecutableFlow.cancel(WrappingExecutableFlow.java:38) at azkaban.web.pages.IndexServlet.cancelJob(IndexServlet.java:174) at azkaban.web.pages.IndexServlet.doPost(IndexServlet.java:106) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:636)
    via by Josh Reed,
  • Why are'nt people responding to my query..
    via by Tafadzwa Shelton Sigudu,
  • GitHub comment 5675#227268708
    via GitHub by tarun14110
    ,
    • java.lang.NullPointerException at javax.mail.internet.AddressParser.tokenizeAddress(AddressParser.java:645) at javax.mail.internet.AddressParser.parseAddress(AddressParser.java:113) at javax.mail.internet.InternetAddress.<init>(InternetAddress.java:81) at javax.mail.internet.InternetAddress.<init>(InternetAddress.java:72) at cz.incad.Kramerius.security.userscommands.post.RegisterPublicUser.sendMail(RegisterPublicUser.java:126) at cz.incad.Kramerius.security.userscommands.post.RegisterPublicUser.doCommand(RegisterPublicUser.java:81) at cz.incad.Kramerius.security.UsersServlet$PostCommandsEnum.doAction(UsersServlet.java:138) at cz.incad.Kramerius.security.UsersServlet.doPost(UsersServlet.java:115) at javax.servlet.http.HttpServlet.service(HttpServlet.java:643) at javax.servlet.http.HttpServlet.service(HttpServlet.java:723) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:66) at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118) at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at cz.incad.kramerius.auth.thirdparty.ExtAuthFilter.doFilter(ExtAuthFilter.java:62) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:615) at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:421) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:223) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:311) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:793) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:722) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:915) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) at java.lang.Thread.run(Thread.java:745)
    No Bugmate found.