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 jason sackett <ja...@home.com> on 2002/01/18 20:19:58 UTC
myRemoteDelivery, JAMES2.0a2
As suggested, I am trying the latest JAMES with this change in
RemoteDelivery.
This did get rid of the infinite loop of exception I experienced with JAMES
1.2.1.
I am using the new RemoteDelivery to start with.
Tried once with Vector and once with ArrayList.
I also printed out the result of
'getMailetContext().getPostmaster().toString()' and it looks good:
-------------------------------------------
// getMailetContext().bounce(mail, sout.toString());//this is the
original key line in the original RemoteDelivery
ArrayList recips = new ArrayList();
// Vector recips = new Vector();
recips.add(getMailetContext().getPostmaster().toString());
getMailetContext().sendMail(getMailetContext().getPostmaster(),(Collection)r
ecips,mail.getMessage(),"error");
-------------------------------------------
According to javadocs (look at the recipients parameter definition):
sendMail
public void sendMail(MailAddress sender,
java.util.Collection recipients,
javax.mail.internet.MimeMessage msg,
java.lang.String state)
throws javax.mail.MessagingException
Send an outgoing message to the top of this mailet container queue for the
appropriate processor that is specified.
Parameters:
sender - - the sender of the message
recipients - - a Collection of String objects of recipients
msg - - the MimeMessage of the headers and body content of the outgoing
message
state - - the state of the message, indicates which processor to use
Throws:
javax.mail.MessagingException - - if the message fails to parse
-------------------------------------------
But I keep getting arraycopy exceptions either way, Vector or ArrayList.
Iit seems that the recipients parameter is not accepting my collection of
String recipients:
-------------------------------------------
C:\mailserver\bin>run
Phoenix 3.1a1-dev
James 2.0a2
Started POP3 Server plain:110
Started SMTP Server plain:25
Started NNTP Server plain:119
Exception in processor <error>
java.lang.ArrayStoreException
at java.lang.System.arraycopy(Native Method)
at java.util.Vector.toArray(Vector.java:679)
at
org.apache.james.transport.LinearProcessor.verifyMailAddresses(LinearProcess
or.java:215)
at
org.apache.james.transport.LinearProcessor.service(LinearProcessor.java:139)
at
org.apache.james.transport.JamesSpoolManager.process(JamesSpoolManager.java:
241)
at
org.apache.james.transport.JamesSpoolManager.run(JamesSpoolManager.java:208)
at
org.apache.avalon.excalibur.thread.impl.ExecutableRunnable.execute(Executabl
eRunnable.java:47)
at
org.apache.avalon.excalibur.thread.impl.WorkerThread.run(WorkerThread.java:8
0)
JVM exiting abnormally. Shutting down Phoenix.
Terminate batch job (Y/N)? y
C:\mailserver\bin>
C:\mailserver\bin>
C:\mailserver\bin>run
Phoenix 3.1a1-dev
James 2.0a2
Started POP3 Server plain:110
Started SMTP Server plain:25
Started NNTP Server plain:119
Exception in processor <error>
java.lang.ArrayStoreException
at java.lang.System.arraycopy(Native Method)
at java.util.ArrayList.toArray(ArrayList.java:288)
at
org.apache.james.transport.LinearProcessor.verifyMailAddresses(LinearProcess
or.java:215)
at
org.apache.james.transport.LinearProcessor.service(LinearProcessor.java:139)
at
org.apache.james.transport.JamesSpoolManager.process(JamesSpoolManager.java:
241)
at
org.apache.james.transport.JamesSpoolManager.run(JamesSpoolManager.java:208)
at
org.apache.avalon.excalibur.thread.impl.ExecutableRunnable.execute(Executabl
eRunnable.java:47)
at
org.apache.avalon.excalibur.thread.impl.WorkerThread.run(WorkerThread.java:8
0)
Thank you for any help,
Jason
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: myRemoteDelivery, JAMES2.0a2
Posted by Danny Angus <da...@thought.co.uk>.
>
> P.S. Do I really need to do a formal patch submission for this small (but
> important) javadocs fix?
It's the easiest way to get stuff changed, 'cos we can just run "Patch" to
update the source, but if diff'ing is too much to contemplate post some line
numbers and text, or the whole file (assuming its smallish) instead.
The sooner you do it, the more likely it is to be in the release.
d.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: myRemoteDelivery, JAMES2.0a2
Posted by jason sackett <ja...@home.com>.
That's great!
My greatest hope was that I was giving myself away with that, hence my very
specificity.
I actually figured it was something like that, but the javadocs are not just
misleading, they are flat wrong!
That is why I specifically pasted the javadocs into the email, they say:
"recipients - - a Collection of String objects of recipients"
and I will now try:
"recipients is a Collection of org.apache.mailet.MailAddress 'es"
instead, as you suggest.
Thank you,
Jason
P.S. Do I really need to do a formal patch submission for this small (but
important) javadocs fix?
----- Original Message -----
From: "Danny Angus" <da...@thought.co.uk>
To: "James Users List" <ja...@jakarta.apache.org>
Sent: Friday, January 18, 2002 3:04 PM
Subject: RE: myRemoteDelivery, JAMES2.0a2
> Bingo ..! you just gave yourself away ;-)
>
> > my collection of String recipients:
>
> recipients is a Collection of org.apache.mailet.MailAddress 'es
> MailAddress has a constructor which takes a String argument so this line
> will add a String email address to the Collection correctly..
>
> recipients.add(new MailAddress(StringAddress));
>
> If the javadocs are misleading feel free to submit a patch..
>
> d.
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: myRemoteDelivery, JAMES2.0a2
Posted by Danny Angus <da...@thought.co.uk>.
> That said, the whole point of verifyMailAddresses is to throw a nice error
> message :)
Ah now that is a good point!
d.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: myRemoteDelivery, JAMES2.0a2
Posted by Serge Knystautas <se...@lokitech.com>.
That said, the whole point of verifyMailAddresses is to throw a nice error
message :) We should probably patch it to return a suitably nice message
rather than ArrayStoreException. I wrote the code and I didn't even know
what it meant. Glad you figured it out.
Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com/
----- Original Message -----
From: "Danny Angus" <da...@thought.co.uk>
To: "James Users List" <ja...@jakarta.apache.org>
Sent: Friday, January 18, 2002 3:04 PM
Subject: RE: myRemoteDelivery, JAMES2.0a2
> Bingo ..! you just gave yourself away ;-)
>
> > my collection of String recipients:
>
> recipients is a Collection of org.apache.mailet.MailAddress 'es
> MailAddress has a constructor which takes a String argument so this line
> will add a String email address to the Collection correctly..
>
> recipients.add(new MailAddress(StringAddress));
>
> If the javadocs are misleading feel free to submit a patch..
>
> d.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: myRemoteDelivery, JAMES2.0a2
Posted by Danny Angus <da...@thought.co.uk>.
Bingo ..! you just gave yourself away ;-)
> my collection of String recipients:
recipients is a Collection of org.apache.mailet.MailAddress 'es
MailAddress has a constructor which takes a String argument so this line
will add a String email address to the Collection correctly..
recipients.add(new MailAddress(StringAddress));
If the javadocs are misleading feel free to submit a patch..
d.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>