java.lang.reflect.InvocationTargetException

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.

  • LifecycleListener NoClassDefFoundException
    via by shaneb-3081681,
  • Life cycle module prevents server starting
    via by 807581,
  • db:: 4.53::javax.servlet.jsp.tagext.JspTag cp
    via by Unknown author,
  • db:: 4.05::Error 1579 8z
    via by Unknown author,
  • Tomcat5 and precompiling JSPs with Ant
    via by 843836,
  • Very strange classpath issue
    via by rocky1988,
  • Exception from e-mail generation
    via xplanner by rhbauman
    ,
  • 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,
    • java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412) Caused by: java.lang.NoClassDefFoundError: com/sun/appserv/server/LifecycleListener 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$000(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 sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at com.sun.appserv.server.util.ASURLClassLoader.loadClass(ASURLClassLoader.java:144) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at com.sun.enterprise.util.ConnectorClassLoader.loadClass(ConnectorClassLoader.java:187) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at com.sun.appserv.server.ServerLifecycleModule.loadServerLifecycle(ServerLifecycleModule.java:157) at com.sun.appserv.server.LifecycleModuleService$OneTimeIniter.doRun(LifecycleModuleService.java:170) at com.sun.appserv.management.util.misc.RunnableBase.runSync(RunnableBase.java:296) at com.sun.appserv.management.util.misc.RunnableBase.run(RunnableBase.java:330) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619)

    Users with the same issue

    junior_cEngineerjunior_cEngineer
    1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    andyglickandyglick
    2 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    164 more bugmates