You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2007/12/03 11:11:26 UTC
DO NOT REPLY [Bug 44009] New: - MailLogger failed to send e-mail
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44009>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=44009
Summary: MailLogger failed to send e-mail
Product: Ant
Version: unspecified
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: Optional Tasks
AssignedTo: notifications@ant.apache.org
ReportedBy: faujdar@gmail.com
I tried using the Maillogger but continuously get
MailLogger failed to send e-mail!
java.lang.NullPointerException
at org.apache.tools.ant.taskdefs.email.MimeMailer.send(MimeMailer.java:2
06)
at org.apache.tools.ant.listener.MailLogger.sendMimeMail(MailLogger.java
:271)
at org.apache.tools.ant.listener.MailLogger.buildFinished(MailLogger.jav
a:139)
at org.apache.tools.ant.Project.fireBuildFinished(Project.java:2008)
at org.apache.tools.ant.Main.runBuild(Main.java:718)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
-----------------------------------------------------------------
As the initial analysis it appears the following code is playing foul.
for (Iterator iter = headers.iterator(); iter.hasNext();) {
Header h = (Header) iter.next();
msg.addHeader(h.getName(), h.getValue());
}
The settings i used for maillogger:
MailLogger.mailhost=exchange.usa.net
MailLogger.user=<Removed>
MailLogger.password=<Removed>
MailLogger.from=<Removed>
MailLogger.failure.to=<Removed>
MailLogger.success.to=<Removed>
MailLogger.failure.subject=BuildFailed
MailLogger.success.subject=successful
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
DO NOT REPLY [Bug 44009] - MailLogger failed to send e-mail
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44009>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=44009
------- Additional Comments From faujdar@gmail.com 2007-12-03 02:50 -------
i tried making the following change on my local machine
if(headers!=null){
for (Iterator iter = headers.iterator(); iter.hasNext();) {
Header h = (Header) iter.next();
msg.addHeader(h.getName(), h.getValue());
}
}
and got the following stacktrace:
MailLogger failed to send e-mail!
Problem while sending mime mail:
at org.apache.tools.ant.taskdefs.email.MimeMailer.send(MimeMailer.java:2
43)
at org.apache.tools.ant.listener.MailLogger.sendMimeMail(MailLogger.java
:271)
at org.apache.tools.ant.listener.MailLogger.buildFinished(MailLogger.jav
a:139)
at org.apache.tools.ant.Project.fireBuildFinished(Project.java:2008)
at org.apache.tools.ant.Main.runBuild(Main.java:718)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: javax.mail.MessagingException: [EOF]
at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:1481)
at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1
512)
at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1054)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:634)
at javax.mail.Transport.send0(Transport.java:189)
at javax.mail.Transport.send(Transport.java:118)
at org.apache.tools.ant.taskdefs.email.MimeMailer.send(MimeMailer.java:2
41)
... 7 more
--- Nested Exception ---
javax.mail.MessagingException: [EOF]
at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:1481)
at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1
512)
at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1054)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:634)
at javax.mail.Transport.send0(Transport.java:189)
at javax.mail.Transport.send(Transport.java:118)
at org.apache.tools.ant.taskdefs.email.MimeMailer.send(MimeMailer.java:2
41)
at org.apache.tools.ant.listener.MailLogger.sendMimeMail(MailLogger.java
:271)
at org.apache.tools.ant.listener.MailLogger.buildFinished(MailLogger.jav
a:139)
at org.apache.tools.ant.Project.fireBuildFinished(Project.java:2008)
at org.apache.tools.ant.Main.runBuild(Main.java:718)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
DO NOT REPLY [Bug 44009] - MailLogger failed to send e-mail
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44009>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=44009
stevel@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Target Milestone|--- |1.7.1
------- Additional Comments From stevel@apache.org 2007-12-03 02:23 -------
line 216 is the iterator below, at least in SVN_HEAD:
msg.addHeader("Date", getDate());
for (Iterator iter = headers.iterator(); iter.hasNext();) {
Header h = (Header) iter.next();
msg.addHeader(h.getName(), h.getValue());
}
An NPE could be triggered by headers==null. There's nothing in the class
initialiser to set up these headers; it relies on setHeaders() being called,
which presumably, it isnt in this case, or the vector is being set with a null
pointer)
I'll do two things
-always initialise the vector
-skip the iteration if the vector is null (in case someone assigns a null vector
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
DO NOT REPLY [Bug 44009] - MailLogger failed to send e-mail
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44009>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=44009
------- Additional Comments From faujdar@gmail.com 2007-12-03 02:12 -------
The piece of code referred to in my above comment is from the file MimeMailer.java
lines 207-210
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.