cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhard Pötz <>
Subject Re: HELP needed with latest Cocoon 2.2 (JNET / SSF)
Date Thu, 04 Feb 2010 19:20:18 GMT
Reinhard Pötz wrote:
> Gabriel Gruber wrote:
>> Hi Joe,
>> well, I don't have a replayable scenario yet (f.i. testcase), but it
>> seems that the exception comes after heavy use of cocoon pages within
>> our application.  
>> I suspect that cocoon:/ protocol usage AND/OR  inheritence of sitemap
>> calling (we "extend" cocoon-forms block to override specific resources)
>> might be the root of problem. But that is only a guess...
>> We are using latest trunk versions of servlet-service-framework and jnet
>> subprojects.  I know that Grek made some changes in cocoon servlet
>> service framework in summer 2009, which went into the 1.2 release, which
>> we are using (since then no changes have been comitted).
>> The problems reported here (exact same problem we have)
> I had a look at the JNet code and haven't found a cause for your
> problems. The list of URLStreamHandlerFactory objects is stored in a
> thread local.
> I propose that you add extensive logging to
> org.apache.cocoon.jnet.URLHandlerFactoryCollector,
> org.apache.cocoon.jnet.DynamicURLStreamHandlerFactory and
> org.apache.cocoon.jnet.URLStreamHandlerFactoryInstaller
> Then create a special logging target for all org.apache.cocoon.jnet
> messages and make sure that you also log the tread ids.
> Then try to reproduce your problems and you should get a hint from the
> logs what could be the cause of empty lists.
> Maybe you can also provide a patch with the logging statements.

It might also be interesting to see, whether the exceptions changes (or
disappears) if you change line 42 of
o.a.c.jnet.DynamicURLStreamHandlerFactory to

list = Collections.synchronizedList(new

Steven and I experimented with linked lists today and didn't find a way
to produce a NPE as long as only a single thread accesses it. Those
exceptions only occur in the case of multiple threads modifying it
without synchronization.
So I expect that this change will just lead to an
IndexOutOfBoundException ...

Reinhard Pötz                           Managing Director, {Indoqa} GmbH

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member        

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message