You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@excalibur.apache.org by Leif Mortenson <le...@tanukisoftware.com> on 2004/07/29 10:22:41 UTC

Fortress startup error

This has only happened once, but today when starting up Fortress, I got the
following error printed out to my console:

java.util.NoSuchElementException
at java.util.LinkedList.getLast(LinkedList.java:118)
at org.d_haven.event.impl.DefaultPipe.retrieveElements(DefaultPipe.java:140)
at org.d_haven.event.impl.DefaultPipe.doDequeueAll(DefaultPipe.java:117)
at org.d_haven.event.impl.AbstractPipe.dequeueAll(AbstractPipe.java:193)
at
org.d_haven.event.command.EventPipelineRunner.run(EventPipelineRunner.java:93)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
Source)
at java.lang.Thread.run(Thread.java:534)

Fortress continued to start up normally as if there had not been a
problem. Looks
like a bug in the D-Haven code.

Cheers,
Leif

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@excalibur.apache.org
For additional commands, e-mail: dev-help@excalibur.apache.org
Apache Excalibur Project -- URL: http://excalibur.apache.org/


Re: Fortress startup error

Posted by Berin Loritsch <bl...@d-haven.org>.
Leif Mortenson wrote:

> This has only happened once, but today when starting up Fortress, I got the
> following error printed out to my console:
> 
> java.util.NoSuchElementException
> at java.util.LinkedList.getLast(LinkedList.java:118)
> at org.d_haven.event.impl.DefaultPipe.retrieveElements(DefaultPipe.java:140)
> at org.d_haven.event.impl.DefaultPipe.doDequeueAll(DefaultPipe.java:117)
> at org.d_haven.event.impl.AbstractPipe.dequeueAll(AbstractPipe.java:193)
> at
> org.d_haven.event.command.EventPipelineRunner.run(EventPipelineRunner.java:93)
> at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
> Source)
> at java.lang.Thread.run(Thread.java:534)
> 
> Fortress continued to start up normally as if there had not been a
> problem. Looks
> like a bug in the D-Haven code.

Ok, I will look into this.  This is the one time I don't really like
Runtime Exceptions.

-- 

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe trying to
produce bigger and better idiots. So far, the Universe is winning."
                - Rich Cook

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@excalibur.apache.org
For additional commands, e-mail: dev-help@excalibur.apache.org
Apache Excalibur Project -- URL: http://excalibur.apache.org/


Re: Fortress startup error

Posted by Berin Loritsch <bl...@d-haven.org>.
Leif Mortenson wrote:

> This has only happened once, but today when starting up Fortress, I got the
> following error printed out to my console:
> 
> java.util.NoSuchElementException
> at java.util.LinkedList.getLast(LinkedList.java:118)
> at org.d_haven.event.impl.DefaultPipe.retrieveElements(DefaultPipe.java:140)
> at org.d_haven.event.impl.DefaultPipe.doDequeueAll(DefaultPipe.java:117)
> at org.d_haven.event.impl.AbstractPipe.dequeueAll(AbstractPipe.java:193)
> at
> org.d_haven.event.command.EventPipelineRunner.run(EventPipelineRunner.java:93)
> at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
> Source)
> at java.lang.Thread.run(Thread.java:534)
> 
> Fortress continued to start up normally as if there had not been a
> problem. Looks
> like a bug in the D-Haven code.

This appears to be a relatively rare race condition where more than one
thread was trying to get the next command, which was already done.  I
have added some code to catch the NoSuchElementException and return the
elements we have so far.

The exception may cause any additional elements/commands that were
extracted before the exception is thrown to be discarded.  Fortress is
fairly robust because it has fallback mechanisms for everything which
is why nothing seemed to be wrong.

When I solve the second problem you have raised, I will release the
next bug-fix version of the Event package.

-- 

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe trying to
produce bigger and better idiots. So far, the Universe is winning."
                - Rich Cook

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@excalibur.apache.org
For additional commands, e-mail: dev-help@excalibur.apache.org
Apache Excalibur Project -- URL: http://excalibur.apache.org/