java.lang.AssertionError When Sending Mail Via SMTP

Platform Notice: Cloud and Data Center - This article applies equally to both cloud and data center platforms.

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

When sending mail via SMTP a java.lang.AssertionError occurs. This also happens when trying to send a test e-mail. The following error appears in the log:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2009-10-20 23:10:50,334 [ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)' ERROR admin 83450x240x1 wdyn42 /secure/admin/SendTestMail.jspa [webwork.dispatcher.ServletDispatcher] Could not execute action java.lang.AssertionError at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1578) at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1369) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:412) at javax.mail.Service.connect(Service.java:255) at javax.mail.Service.connect(Service.java:134) at javax.mail.Service.connect(Service.java:86) at javax.mail.Transport.send0(Transport.java:150) at javax.mail.Transport.send(Transport.java:80) at alt.javax.mail.TransportImpl.send(TransportImpl.java:18) at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:177) at com.atlassian.jira.web.action.admin.mail.SendTestMail.doExecute(SendTestMail.java:88) at webwork.action.ActionSupport.execute(ActionSupport.java:153) at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:59) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:141) at com.atlassian.jira.web.dispatcher.JiraServletDispatcher.service(JiraServletDispatcher.java:181)

Cause

The JVM allows you enable or disable the assertions by using the flags -ea / -da. Assertions are mainly for testing purpose and should be disabled in production.

Resolution

Ensure the JVM settings contain -da to disable assertions. See Setting Properties and Options on Startup for instructions.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.