Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Error sending mail with Bamboo "NoClassDefFoundError: javax/activation/DataHandler"

When I try to send a test email in the Bamboo 8.1.1 administration, it dislays an exception:

ognl.MethodFailedException: Method "save" failed for object com.atlassian.bamboo.ww2.actions.admin.mail.ConfigureMailServer@58c8309 [java.lang.NoClassDefFoundError: javax/activation/DataHandler]
at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1981)
...
Caused by: java.lang.NoClassDefFoundError: javax/activation/DataHandler
at com.atlassian.mail.server.impl.SMTPMailServerImpl.sendWithMessageId(SMTPMailServerImpl.java:169)
at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:159)
at com.atlassian.bamboo.mail.EmailService.sendEmailSynchronously(EmailService.java:115)
at com.atlassian.bamboo.mail.BambooMailer.send(BambooMailer.java:74)
at com.atlassian.bamboo.ww2.actions.admin.mail.ConfigureMailServer.testSMTPServer(ConfigureMailServer.java:130)
at com.atlassian.bamboo.ww2.actions.admin.mail.ConfigureMailServer.save(ConfigureMailServer.java:172)
...
Caused by: java.lang.ClassNotFoundException: javax.activation.DataHandler
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 302 more

More metadata:

Version: 8.1.1
Build: 80108
Build Date: 14 Dec 2021

Request information:
Request URL: https://bamboo.___.com/admin/saveMailServer.action
Scheme: https
Server: bamboo.dev.___.com
Port: 443
URI: /admin/saveMailServer.action
Context path:
Servlet path: /admin/saveMailServer.action
Path info:
Query string:

I'm on Java 11.0.11. I have moved the mail-1.6.2 and mail-api-1.5.6 from WEB-INF/lib to /lib, as recommended in the guidelines:

./atlassian-bamboo-8.1.1/lib/javax.mail-1.6.2.jar

./atlassian-bamboo-8.1.1/lib/javax.mail-api-1.5.6.jar

./atlassian-bamboo-8.1.1/atlassian-bamboo/WEB-INF/lib/atlassian-mail-5.0.0.jar

./atlassian-bamboo-8.1.1/atlassian-bamboo/WEB-INF/lib/cloud-compatible-email-validation-1.0.2.jar

 and I've configured the admin to use a JNDI mail, but the same thing happens if I type the email parameters manually into the administraiton.

Can anyone help me?

1 answer

0 votes

 

Could you replace

javax.mail-1.6.2.jar

 with next version https://mvnrepository.com/artifact/javax.mail/javax.mail-api/1.5.6

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.1.1
TAGS
Community showcase
Published in Bamboo

Bamboo Data Center on Kubernetes

Hi, If you are running self-managed environments and looking to adopt modern infrastructure, Bamboo Data Center can now be deployed in a Kubernetes cluster. By leveraging Kubernetes, you can easily...

66 views 0 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you