M
M
Mark Ivanych2017-12-02 14:04:11
Java
Mark Ivanych, 2017-12-02 14:04:11

Springm Java Mail and Jetty - where does NoClassDefFoundError: javax/activation/DataHandler come from?

No way to overcome this error.
in pom

<dependency>
    <groupId>com.sun.mail</groupId>
    <artifactId>javax.mail</artifactId>
    <version>1.6.0</version>
</dependency>

I tried different versions, I do WAR, I throw it into Tomcat on the laptop, everything works, mail is sent. I throw the same varnik on the server with freshly installed ubuntu 16, java 9, jetty 9 letters do not want to be sent, I get an error:
org.springframework.web.util.NestedServletException: 
Handler dispatch failed; nested exception is 
java.lang.NoClassDefFoundError: javax/activation/DataHandler at 
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1006) ~[spring-webmvc-5.0.1.RELEASE.jar:5.0.1.RELEASE]

This lib also has WEB-INF/lib/activation-1.1.jar
What else is it missing?
I installed Tomcat9 on the server, everything works, I will have to abandon Jetty due to incomprehensible bugs (

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question