java.lang.NoClassDefFoundError

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
tip

Look if your classpath is correct, and check if the versions of your libraries match the version you described in your pom.xml

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • Mail notification in a custom project (shell script) fails. It looks like activation.jar is not loaded: Sending e-mails to: xxx@xxx.xxx FATAL: javax/activation/DataContentHandler java.lang.NoClassDefFoundError: javax/activation/DataContentHandler at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1346) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1205) at javax.activation.MailcapCommandMap.getDataContentHandler(MailcapCommandMap.java:590) at javax.activation.MailcapCommandMap.createDataContentHandler(MailcapCommandMap.java: 550) at javax.activation.DataHandler.getDataContentHandler(DataHandler.java:611) at javax.activation.DataHandler.writeTo(DataHandler.java:315) at javax.mail.internet.MimeUtility.getEncoding(MimeUtility.java:248) at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1268) at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:2012) at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:1980) at javax.mail.Transport.send(Transport.java:97) at hudson.tasks.MailSender.execute(MailSender.java:65) at hudson.tasks.Mailer._perform(Mailer.java:73) at hudson.tasks.Mailer.perform(Mailer.java:67) at hudson.model.Build$RunnerImpl.post2(Build.java:138) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:243) at hudson.model.Run.run(Run.java:595) at hudson.model.Build.run(Build.java:103) at hudson.model.ResourceController.execute(ResourceController.java:66) at hudson.model.Executor.run(Executor.java:59)
    via by dhouthoo,
  • Mail notification in a custom project (shell script) fails. It looks like activation.jar is not loaded: Sending e-mails to: xxx@xxx.xxx FATAL: javax/activation/DataContentHandler java.lang.NoClassDefFoundError: javax/activation/DataContentHandler at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1346) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1205) at javax.activation.MailcapCommandMap.getDataContentHandler(MailcapCommandMap.java:590) at javax.activation.MailcapCommandMap.createDataContentHandler(MailcapCommandMap.java: 550) at javax.activation.DataHandler.getDataContentHandler(DataHandler.java:611) at javax.activation.DataHandler.writeTo(DataHandler.java:315) at javax.mail.internet.MimeUtility.getEncoding(MimeUtility.java:248) at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1268) at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:2012) at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:1980) at javax.mail.Transport.send(Transport.java:97) at hudson.tasks.MailSender.execute(MailSender.java:65) at hudson.tasks.Mailer._perform(Mailer.java:73) at hudson.tasks.Mailer.perform(Mailer.java:67) at hudson.model.Build$RunnerImpl.post2(Build.java:138) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:243) at hudson.model.Run.run(Run.java:595) at hudson.model.Build.run(Build.java:103) at hudson.model.ResourceController.execute(ResourceController.java:66) at hudson.model.Executor.run(Executor.java:59)
    via by dhouthoo,
  • Exception from e-mail generation
    via xplanner by rhbauman
    ,
  • Struts2 Hello World jsp example error
    via Stack Overflow by lulu88
    ,
  • integrate gerrit with github
    via by Ameya Varade,
  • Spring Framework 3.0.5 MVC Issue
    via Stack Overflow by eastonw2
    ,
    • java.lang.NoClassDefFoundError: javax/activation/DataContentHandler at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1346) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1205) at javax.activation.MailcapCommandMap.getDataContentHandler(MailcapCommandMap.java:590) at javax.activation.MailcapCommandMap.createDataContentHandler(MailcapCommandMap.java:550) at javax.activation.DataHandler.getDataContentHandler(DataHandler.java:611) at javax.activation.DataHandler.writeTo(DataHandler.java:315) at javax.mail.internet.MimeUtility.getEncoding(MimeUtility.java:248) at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1268) at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:2012) at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:1980) at javax.mail.Transport.send(Transport.java:97) at hudson.tasks.MailSender.execute(MailSender.java:65) at hudson.tasks.Mailer._perform(Mailer.java:73) at hudson.tasks.Mailer.perform(Mailer.java:67) at hudson.model.Build$RunnerImpl.post2(Build.java:138) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:243) at hudson.model.Run.run(Run.java:595) at hudson.model.Build.run(Build.java:103) at hudson.model.ResourceController.execute(ResourceController.java:66) at hudson.model.Executor.run(Executor.java:59)

    Users with the same issue

    junior_cEngineer
    1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    andyglick
    2 times, last one,
    Unknown visitor1 times, last one,
    164 more bugmates