Email Messages Are Not Sent Due to 'java.lang.ClassCastException com.atlassian.confluence.mail.template.ConfluenceMailQueueItem'

Platform Notice: Data Center Only - This article only applies to Atlassian apps on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

  1. One or more mail messages are not being sent.

  2. Indexing has some problem completing, resulting in search inconsistencies and outdated Recently Updated results.

The following appears in the atlassian-confluence.log (or atlassian-confluence-outgoing-mail.log from 7.11)

serviceAction Could not execute action -- url: /admin/mail/resenderrorqueue.action | userName: xxx java.lang.ClassCastException: com.atlassian.confluence.mail.template.ConfluenceMailQueueItem at com.atlassian.confluence.admin.actions.mail.ViewMailQueueAction.doResend(ViewMailQueueAction.java:54) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

Cause

An import of external mailboxes resulted in corrupt email addresses. Notifications are being sent to an invalid address and failing. Valid emails may not be sent until the message with the invalid email is sent.

Resolution

  1. Track down any invalid email addresses by looking in The Mail Queue.

  2. Check for the invalid addresses

  3. Remove the associated queue entries

  4. Flush the mail queue

Updated on September 25, 2025

Still need help?

The Atlassian Community is here for you.