"Andrei A. Ivanov" wrote:
>
> Hi,
> from time to time (1/20 mails) a npe is thrown in JamesSpoolManager
> line 207:
> getLogger().info("==== Begin processing mail " + mail.getName() + " ====");
Andrei,
I have some observations, but not anything so complete as
help.
Looking at my source for James 2.0a2, it looks to me like
probably your variable mail is null in that line 207. mail
gets set two lines earlier in line 205, with a call to the
method (SpoolRepository).retrieve(String).
So the question becomes when would that method return null.
Assuming your SpoolRepository is an AvalonSpoolRepository, the
retrieve method will be inherited from AvalonMailRepository.
It appears to me that method would return null only as seen in
this code (from AvalonMailRepository.retrieve):
try {
mc = (MailImpl) or.get(key);
} catch (RuntimeException re) {
getLogger().error("Exception retrieving mail: " +
re + ", so we're deleting it... good
ridance!");
remove(key);
return null;
}
If I am correct then you would see that error message,
including "good ridance", in one of your logs.
The variable "or" above is an avalon ObjectRepository. So
then the question becomes when would that call or.get(key)
throw a RuntimeException. But that is where I quit for now; I
do not have that source at hand.
Rich Hammer
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>