java.lang.ClassNotFoundException: javax.activation.DataHandler Thanks, Patrick On Wed, Jan 19, 2011 at 10:31 AM, Patrick Martin <antuser@gmail.com> wrote: > Hello, > > Is it possible to use the <mail> task without having activation.jar > and mail.jar in the ant lib folder? > > I tried to redefine the mail task this way: > > <taskdef name="mymail" > classname="org.apache.tools.ant.taskdefs.email.MimeMailer"> <classpath>        <pathelement location="${ant.home}/lib/ant-javamail.jar" /> <!-- > same with and without this line -->        <pathelement location="a/mail.jar" />        <pathelement location="a/activation.jar" /> </classpath> > </taskdef> > > But it did not work. I keep on getting the following error: > > D:\tmp\build.xml:7: taskdef A class needed by class > org.apache.tools.ant.taskdefs.email.MimeMailer cannot be found: > javax/mail/MessagingException >  using the classloader AntClassLoader[D:\tmp\a\activation.jar]

ant-user | Patrick Martin | 6 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Re: Mail task with mail.jar & activation.jar out of lib folder

    ant-user | 6 years ago | Patrick Martin
    java.lang.ClassNotFoundException: javax.activation.DataHandler Thanks, Patrick On Wed, Jan 19, 2011 at 10:31 AM, Patrick Martin <antuser@gmail.com> wrote: > Hello, > > Is it possible to use the <mail> task without having activation.jar > and mail.jar in the ant lib folder? > > I tried to redefine the mail task this way: > > <taskdef name="mymail" > classname="org.apache.tools.ant.taskdefs.email.MimeMailer"> <classpath>        <pathelement location="${ant.home}/lib/ant-javamail.jar" /> <!-- > same with and without this line -->        <pathelement location="a/mail.jar" />        <pathelement location="a/activation.jar" /> </classpath> > </taskdef> > > But it did not work. I keep on getting the following error: > > D:\tmp\build.xml:7: taskdef A class needed by class > org.apache.tools.ant.taskdefs.email.MimeMailer cannot be found: > javax/mail/MessagingException >  using the classloader AntClassLoader[D:\tmp\a\activation.jar]
  2. 0

    maven-antrun-plugin and ant basedir question

    apache.org | 2 years ago
    java.lang.ClassNotFoundException: net.sf.saxon.TransformerFactoryImpl (<Unknown source>#52) in <Unknown source> at line number 52
  3. 0

    maven-antrun-plugin and ant basedir question

    apache.org | 2 years ago
    java.lang.ClassNotFoundException: net.sf.saxon.TransformerFactoryImpl (<Unknown source>#52) in <Unknown source> at line number 52
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Maven - Users - maven-antrun-plugin and ant basedir question

    nabble.com | 2 years ago
    java.lang.ClassNotFoundException: net.sf.saxon.TransformerFactoryImpl (<Unknown source>#52) in <Unknown source> at line number 52
  6. 0

    Can't find GrailsCompiler in 2.1.1 project

    Stack Overflow | 2 years ago | MikeHoss
    java.lang.ClassNotFoundException: org.codehaus.groovy.grails.compiler.GrailsCompiler

    Root Cause Analysis

    1. java.lang.ClassNotFoundException

      javax.activation.DataHandler Thanks, Patrick On Wed, Jan 19, 2011 at 10:31 AM, Patrick Martin <antuser@gmail.com> wrote: > Hello, > > Is it possible to use the <mail> task without having activation.jar > and mail.jar in the ant lib folder? > > I tried to redefine the mail task this way: > > <taskdef name="mymail" > classname="org.apache.tools.ant.taskdefs.email.MimeMailer"> <classpath>        <pathelement location="${ant.home}/lib/ant-javamail.jar" /> <!-- > same with and without this line -->        <pathelement location="a/mail.jar" />        <pathelement location="a/activation.jar" /> </classpath> > </taskdef> > > But it did not work. I keep on getting the following error: > > D:\tmp\build.xml:7: taskdef A class needed by class > org.apache.tools.ant.taskdefs.email.MimeMailer cannot be found: > javax/mail/MessagingException >  using the classloader AntClassLoader[D:\tmp\a\activation.jar]

      at org.apache.tools.ant.taskdefs.Definer.addDefinition()
    2. Ant
      UnknownElement.execute
      1. org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:627)
      2. org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:239)
      3. org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
      3 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:585)
      4 frames
    4. Ant
      Main.startAnt
      1. org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      2. org.apache.tools.ant.Task.perform(Task.java:348)
      3. org.apache.tools.ant.Target.execute(Target.java:390)
      4. org.apache.tools.ant.Target.performTasks(Target.java:411)
      5. org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
      6. org.apache.tools.ant.Project.executeTarget(Project.java:1368)
      7. org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
      8. org.apache.tools.ant.Project.executeTargets(Project.java:1251)
      9. org.apache.tools.ant.Main.runBuild(Main.java:809)
      10. org.apache.tools.ant.Main.startAnt(Main.java:217)
      10 frames
    5. Apache Ant Launcher
      Launcher.main
      1. org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
      2. org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
      2 frames