Steve,

You're probably seeing the FAQ item.  Are you running the CVS HEAD?  It
should happen far less frequently with changes made recently to the code.
Basically, an exception occurs because of a known race condition.  A thread
picks up a mail item from the spool.  After it gets the item, it attempts to
lock the item.  If another thread has it locked, then the second thread will
give up and go back for another item.  However, there is a window where one
thread can pickup an item from the spool, and between when it gets the spool
item and when it attempts to lock it, the thread that actually owns the
spool item removes it from the spool and unlocks it.  So the second thread
finds that it is able to lock it, but when it goes to get it, the item is
gone.

The code:

                String key = spool.accept();
                MailImpl mail = spool.retrieve(key);
                if (infoEnabled) {

should be changed to:

                String key = spool.accept();
                MailImpl mail = spool.retrieve(key);
                if (mail == null) continue;
                if (infoEnabled) {

since we know that spool.retrieve(key) can return null.  Try patching your
copy of the code, and see if that doesn't fix it.

        --- Noel

-----Original Message-----
From: Stephen McConnell [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 16, 2002 2:15
To: James Developers List
Subject: Re: James under Merlin




In JamesSpoolManager, run method:

                MailImpl mail = spool.retrieve(key);

The mail variable is is the source of the NPE.

Steve.


Stephen McConnell wrote:

>
>
> Paul Hammant wrote:
>
>> Stephen,
>>
>>> I've been playing around with James under Merlin.
>>>
>>> During the process I came accross a runtime problem:
>>>
>>>  1. The class AvalonUsersStore is referenced as a Component
>>>     somewhere or other but doesn't implement the Component
>>>     interface
>>
>>
>>
>> Err should be able to fix that one.
>
>
>
> It rather easy!
>
>>
>>
>>>  2. After starting James inside Merlin, then sending an email
>>>     to an arbitary name on the server James is running on,
>>>     I get NPE - which is where I figure I may need some help
>>>     from you guys ...
>>
>>
>>
>> This is where we wich we could unit test each comp.
>
>
>
> Something to keep in mind is that I'm using the CVS version of
> cornerstone components.  I had to do a number of updates to
> cornerstone including
>
>  (a) addition of the Component interface to soem of the blocks
>      becuase they are used in James - so adding Component is
>      basically a backward compatibility thing
>
>  (b) addition of some meta-info into a couple of the blocks so
>      that Merlin can automatically build the services without
>      having Phoenix around
>
> Apart from the above, the only differences are that I'm using a few
> more excalibur jar files that are not included in the James lib
> (because they are included in Phoenix and not in Merlin) and
> naturally, this bypasses all of the Phoenix config, assembly, and
> server files.
>
>>
>> A guy at BP has written a generic AbstractPhoenixTestCase (where
>> Phoenix is mocked).  I'll get him to write it up and someone might do
>> the same thing inside Phoenix CVS or maybe Merlin CVS ? :-)
>
>
>
> I'll put in place a Merlin projects directory containing the James
> content and update the CVS.
>
>>
>> Failing that we'll have to do good old fashioned debugging.  Question
>> do you use IntelliJ ?  Have you got interactive debuging working with
>> Phoenix?
>
>
>
> No on both points!
> In the meantime I'll start tracking it down.
>
> Cheers, Steve.
>
>
>>
>>
>> - Paul
>>
>>
>> --
>> To unsubscribe, e-mail:
>> <mailto:[EMAIL PROTECTED]>
>> For additional commands, e-mail:
>> <mailto:[EMAIL PROTECTED]>
>>
>

--

Stephen J. McConnell

OSM SARL
digital products for a global economy
mailto:[EMAIL PROTECTED]
http://www.osm.net




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to