almost forgot..
i'm running this on win2k.. so the problem that nng has w/cpu are probably
the same issue i had, since i only noticed the bug as james took 100% of my
cpu, when i was forwarding messages..
jeremy
(see my previous message for my more in depth explanation of why i did what
i did..)
[EMAIL PROTECTED] wrote:
>
> I've just downloaded Jame 1.2 and installed it on my NT box. However, the
server
> trashes
> all CPU cycles on the machine. We will try the Unix version but I am just
> wondering if any of
> you are aware of this problem, and if the Unix version has the same
behavious?
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Jeremy Schoenherr
Sent: Monday, December 18, 2000 6:05 PM
To: Java Apache Mail Server
Subject: RE: [Vote] Release 1.2.1
> retrieve could be called multiple times on any given mail (eg in a POP3
> box) so why would you automatically remove it(ie delete it) on any
> exception?
hey Charles,
i assume this question for me, because i posted the fix (read: hack) to
delete the message if there was an issue retrieving it.. here's my
reasons...
summary:
true, you can retrieve the same mail multiple times. however, you can't
retrieve messages if only one of the files associated with it are there...
these files are: *key*.private.StreamStore or *key*.private.PersistantStore.
if only one exists.. calling get() throws an Exception. in an infinite loop
in my case the exception was being thrown in the following situation..
1. we have an incoming email to user [EMAIL PROTECTED]
2. we have a mailet that gets executed because the matcher returned true.
3. the mailet forwards this message to a remote address [EMAIL PROTECTED]
4. the mail gets placed in the ../var/mail/outgoing/ dir.
5. SMTP service notices there is a message in the outgoing box.
6. SMTP *in effect* invokes the retrieve() method in question.
7. SMTP sends the message.
//this is when the bugs happen..
8. SMTP *attempts* to delete the message.
9. it fails.. it only deletes 1 of the 2 files associated with the message
i think it is the *key*.private.PersistantStore that sticks around
10. now, SMTP *thinks* that it found a new message in the outgoing
directory. its actually the same message referred to earlier..
11. it tries to run retrieve() method again and the exception gets thrown
because it can't find the file that was deleted successfully.
12. so my hack deletes it.
(thought) -> the real solution is to make sure the message is always deleted
correctly. i know this. but i was in a hurry. (no excuses, i know)
that's it.
>jeremy
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Charles Benett
Sent: Monday, December 18, 2000 9:26 AM
To: Java Apache Mail Server
Subject: Re: [Vote] Release 1.2.1
retrieve could be called multiple times on any given mail (eg in a POP3
box) so why would you automatically remove it(ie delete it) on any
exception?
Have you tried a daily build or CVS? There is a fix for this method -
for the stream repository, where there was a problem in 1.2.
Charles
Ben wrote:
>
> > Charles Benett wrote:
> >
> > Anyone heard from Fede recently?
> > Technically, we need his vote for a release.
> > Peter Donald can place the release on james/dist, but may not have
> > rights to update web pages.
> > Charles
> >
>
> Charles,
>
> Sorry my votes don't count.
>
> Do you think it would be possible to include Jeremy's suggestion (see
below)
> into 1.2.1. I think it's a good counter measure to have
> i.e. to check and cleanup on startup only the newly included exception
> would be bes changes to a LOG message.
>
> Ben
>
> > Hey Ben, Babar,
> >
> > i'm kinda late getting into this thread, and i don't know if
> > you found a
> > workaround for the Eception that started this yet, but i ran
> > into the same
> > problem and it drove me a little mad so i had to resolve it..
> > the reason it
> > came up in my situation was this: for outgoing messages, after james
> > executed the RemoteDelivery Mailet it did not FULLY delete both files
> > associated with the message. it only deleted one. so the next
> > time through
> > james detects a message(which it already delivered), but
> > can't get again
> > because both files do not exist.. anyway,
> >
> > replace your existing retrieve method in
> > AvalonMailRepository.java with
> > this..
> >
> > public synchronized MailImpl retrieve(String key) {
> > MailImpl mc = null;
> > try {
> > mc = (MailImpl) or.get(key);
> > } catch (Exception me) {
> > lock(key);
> > sr.remove(key);
> > or.remove(key);
> > unlock(key);
> > throw new RuntimeException("Exception while retrieving
> > mail[destroyed the message :] " + me.getMessage());
>
> !!!! Change Above exception to a Log Message !!!!
> Ben
>
> > }
> > try {
> > mc.setMessage(sr.retrieve(key));
> > } catch (Exception me) {
> > throw new RuntimeException("Exception while
> > retrieving mail: " +
> > me.getMessage());
> > }
> > return mc;
> > }
> >
> > this worked for me.. oh, and make sure you delete the
> > AvalonMailRepository.class from the james.jar, so that you can use the
> > hacked one.
> >
> > >jeremy
> >
>
> >
> > Serge Knystautas wrote:
> > >
> > > +1
> > > ----- Original Message -----
> > > From: "Charles Benett" <[EMAIL PROTECTED]>
> > > To: "JAMES" <[EMAIL PROTECTED]>
> > > Sent: Friday, December 15, 2000 11:15 AM
> > > Subject: [Vote] Release 1.2.1
> > >
> > > > OK, shall we get 1.2.1 out?
> > > >
> > > > Charles
> > > >
> > Behalf Of Jeremy Schoenherr
> > Sent: Friday, 15 December 2000 2:53
> > To: Java Apache Mail Server
> > Subject: RE: FileSystem mailboxes are having problems
> >
> >
>
> ------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Archives: <http://www.mail-archive.com/james%40list.working-dogs.com/>
> Problems?: [EMAIL PROTECTED]
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives: <http://www.mail-archive.com/james%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives: <http://www.mail-archive.com/james%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives: <http://www.mail-archive.com/james%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]