java. Lang.noclassdeffounderror: javax / mail / messagingexception unresolved
•
Java
I'm trying to javax Mail jar was added to my classpath, but I received this error:
java.lang.NoClassDefFoundError: javax/mail/MessagingException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2663) at java.lang.Class.getDeclaredConstructors(Class.java:2012) at org.springframework.beans.factory.annotation.
I already know in other posts that it is possible to fix adding dependencies to POM XML, so I did it:
POM xml
<dependency> <groupId>javax.mail</groupId> <artifactId>mail</artifactId> <version>1.4.3</version> </dependency>
But I still get wrong Can someone help me with this?
Solution
Also in 1.4 In version 3, there is no longer an artifact ID called mail. If you want to use 1.4 3, this dependency should be used
<dependency> <groupId>javax.mail</groupId> <artifactId>mailapi</artifactId> <version>1.4.3</version> </dependency>
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码