Carsten Ziegeler wrote:

Vadim Gritsenko wrote:


It's actually very easy to reproduce:
1. cvs up
2. build clean; build
3. cocoon servlet
4. http://localhost:8888/samples/blocks/portal/portal
5. login
6. JSR-168 tab

Exception is printed neatly within "JSR-168 Cocoon Portlet" content pane.

Please bear in mind, call stack here is the following:
 CocoonServlet
  Cocoon (1)
   Treeprocessor, ...
    CopletSource
     ManagedCocoonPortlet
      Cocoon (2)
       EnvironmentHelper

Where, (1) and (2) are the same instance of the Cocoon class, on the same thread. I think that's why it is confused. Here is head of trace.



Ah, ok, than life is much simpler :)
The check currently assumes that on method entry the stack
stored in the thread local is empty. Thus it checks on exit
if the stack is empty again.
We could store the current number of elements in the stack
on method entry and check if the stack has the same size
on exit. This would just be a local int variable.
WDYT?



Done, please double check :-)

Demo works out of the box now.

Vadim




Reply via email to