java.lang.ClassCastException

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.

  • While attempting to Re-Process an inbound email via the Auditing menu, the reprocessed "inbound" message cannot be processed by JEMH due to object casting issues within JEMH (cannot cast from QPDecoderStream to String). The full stack can be found below: ClassCastException: com.sun.mail.util.QPDecoderStream cannot be cast to java.lang.String: java.lang.ClassCastException: com.sun.mail.util.QPDecoderStream cannot be cast to java.lang.String at com.javahollic.jira.emh.engine.support.EMHMailUtils.getBodyImpl(EMHMailUtils.java:1125) at com.javahollic.jira.emh.engine.support.EMHMailUtils.getBody(EMHMailUtils.java:1000) at com.javahollic.jira.emh.engine.support.EMHMailUtils.getBody(EMHMailUtils.java:994) at com.javahollic.jira.emh.module.msgfilter.CommentCountOrSizeFilter.filter(CommentCountOrSizeFilter.java:53) at com.javahollic.jira.emh.service.FilterManager.applyFilters(FilterManager.java:60) at com.javahollic.jira.emh.service.EnterpriseMessageHandlerImpl.setupHandlerAndFilters(EnterpriseMessageHandlerImpl.java:932) at com.javahollic.jira.emh.service.EnterpriseMessageHandlerImpl.handleMessage(EnterpriseMessageHandlerImpl.java:275) at com.javahollic.jira.emh.service.reprocessing.AuditHistoryNecromancer.reanimate(AuditHistoryNecromancer.java:85) at com.javahollic.jira.emh.service.DefaultJEMHAuditHistoryReprocessingManager.reanimate(DefaultJEMHAuditHistoryReprocessingManager.java:231) at com.javahollic.jira.emh.rest.api.auditing.Auditing.doReanimate(Auditing.java:136) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source)
    via by Operations,
  • While attempting to Re-Process an inbound email via the Auditing menu, the reprocessed "inbound" message cannot be processed by JEMH due to object casting issues within JEMH (cannot cast from QPDecoderStream to String). The full stack can be found below: ClassCastException: com.sun.mail.util.QPDecoderStream cannot be cast to java.lang.String: java.lang.ClassCastException: com.sun.mail.util.QPDecoderStream cannot be cast to java.lang.String at com.javahollic.jira.emh.engine.support.EMHMailUtils.getBodyImpl(EMHMailUtils.java:1125) at com.javahollic.jira.emh.engine.support.EMHMailUtils.getBody(EMHMailUtils.java:1000) at com.javahollic.jira.emh.engine.support.EMHMailUtils.getBody(EMHMailUtils.java:994) at com.javahollic.jira.emh.module.msgfilter.CommentCountOrSizeFilter.filter(CommentCountOrSizeFilter.java:53) at com.javahollic.jira.emh.service.FilterManager.applyFilters(FilterManager.java:60) at com.javahollic.jira.emh.service.EnterpriseMessageHandlerImpl.setupHandlerAndFilters(EnterpriseMessageHandlerImpl.java:932) at com.javahollic.jira.emh.service.EnterpriseMessageHandlerImpl.handleMessage(EnterpriseMessageHandlerImpl.java:275) at com.javahollic.jira.emh.service.reprocessing.AuditHistoryNecromancer.reanimate(AuditHistoryNecromancer.java:85) at com.javahollic.jira.emh.service.DefaultJEMHAuditHistoryReprocessingManager.reanimate(DefaultJEMHAuditHistoryReprocessingManager.java:231) at com.javahollic.jira.emh.rest.api.auditing.Auditing.doReanimate(Auditing.java:136) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source)
    via by Operations,
  • Sometimes in audit i see error: {noformat} ClassCastException: javax.mail.util.SharedByteArrayInputStream cannot be cast to javax.mail.internet.MimeMultipart: java.lang.ClassCastException: javax.mail.util.SharedByteArrayInputStream cannot be cast to javax.mail.internet.MimeMultipart at com.javahollic.jira.emh.engine.support.EMHMailUtils.getBodyImpl(EMHMailUtils.java:977) at com.javahollic.jira.emh.engine.support.EMHMailUtils.getBody(EMHMailUtils.java:831) at com.javahollic.jira.emh.engine.support.EMHMailUtils.getBody(EMHMailUtils.java:825) at com.javahollic.jira.emh.service.filter.CommentCountOrSizeFilter.filter(CommentCountOrSizeFilter.java:70) at com.javahollic.jira.emh.service.FilterManager.applyFilters(FilterManager.java:100) at com.javahollic.jira.emh.service.EnterpriseMessageHandlerImpl.setupHandlerAndFilters(EnterpriseMessageHandlerImpl.java:747) at com.javahollic.jira.emh.service.EnterpriseMessageHandlerImpl.handleMessage(EnterpriseMessageHandlerImpl.java:227) at com.javahollic.jira.emh.service.EnterpriseMessageHandlerProxy.handleMessage(EnterpriseMessageHandlerProxy.java:44) at com.atlassian.jira.service.services.mail.MailFetcherService$1.process(MailFetcherService.java:368) at com.atlassian.jira.service.services.mail.MailFetcherService$MessageProviderImpl.getAndProcessMail(MailFetcherService.java:271) at com.atlassian.jira.service.services.mail.MailFetcherService.runImpl(MailFetcherService.java:356) at com.atlassian.jira.service.services.file.AbstractMessageHandlingService.run(AbstractMessageHandlingService.java:252) at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:61) at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:47) {noformat} But when i try to create test case it creates successfully. I don't understand what is reason File of email what created error is [^jemh-1199.txt]
    via by Vladimir Korobov,
    • java.lang.ClassCastException: com.sun.mail.util.QPDecoderStream cannot be cast to java.lang.String at com.javahollic.jira.emh.engine.support.EMHMailUtils.getBodyImpl(EMHMailUtils.java:1125) at com.javahollic.jira.emh.engine.support.EMHMailUtils.getBody(EMHMailUtils.java:1000) at com.javahollic.jira.emh.engine.support.EMHMailUtils.getBody(EMHMailUtils.java:994) at com.javahollic.jira.emh.module.msgfilter.CommentCountOrSizeFilter.filter(CommentCountOrSizeFilter.java:53) at com.javahollic.jira.emh.service.FilterManager.applyFilters(FilterManager.java:60) at com.javahollic.jira.emh.service.EnterpriseMessageHandlerImpl.setupHandlerAndFilters(EnterpriseMessageHandlerImpl.java:932) at com.javahollic.jira.emh.service.EnterpriseMessageHandlerImpl.handleMessage(EnterpriseMessageHandlerImpl.java:275) at com.javahollic.jira.emh.service.reprocessing.AuditHistoryNecromancer.reanimate(AuditHistoryNecromancer.java:85) at com.javahollic.jira.emh.service.DefaultJEMHAuditHistoryReprocessingManager.reanimate(DefaultJEMHAuditHistoryReprocessingManager.java:231) at com.javahollic.jira.emh.rest.api.auditing.Auditing.doReanimate(Auditing.java:136) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source)
    No Bugmate found.