This is the code :
Session session = Session.getDefaultInstance(props, null);
Store store = session.getStore(\"imaps\");
store.connect(\"im
I solved a similar NoClassDefFoundError: javax/activation/DataSource problem in a mixed Java/Scala project by switching to Java 8 (it was Java9 by default).
Discussion: https://github.com/highsource/jsonix-schema-compiler/issues/81
I added activation.jar to buildpath and the problem is solved.
So i used 2 jars java-mail-ima.** .jar, activation.jar (for further referebces).
In case you use maven you can add manually
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
</dependency>