Hello,

When running our cocoon application on some systems, we run into a very 
strange and hard to find problem. Our application uses cForms and a custom 
flow engine to display these forms. In some cases, when the user submits the 
form, the flow engine receives an empty request object. With empty I mean non 
of the request parameters are present. I did not yet check for other 
attributes. To make sure the error is not caused by our custom flow engine I 
added this piece of debug code:

public class ThreadInterpreter extends AbstractInterpreter
   implements Configurable, ContinuationsDisposer {

  ...
  public void handleContinuation(String id, List params,
      Redirector redirector) throws Exception {
    Request r = ContextHelper.getRequest(avalonContext);
    java.util.Enumeration enu = r.getParameterNames();
    System.out.println("Request Parameters ("+r.hashCode()+
                       " interpreter 1):");
    while (enu.hasMoreElements()) {
      String name = (String) enu.nextElement();
      System.out.println(name+": "+r.getParameter(name));
    }

    ...
  }
}

As you can see, this code is the first code to be executed when resuming a 
continuation. It dumps all request parameters to the stdout. Most of the time 
this produces the expected result, lots of parameters with values. However in 
some rare occasions this does not produce any parameter at all. The 
'handleContinuation' method is called directly from the sitemap in the same 
way as with a normal javascript flow.

From what I can see some part of Cocoon or Tomcat is not thread safe and does 
not fill the parameters of the request in time. It is very hard to reproduce 
the problem and it seems to happen more on systems running Windows, than on 
systems running Linux. Also the upgrade to jdk 1.5 increased the problem 
significantly. Adding more debug code below this code sometimes makes the 
problem go away, even before this extra code is executed.

Am I doing something wrong, or did I hit a serious bug in either Cocoon or 
Tomcat?

Best regards,
Emond Papegaaij

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

Reply via email to