java.lang.NullPointerException

Atlassian JIRA | Ibrahim Labras [Atlassian] | 2 years ago
  1. 0

    h4.Summary: An e-mail that is send to the JIRA Service Desk e-mail channel will fail if the e-mail has another e-mail attached to it in the .msg format. This occurs on windows with Service Desk 2.3.5. h4.Steps to Reproduce: # Save an e-mail and attach it to another e-mail # Send this message with the attached e-mail to the e-mail channel h4.Expected Results: Issue is created from e-mail h4.Actual Results: Error is thrown in atlassian-jira-incoming-mail.log: {code}2015-04-17 21:31:39,416 ERROR [] atlassian-scheduler-quartz1.clustered_Worker-3 anonymous    Exception when MailHandlerWorker handles message: java.lang.NullPointerException at javax.mail.internet.MimeUtility.decodeText(MimeUtility.java:573) at com.atlassian.servicedesk.squalor.email.ServiceDeskMailUtils.addAttachments(ServiceDeskMailUtils.java:310) at com.atlassian.servicedesk.squalor.email.ServiceDeskMailUtils.getAttachments(ServiceDeskMailUtils.java:260){code} h4.Notes: * The message we have tested it with had a nested attachment (xls format) within the attached e-mail .msg file. * The same error also happens with .eml as attached files * The problem seems to be more related with the email client being used than the message attached. From the tests, the problem happens only with Outlook and does not happen with Gmail and the Mac OS X Mail client. * The same error will happens as well for Email that is coming from Open Technology Real Service(OTRS). [OTRS Email Settings|https://otrs.github.io/doc/manual/admin/stable/en/html/email-settings.html#email] * The same behaviour also occurs when using Novel Groupwise and both e-mails are from the same domain and this can be avoided using POP instead of IMAP. * Another one confirmed for an email that is coming from IBM Notes 9. * Airmail is also confirmed having the same error. * Zarafa is confirmed having the same error.

    Atlassian JIRA | 2 years ago | Ibrahim Labras
    java.lang.NullPointerException
  2. 0

    h4.Summary: An e-mail that is send to the JIRA Service Desk e-mail channel will fail if the e-mail has another e-mail attached to it in the .msg format. This occurs on windows with Service Desk 2.3.5. h4.Steps to Reproduce: # Save an e-mail and attach it to another e-mail # Send this message with the attached e-mail to the e-mail channel h4.Expected Results: Issue is created from e-mail h4.Actual Results: Error is thrown in atlassian-jira-incoming-mail.log: {code}2015-04-17 21:31:39,416 ERROR [] atlassian-scheduler-quartz1.clustered_Worker-3 anonymous    Exception when MailHandlerWorker handles message: java.lang.NullPointerException at javax.mail.internet.MimeUtility.decodeText(MimeUtility.java:573) at com.atlassian.servicedesk.squalor.email.ServiceDeskMailUtils.addAttachments(ServiceDeskMailUtils.java:310) at com.atlassian.servicedesk.squalor.email.ServiceDeskMailUtils.getAttachments(ServiceDeskMailUtils.java:260){code} h4.Notes: * The message we have tested it with had a nested attachment (xls format) within the attached e-mail .msg file. * The same error also happens with .eml as attached files * The problem seems to be more related with the email client being used than the message attached. From the tests, the problem happens only with Outlook and does not happen with Gmail and the Mac OS X Mail client. * The same error will happens as well for Email that is coming from Open Technology Real Service(OTRS). [OTRS Email Settings|https://otrs.github.io/doc/manual/admin/stable/en/html/email-settings.html#email] * The same behaviour also occurs when using Novel Groupwise and both e-mails are from the same domain and this can be avoided using POP instead of IMAP. * Another one confirmed for an email that is coming from IBM Notes 9. * Airmail is also confirmed having the same error. * Zarafa is confirmed having the same error.

    Atlassian JIRA | 2 years ago | Ibrahim Labras [Atlassian]
    java.lang.NullPointerException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Steps to reproduce: # Create service desk project # Create E-mail Channel # Send e-mail to create issue in Service Desk Project # Reply to issue notification from agent e-mail from gmail web account. Results in log: {no format} [mail.incoming.jepp.processor] Exception when MailHandlerWorker handles message: java.lang.NullPointerException at javax.mail.internet.MimeUtility.decodeText(MimeUtility.java:573) at com.atlassian.servicedesk.squalor.email.ServiceDeskMailUtils.addAttachments(ServiceDeskMailUtils.java:310) at com.atlassian.servicedesk.squalor.email.ServiceDeskMailUtils.getAttachments(ServiceDeskMailUtils.java:260) at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailManager.addCommentAndParticipantsFromEmail(IncomingEmailManager.scala:98) at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailService$$anonfun$com$$$$$232a9741555606649ac4fec7538fd7$$$$anonfun$apply$23$$anonfun$apply$24.apply(IncomingEmailService.scala:144) at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailService$$anonfun$com$$$$$232a9741555606649ac4fec7538fd7$$$$anonfun$apply$23$$anonfun$apply$24.apply(IncomingEmailService.scala:144) at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailService$$anonfun$com$$$$$cd2731b58a8142effad79be1482acd$$$$inEmailContext$1$$anonfun$apply$26.apply(IncomingEmailService.scala:164) at com.atlassian.servicedesk.internal.utils.context.PortalContextUtil$.inPortalContext(PortalContextUtil.scala:23) at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailService$$anonfun$com$atlassian$servicedesk$internal$feature$emailchannel$IncomingEmailService$$inEmailContext$1.apply(IncomingEmailService.scala:163) at com.atlassian.servicedesk.internal.utils.context.AuthenticationContextUtil$.runAsUser(AuthenticationContextUtil.scala:15) at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailService.com$atlassian$servicedesk$internal$feature$emailchannel$IncomingEmailService$$inEmailContext(IncomingEmailService.scala:161) at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailService$$anonfun$com$$$$$7525f2ffb11794ac33655698263f5c44$$$$addCommentAndParticipantsToIssue$1$$anonfun$apply$23.apply(IncomingEmailService.scala:142) at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailService$$anonfun$com$$$$$7525f2ffb11794ac33655698263f5c44$$$$addCommentAndParticipantsToIssue$1$$anonfun$apply$23.apply(IncomingEmailService.scala:141) at scalaz.$bslash$div$class.flatMap(Either.scala:117) at scalaz.$bslash$div$minus.flatMap(Either.scala:283) at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailService$$anonfun$com$$$$$7525f2ffb11794ac33655698263f5c44$$$$addCommentAndParticipantsToIssue$1.apply(IncomingEmailService.scala:141) at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailService$$anonfun$com$$$$$7525f2ffb11794ac33655698263f5c44$$$$addCommentAndParticipantsToIssue$1.apply(IncomingEmailService.scala:140) at scalaz.$bslash$div$class.flatMap(Either.scala:117) at scalaz.$bslash$div$minus.flatMap(Either.scala:283) at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailService.com$atlassian$servicedesk$internal$feature$emailchannel$IncomingEmailService$$addCommentAndParticipantsToIssue(IncomingEmailService.scala:140) at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailService$$anonfun$addCommentByChannelKey$1.apply(IncomingEmailService.scala:133) at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailService$$anonfun$addCommentByChannelKey$1.apply(IncomingEmailService.scala:132) at scalaz.$bslash$div$class.flatMap(Either.scala:117) at scalaz.$bslash$div$minus.flatMap(Either.scala:283) at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailService.addCommentByChannelKey(IncomingEmailService.scala:132) at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailService.processEmail(IncomingEmailService.scala:76) at com.atlassian.servicedesk.internal.feature.emailchannel.emailplatform.handler.SDMailHandler.processMessage(SDMailHandler.scala:41) at com.atlassian.servicedesk.internal.feature.emailchannel.emailplatform.handler.SDMailHandler.handleReplyMessage(SDMailHandler.scala:29) at com.atlassian.jira.internal.mail.processor.feature.processor.MailHandlerWorker.handle(MailHandlerWorker.java:59) at com.atlassian.jira.internal.mail.processor.feature.processor.MailProcessorWorker.processMailItem(MailProcessorWorker.java:149) at com.atlassian.jira.internal.mail.processor.feature.processor.MailProcessorWorker.process(MailProcessorWorker.java:83) at com.atlassian.jira.internal.mail.processor.feature.processor.MailProcessorService.run(MailProcessorService.java:41) at com.atlassian.jira.internal.mail.processor.services.MailProcessorExecutor.run(MailProcessorExecutor.java:34) at com.atlassian.jira.internal.mail.processor.services.AbstractMailExecutor.execute(AbstractMailExecutor.java:48) at com.atlassian.jira.internal.mail.processor.services.MailJobRunner.runJob(MailJobRunner.java:38) at com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:135) at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:101) at com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:80) at com.atlassian.scheduler.quartz1.Quartz1Job.execute(Quartz1Job.java:32) at org.quartz.core.JobRunShell.run(JobRunShell.java:223) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) {noformat} *Things to note*: # If you change the agents profile within JIRA to use plain text instead of html format it processes fine. # The html text processes file. It's the Jira branded img/png files that causes the null pointer on the reply to the issue notification. More specifically in ServiceDeskMailUtils ( javax.mail.BodyPart) contact seems to be empty. !ContentNull.png|thumbnail! It seems the content is null. Looking at the exact section of images its failing. It's the quoted text that is put into png format from the initial notification !Replyimage.png|thumbnail! *Possible Cause:* The mail client displays the attached file within the message body in HTML that refers to an image that’s isn't in the message itself. It instead references a URL.

    Atlassian JIRA | 2 years ago | Ramiro Castro
    java.lang.NullPointerException
  5. 0

    Steps to reproduce: # Create service desk project # Create E-mail Channel # Send e-mail to create issue in Service Desk Project # Reply to issue notification from agent e-mail from gmail web account. Results in log: {no format} [mail.incoming.jepp.processor] Exception when MailHandlerWorker handles message: java.lang.NullPointerException at javax.mail.internet.MimeUtility.decodeText(MimeUtility.java:573) at com.atlassian.servicedesk.squalor.email.ServiceDeskMailUtils.addAttachments(ServiceDeskMailUtils.java:310) at com.atlassian.servicedesk.squalor.email.ServiceDeskMailUtils.getAttachments(ServiceDeskMailUtils.java:260) at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailManager.addCommentAndParticipantsFromEmail(IncomingEmailManager.scala:98) at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailService$$anonfun$com$$$$$232a9741555606649ac4fec7538fd7$$$$anonfun$apply$23$$anonfun$apply$24.apply(IncomingEmailService.scala:144) at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailService$$anonfun$com$$$$$232a9741555606649ac4fec7538fd7$$$$anonfun$apply$23$$anonfun$apply$24.apply(IncomingEmailService.scala:144) at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailService$$anonfun$com$$$$$cd2731b58a8142effad79be1482acd$$$$inEmailContext$1$$anonfun$apply$26.apply(IncomingEmailService.scala:164) at com.atlassian.servicedesk.internal.utils.context.PortalContextUtil$.inPortalContext(PortalContextUtil.scala:23) at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailService$$anonfun$com$atlassian$servicedesk$internal$feature$emailchannel$IncomingEmailService$$inEmailContext$1.apply(IncomingEmailService.scala:163) at com.atlassian.servicedesk.internal.utils.context.AuthenticationContextUtil$.runAsUser(AuthenticationContextUtil.scala:15) at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailService.com$atlassian$servicedesk$internal$feature$emailchannel$IncomingEmailService$$inEmailContext(IncomingEmailService.scala:161) at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailService$$anonfun$com$$$$$7525f2ffb11794ac33655698263f5c44$$$$addCommentAndParticipantsToIssue$1$$anonfun$apply$23.apply(IncomingEmailService.scala:142) at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailService$$anonfun$com$$$$$7525f2ffb11794ac33655698263f5c44$$$$addCommentAndParticipantsToIssue$1$$anonfun$apply$23.apply(IncomingEmailService.scala:141) at scalaz.$bslash$div$class.flatMap(Either.scala:117) at scalaz.$bslash$div$minus.flatMap(Either.scala:283) at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailService$$anonfun$com$$$$$7525f2ffb11794ac33655698263f5c44$$$$addCommentAndParticipantsToIssue$1.apply(IncomingEmailService.scala:141) at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailService$$anonfun$com$$$$$7525f2ffb11794ac33655698263f5c44$$$$addCommentAndParticipantsToIssue$1.apply(IncomingEmailService.scala:140) at scalaz.$bslash$div$class.flatMap(Either.scala:117) at scalaz.$bslash$div$minus.flatMap(Either.scala:283) at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailService.com$atlassian$servicedesk$internal$feature$emailchannel$IncomingEmailService$$addCommentAndParticipantsToIssue(IncomingEmailService.scala:140) at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailService$$anonfun$addCommentByChannelKey$1.apply(IncomingEmailService.scala:133) at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailService$$anonfun$addCommentByChannelKey$1.apply(IncomingEmailService.scala:132) at scalaz.$bslash$div$class.flatMap(Either.scala:117) at scalaz.$bslash$div$minus.flatMap(Either.scala:283) at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailService.addCommentByChannelKey(IncomingEmailService.scala:132) at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailService.processEmail(IncomingEmailService.scala:76) at com.atlassian.servicedesk.internal.feature.emailchannel.emailplatform.handler.SDMailHandler.processMessage(SDMailHandler.scala:41) at com.atlassian.servicedesk.internal.feature.emailchannel.emailplatform.handler.SDMailHandler.handleReplyMessage(SDMailHandler.scala:29) at com.atlassian.jira.internal.mail.processor.feature.processor.MailHandlerWorker.handle(MailHandlerWorker.java:59) at com.atlassian.jira.internal.mail.processor.feature.processor.MailProcessorWorker.processMailItem(MailProcessorWorker.java:149) at com.atlassian.jira.internal.mail.processor.feature.processor.MailProcessorWorker.process(MailProcessorWorker.java:83) at com.atlassian.jira.internal.mail.processor.feature.processor.MailProcessorService.run(MailProcessorService.java:41) at com.atlassian.jira.internal.mail.processor.services.MailProcessorExecutor.run(MailProcessorExecutor.java:34) at com.atlassian.jira.internal.mail.processor.services.AbstractMailExecutor.execute(AbstractMailExecutor.java:48) at com.atlassian.jira.internal.mail.processor.services.MailJobRunner.runJob(MailJobRunner.java:38) at com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:135) at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:101) at com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:80) at com.atlassian.scheduler.quartz1.Quartz1Job.execute(Quartz1Job.java:32) at org.quartz.core.JobRunShell.run(JobRunShell.java:223) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) {noformat} *Things to note*: # If you change the agents profile within JIRA to use plain text instead of html format it processes fine. # The html text processes file. It's the Jira branded img/png files that causes the null pointer on the reply to the issue notification. More specifically in ServiceDeskMailUtils ( javax.mail.BodyPart) contact seems to be empty. !ContentNull.png|thumbnail! It seems the content is null. Looking at the exact section of images its failing. It's the quoted text that is put into png format from the initial notification !Replyimage.png|thumbnail! *Possible Cause:* The mail client displays the attached file within the message body in HTML that refers to an image that’s isn't in the message itself. It instead references a URL.

    Atlassian JIRA | 2 years ago | Ramiro Castro
    java.lang.NullPointerException

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at javax.mail.internet.MimeUtility.decodeText()
    2. JavaMail API
      MimeUtility.decodeText
      1. javax.mail.internet.MimeUtility.decodeText(MimeUtility.java:573)
      1 frame
    3. com.atlassian.servicedesk
      ServiceDeskMailUtils.addAttachments
      1. com.atlassian.servicedesk.squalor.email.ServiceDeskMailUtils.addAttachments(ServiceDeskMailUtils.java:310)
      1 frame