cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michal Durdina (JIRA)" <j...@apache.org>
Subject [jira] Created: (COCOON-1743) Failed to execute pipeline: java.util.NoSuchElementException
Date Mon, 30 Jan 2006 11:49:32 GMT
Failed to execute pipeline: java.util.NoSuchElementException
------------------------------------------------------------

         Key: COCOON-1743
         URL: http://issues.apache.org/jira/browse/COCOON-1743
     Project: Cocoon
        Type: Bug
  Components: Blocks: Portal  
    Reporter: Michal Durdina
 Attachments: cocoon-bug1.txt

Hello,
we run portal built on cocoon-2.1.6 portal block.

We encountered java.util.NoSuchElementException in some weird moment. Full exception stack
trace is included. 
I checked later sources but they were not modified since then.

After looking to code this defaulteventaspectcontext.java 
it seems that there is inconsistency in list sizes between this.iterator and this.configIterator:

    public DefaultEventAspectContext(EventAspectChain chain) {
        this.iterator = chain.getIterator();
        this.configIterator = chain.getConfigIterator();
    }
    
    public void invokeNext(PortalService service) {
		if (iterator.hasNext()) {
            this.config = (Parameters) this.configIterator.next();
            final EventAspect aspect = (EventAspect) iterator.next();
            aspect.process( this, service );
		}
	}

Fast solution is to change "if" to 
    if (iterator.hasNext() && configIterator.hasNext()) {

but real solution would be to merge both lists to one list and with Object[] or new type elements.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message