Jira native mail plugin does not start up after a Jira upgrade

Platform Notice: Data Center Only - This article only applies to Atlassian products 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

Summary

After upgrading Jira to a higher version, Jira native mail plugin and the "Email this issue" plugin fail to start up.

Environment

Jira 9.10.x and later

Diagnosis

The logs show that the native mail plugin is unable to start along with the "email this issue" plugin. Removing the email this issue jar from the plugins folder and restarting Jira does not resolve the issue:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 2023-12-17 05:03:16,959-0800 ThreadPoolAsyncTaskExecutor::Thread 27 ERROR [c.a.p.osgi.factory.OsgiPlugin] Unable to start the plugin container for plugin 'com.atlassian.jira.jira-mail-plugin' org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'messageHandlerFactory-internal': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.atlassian.jira.config.properties.ApplicationProperties' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {} ... Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.atlassian.jira.config.properties.ApplicationProperties' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {} 'com.metainf.jira.plugin.emailissue' - 'Email This Issue Server' failed to load. Application context initialization for 'com.metainf.jira.plugin.emailissue' has timed out waiting for (objectClass=com.atlassian.jira.plugins.mail.internal.MailLoopDetectionService) It has the following missing service dependencies : &mailLoopDetectionService of type (objectClass=com.atlassian.jira.plugins.mail.internal.MailLoopDetectionService) It was loaded from /var/atlassian/application-data/jira/plugins/installed-plugins/plugin.10297645560909082962.emailissue-9.9.0.2-GA.jar 3 plugins are unaccounted for. Unaccounted for plugins load as artifacts but fail to resolve into full plugins.

When "email this issue" and "Enterprise Mail Handler for Jira (JEMH)" are both enabled, and the native Jira Mail plugin is also enabled, then the following is logged when Jira is restarted:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2023-12-19 20:39:34,604+0000 ThreadPoolAsyncTaskExecutor::Thread 41 ERROR [c.a.p.osgi.factory.OsgiPlugin] Unable to start the plugin container for plugin 'com.atlassian.jira.jira-mail-plugin' org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'messageHandlerFactory-internal': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.atlassian.jira.config.properties.ApplicationProperties' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {} at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800) at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:137) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.atlassian.jira.config.properties.ApplicationProperties' available: expected at least 1 bean which qualifies as autowire candidate. Depend ency annotations: {} at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1801) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1357) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311) at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887) at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791) ... 19 more

Cause

The issue is due to be a conflict in beanFactory referenced between "com.atlassian.jira.jira-mail-plugin" and "Enterprise Mail Handler for Jira (JEMH) (version: 4.1.30-DC)" which results in the Jira Mail App becoming disabled.

Solution

  1. Uninstall "Enterprise Mail Handler for Jira (JEMH) (version: 4.1.30-DC)"

  2. Install "Enterprise Mail Handler for Jira (JEMH) (version: 4.1.27-DC)

  3. Restart Jira.

Updated on March 12, 2025

Still need help?

The Atlassian Community is here for you.