geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hendrik Saly (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GERONIMO-6166) Improper handling of empty address arrays
Date Fri, 31 Oct 2014 21:44:35 GMT

    [ https://issues.apache.org/jira/browse/GERONIMO-6166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14192549#comment-14192549
] 

Hendrik Saly commented on GERONIMO-6166:
----------------------------------------

seems to be the same problem as GERONIMO-4339.
I recommend an upgrade to the latest geronimo-javamail version 1.8 - the problem should not
longer occur.
If it is not working pls file another issue.

> Improper handling of empty address arrays
> -----------------------------------------
>
>                 Key: GERONIMO-6166
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-6166
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: mail
>    Affects Versions: 1.x
>         Environment: Linux, JDK 6
>            Reporter: Jesse Glick
>
> When I try to use the Ant {{<mail>}} task with {{geronimo-javamail-1.4-mail-1.2.jar}}
(and {{geronimo-activation-1.1-spec-1.0.jar}} and {{geronimo-activation-2.0.2.jar}}), I get
a stack trace:
> {code}
> java.lang.ArrayIndexOutOfBoundsException: 0
> 	at javax.mail.internet.InternetHeaders.setHeader(InternetHeaders.java:562)
> 	at javax.mail.internet.MimeMessage.setHeader(MimeMessage.java:1492)
> 	at javax.mail.internet.MimeMessage.setReplyTo(MimeMessage.java:513)
> 	at org.apache.tools.ant.taskdefs.email.MimeMailer.send(MimeMailer.java:186)
> 	at org.apache.tools.ant.taskdefs.email.EmailTask.execute(EmailTask.java:577)
> {code}
> or similarly:
> {code}
> java.lang.ArrayIndexOutOfBoundsException: 0
> 	at javax.mail.internet.InternetHeaders.setHeader(InternetHeaders.java:562)
> 	at javax.mail.internet.MimeMessage.setHeader(MimeMessage.java:1492)
> 	at javax.mail.internet.MimeMessage.setRecipients(MimeMessage.java:445)
> 	at org.apache.tools.ant.taskdefs.email.MimeMailer.send(MimeMailer.java:189)
> {code}
> http://javamail.kenai.com/nonav/javadocs/javax/mail/Message.html gives no indication
that empty arrays are forbidden. In fact {{InternetHeaders}} seems to be checking for a zero-length
list but then failing to return.
> Workaround is to specify at least one address for every possible field:
> {code:xml}
> replyto="_@nowhere.net" cclist="_@nowhere.net" bcclist="_@nowhere.net"
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message