You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Angel Angelov <an...@sayrix.com> on 2004/03/31 15:59:07 UTC

using MailetContext.sendMail

Hi all,
I'm trying to send a mail using the method sendMail(MailAddress sender, Collection recipients, MimeMessage msg, String state) using James 2.2.0a15
I set the state to "transport". In my transport processor I configured a gateway smpt server where all e-mails should be send.

I become the following error in spoolmanager log file:
31/03/04 15:38:48 ERROR spoolmanager: Exception in processor <transport>
java.lang.ClassCastException
	at org.apache.mailet.GenericRecipientMatcher.match(GenericRecipientMatcher.java:89)
	at org.apache.james.transport.LinearProcessor.service(LinearProcessor.java:383)
	at org.apache.james.transport.JamesSpoolManager.process(JamesSpoolManager.java:454)
	at org.apache.james.transport.JamesSpoolManager.run(JamesSpoolManager.java:369)
	at org.apache.james.util.thread.ExecutableRunnable.execute(ExecutableRunnable.java:89)
	at org.apache.james.util.thread.WorkerThread.run(WorkerThread.java:125)
31/03/04 15:38:48 ERROR spoolmanager: An error occurred processing Mail1080740328117-0 through transport
31/03/04 15:38:48 ERROR spoolmanager: Result was error
31/03/04 15:38:48 ERROR spoolmanager: Exception in processor <error>
java.lang.ArrayStoreException
	at java.lang.System.arraycopy(Native Method)
	at java.util.ArrayList.toArray(ArrayList.java:305)
	at org.apache.james.transport.LinearProcessor.verifyMailAddresses(LinearProcessor.java:515)
	at org.apache.james.transport.LinearProcessor.service(LinearProcessor.java:450)
	at org.apache.james.transport.JamesSpoolManager.process(JamesSpoolManager.java:454)
	at org.apache.james.transport.JamesSpoolManager.run(JamesSpoolManager.java:369)
	at org.apache.james.util.thread.ExecutableRunnable.execute(ExecutableRunnable.java:89)
	at org.apache.james.util.thread.WorkerThread.run(WorkerThread.java:125)
31/03/04 15:38:48 ERROR spoolmanager: An error occurred processing Mail1080740328117-0 through error
31/03/04 15:38:48 ERROR spoolmanager: Result was ghost


Any suggestions what can be the problem?
Thanks.

--Angel
 







 
                   

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


RE: using MailetContext.sendMail

Posted by "Noel J. Bergman" <no...@devtech.com>.
> java.lang.ClassCastException
>   at
org.apache.mailet.GenericRecipientMatcher.match(GenericRecipientMatcher.java
:89)

  89      MailAddress rec = (MailAddress) i.next();

Looks like something was put into the Collection that doesn't belong there.
This is later confirmed by:

> java.lang.ArrayStoreException
>   at java.lang.System.arraycopy(Native Method)
>   at java.util.ArrayList.toArray(ArrayList.java:305)
>   at
org.apache.james.transport.LinearProcessor.verifyMailAddresses(LinearProcess
or.java:515)

  515     MailAddress addresses[] = (MailAddress[])col.toArray(new
MailAddress[0]);

Please submit a JIRA issue that LinearProcessor.verifyMailAddresses should
catch java.lang.ArrayStoreException.  The purpose of that method is to
verify the contents of the Collection, and it should not leak the exception.

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org