https://issues.apache.org/bugzilla/show_bug.cgi?id=42389


jiro <[EMAIL PROTECTED]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1




--- Comment #1 from jiro <[EMAIL PROTECTED]>  2008-09-30 01:37:35 PST ---
EmailTask is executed by using org.apache.tools.ant.taskdefs.email.Mailer that
has encoding "auto" as default.
If encoding is not specified, org.apache.tools.ant.taskdefs.email.MimeMailer 
is set to the Mailer (when encoding is not "plain").
Because MimeMailer imports javax.mail package that is not bundled with ant-1.7,
linkage error occurs  like below.

    [mail] Class org.apache.tools.ant.taskdefs.email.MimeMailer could not be 
loaded because of an invalid dependency.
    [mail]     at 
org.apache.tools.ant.util.ClasspathUtils.newInstance(ClasspathUtils.java:296)
    [mail]     at 
org.apache.tools.ant.taskdefs.email.EmailTask.execute(EmailTask.java:418)
    [mail]     at 
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    [mail]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)
    [mail]     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [mail]     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [mail]     at java.lang.reflect.Method.invoke(Method.java:585)
    [mail]     at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
    [mail]     at org.apache.tools.ant.Task.perform(Task.java:348)
    [mail]     at org.apache.tools.ant.Target.execute(Target.java:361)
    [mail]     at org.apache.tools.ant.Target.performTasks(Target.java:389)
    [mail]     at 
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
    [mail]     at 
org.apache.tools.ant.Project.executeTarget(Project.java:1304)
    [mail]     at 
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    [mail]     at 
org.apache.tools.ant.Project.executeTargets(Project.java:1186)
    [mail]     at org.apache.tools.ant.Main.runBuild(Main.java:698)
    [mail]     at org.apache.tools.ant.Main.startAnt(Main.java:199)
    [mail]     at 
org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
    [mail]     at 
org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
    [mail] Caused by: java.lang.NoClassDefFoundError: 
javax/mail/MessagingException
    [mail]     at java.lang.Class.forName0(Native Method)
    [mail]     at java.lang.Class.forName(Class.java:242)
    [mail]     at 
org.apache.tools.ant.util.ClasspathUtils.newInstance(ClasspathUtils.java:266)
    [mail]     ... 18 more

I think if you use email task without specify encoding, you must include 
mail.jar in the library classpath.
activation.jar is required also.

See http://ant.apache.org/manual/index.html "Library Dependencies"


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to