-
Bug
-
Resolution: Low Engagement
-
Low
-
None
-
4.10.0
-
Severity 3 - Minor
-
Issue Summary
When adding a custom provider lib for POP/SMTP custom providers as libs to Jira's WEB-INF/lib folder, accessing the E-mail requests project administration page of a JSD project and trying to add a new email configuration, an error message is shown saying that the provider could not be found, blocking the operation. The same issue is not present in Jira's incoming email configuration UI.
Steps to Reproduce
- Add a custom provider example lib to Jira's WEB-INF/lib folder (attached to this ticket)
- Restart Jira
- Access the Email requests project admin page on a JSD project
- Try to create a new email configuration with basic authentication
Expected Results
Email configuration created.
Actual Results
An error message is shown, and an exception is thrown at the logs
[c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: javax.mail.Provider: Provider net.savignano.snotify.jira.mailer.provider.SnotifySmtpProvider not found java.util.ServiceConfigurationError: javax.mail.Provider: Provider net.savignano.snotify.jira.mailer.provider.SnotifySmtpProvider not found at java.util.ServiceLoader.fail(ServiceLoader.java:239) at java.util.ServiceLoader.access$300(ServiceLoader.java:185) at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:372) at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404) at java.util.ServiceLoader$1.next(ServiceLoader.java:480) at javax.mail.Session.loadProviders(Session.java:964) at javax.mail.Session.<init>(Session.java:254) at javax.mail.Session.getInstance(Session.java:281) at com.atlassian.mail.server.managers.AbstractMailServerManager.getSession(AbstractMailServerManager.java:56) at com.atlassian.jira.internal.mail.processor.util.MailHelper.getSession(MailHelper.java:48) at com.atlassian.jira.internal.mail.processor.feature.channel.connectionverifier.DefaultChannelConnectionVerifier.verifyConnectionDefinition(DefaultChannelConnectionVerifier.java:70) at com.atlassian.jira.internal.mail.processor.feature.channel.connectionverifier.DefaultChannelConnectionVerifier.verifyConnectionDefinition(DefaultChannelConnectionVerifier.java:58) ... 3 filtered at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) at com.sun.proxy.$Proxy3383.verifyConnectionDefinition(Unknown Source) at com.atlassian.servicedesk.internal.feature.emailchannel.healer.EmailChannelVerificationManager.lambda$testEmailChannel$0(EmailChannelVerificationManager.java:33) at io.atlassian.fugue.Either$RightProjection.flatMap(Either.java:937) at io.atlassian.fugue.Either.flatMap(Either.java:231) at com.atlassian.pocketknife.step.EitherStep1.then(EitherStep1.java:18) at com.atlassian.servicedesk.internal.feature.emailchannel.healer.EmailChannelVerificationManager.testEmailChannel(EmailChannelVerificationManager.java:33) at com.atlassian.servicedesk.internal.feature.emailchannel.healer.EmailChannelVerificationService.testEmailChannel(EmailChannelVerificationService.java:40) at com.atlassian.servicedesk.internal.rest.emailchannel.GlobalEmailChannelResource.testEmailChannel(GlobalEmailChannelResource.java:100) at com.atlassian.pocketknife.step.EitherStep3.lambda$null$6(EitherStep3.java:38) at io.atlassian.fugue.Either$RightProjection.map(Either.java:923) at io.atlassian.fugue.Either.map(Either.java:217) at com.atlassian.pocketknife.step.EitherStep3.lambda$null$7(EitherStep3.java:38) at io.atlassian.fugue.Either$RightProjection.flatMap(Either.java:937) at io.atlassian.fugue.Either.flatMap(Either.java:231) at com.atlassian.pocketknife.step.EitherStep3.lambda$yield$8(EitherStep3.java:38) at io.atlassian.fugue.Either$RightProjection.flatMap(Either.java:937) at io.atlassian.fugue.Either.flatMap(Either.java:231) at com.atlassian.pocketknife.step.EitherStep3.yield(EitherStep3.java:38) at com.atlassian.servicedesk.internal.rest.emailchannel.GlobalEmailChannelResource.testEmailServer(GlobalEmailChannelResource.java:72) ... 3 filtered at java.lang.reflect.Method.invoke(Method.java:498) ... 19 filtered at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:160) ... 1 filtered at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:70) ... 32 filtered at com.atlassian.servicedesk.internal.web.ExternalCustomerLockoutFilter.doFilter(ExternalCustomerLockoutFilter.java:55) ... 4 filtered at com.atlassian.servicedesk.internal.web.UrlOperationalStatusCheckFilter.doFilterWhenLicensed(UrlOperationalStatusCheckFilter.java:39) at com.atlassian.servicedesk.internal.web.OperationalStatusAwareHttpFilter.doFilter(OperationalStatusAwareHttpFilter.java:28) ... 4 filtered at com.atlassian.servicedesk.internal.web.PopulateEyeballForRestFilter.doFilterWhenLicensed(PopulateEyeballForRestFilter.java:36) at com.atlassian.servicedesk.internal.web.OperationalStatusAwareHttpFilter.doFilter(OperationalStatusAwareHttpFilter.java:28) ... 8 filtered at com.atlassian.jira.plugin.mobile.web.filter.MobileAppRequestFilter.doFilter(MobileAppRequestFilter.java:59) ... 4 filtered at com.atlassian.jira.plugin.mobile.login.MobileLoginSuccessFilter.doFilter(MobileLoginSuccessFilter.java:54) ... 3 filtered at com.atlassian.diagnostics.internal.platform.monitor.http.HttpRequestMonitoringFilter.doFilter(HttpRequestMonitoringFilter.java:55) ... 8 filtered at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21) ... 43 filtered at com.atlassian.ratelimiting.internal.filter.RateLimitFilter.doFilter(RateLimitFilter.java:73) ... 17 filtered at com.atlassian.jira.security.JiraSecurityFilter.lambda$doFilter$0(JiraSecurityFilter.java:66) ... 1 filtered at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:64) ... 16 filtered at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:38) ... 19 filtered at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30) ... 5 filtered at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.lambda$invokeFilterChain$0(CustomerContextSettingFilter.java:215) at com.atlassian.servicedesk.internal.api.util.context.ReentrantThreadLocalBasedCodeContext.rteInvoke(ReentrantThreadLocalBasedCodeContext.java:136) at com.atlassian.servicedesk.internal.api.util.context.ReentrantThreadLocalBasedCodeContext.runOutOfContext(ReentrantThreadLocalBasedCodeContext.java:89) at com.atlassian.servicedesk.internal.utils.context.CustomerContextServiceImpl.runOutOfCustomerContext(CustomerContextServiceImpl.java:47) at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.outOfCustomerContext(CustomerContextSettingFilter.java:206) at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilterImpl(CustomerContextSettingFilter.java:134) at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilter(CustomerContextSettingFilter.java:123) ... 4 filtered at com.atlassian.jwt.internal.servlet.JwtAuthFilter.doFilter(JwtAuthFilter.java:37) ... 8 filtered at com.atlassian.ratelimiting.internal.filter.RateLimitPreAuthFilter.doFilter(RateLimitPreAuthFilter.java:71) ... 3 filtered at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21) ... 4 filtered at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:36) ... 26 filtered at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25) ... 25 filtered at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748)
Workaround
The developers of the plugin that notified us of the bug could work around the problem with the following strategy:
The workaround is to delete the javax.mail.Provider file, so the provider classes are no longer registered and those not instantiated. Instead, we use the old way of having a javamail.providers file in the Meta-Inf directory, which describes from where to load the store/transport classes directly, skipping the whole provider classes.
- links to
Form Name |
---|