Cocoon
  1. Cocoon
  2. COCOON-1579

Continuation, sendPage and Rhino 1.6r1

    Details

    • Type: Bug Bug
    • Status: Continued
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.1.8, 2.1.9, 2.1.10, 2.1.11
    • Fix Version/s: None
    • Component/s: - Flowscript
    • Labels:
      None
    • Environment:
      Operating System: Linux
      Platform: PC

      Description

      I use Rhino 1.6r1 (from trunk svn) in my cocoon. I get a NullPointerException in
      that case :
      I first call a flow function to display a jx template using a continuation.
      Then I post the form (and the continuation) to a pipeline calling a flow
      function that does a cocoon.sendPage to a pipeline calling the continuation.
      Then, I does some things in the flow and I display the jx template again.

      The first time I post the form : OK it's working.
      The second time I post the form : A NullPointerException is thrown !

      Here is the full java stacktrace :

      java.lang.NullPointerException
      at
      org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon.jsGet_continuation(FOM_Cocoon.java:252)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:174)
      at org.mozilla.javascript.ScriptableObject.getByGetter(ScriptableObject.java:1617)
      at org.mozilla.javascript.ScriptableObject.get(ScriptableObject.java:177)
      at org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:1263)
      at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1332)
      at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1321)
      at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2744)
      at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2164)
      at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:140)
      at org.mozilla.javascript.Context.call(Context.java:497)
      at org.mozilla.javascript.ScriptableObject.callMethod(ScriptableObject.java:1496)
      at org.mozilla.javascript.ScriptableObject.callMethod(ScriptableObject.java:1466)
      at
      org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.handleContinuation(FOM_JavaScriptInterpreter.java:861)
      at
      org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(CallFunctionNode.java:123)
      at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
      at
      org.apache.cocoon.components.treeprocessor.sitemap.SelectNode.invoke(SelectNode.java:102)
      at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
      at
      org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
      at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
      at
      org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:142)
      at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
      at
      org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:92)
      at
      org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:234)
      at
      org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.handleCocoonRedirect(ConcreteTreeProcessor.java:298)
      at
      org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.access$000(ConcreteTreeProcessor.java:47)
      at
      org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor$TreeProcessorRedirector.cocoonRedirect(ConcreteTreeProcessor.java:339)
      at
      org.apache.cocoon.environment.ForwardRedirector.redirect(ForwardRedirector.java:59)
      at
      org.apache.cocoon.components.flow.AbstractInterpreter.forwardTo(AbstractInterpreter.java:209)
      at
      org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.forwardTo(FOM_JavaScriptInterpreter.java:914)
      at
      org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon.forwardTo(FOM_Cocoon.java:698)
      at
      org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon.jsFunction_sendPage(FOM_Cocoon.java:269)
      at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:174)
      at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:456)
      at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:3026)
      at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2164)
      at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:140)
      at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:304)
      at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2769)
      at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2145)
      at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:140)
      at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:912)
      at
      org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.callFunction(FOM_JavaScriptInterpreter.java:766)
      at
      org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(CallFunctionNode.java:138)
      at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
      at
      org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
      at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
      at
      org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:142)
      at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
      at
      org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:92)
      at
      org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:234)
      at
      org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:176)
      at
      org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:250)
      at
      org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:117)
      at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
      at
      org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
      at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
      at
      org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:142)
      at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
      at
      org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:92)
      at
      org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:234)
      at
      org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:176)
      at
      org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:250)
      at org.apache.cocoon.Cocoon.process(Cocoon.java:624)
      at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1149)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358)
      at
      org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1807)
      at
      org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1757)
      at org.mortbay.http.HttpServer.service(HttpServer.java:879)
      at org.mortbay.http.HttpConnection.service(HttpConnection.java:789)
      at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:960)
      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:806)
      at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:218)
      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:300)
      at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:511)


      Here is the full Java stacktrace :

      org.apache.cocoon.ProcessingException: Sitemap: error calling function 'send'
      at <map:call> - file:/home/philou/public_html/sitemap.xmap:15:33
      at <map:mount> - file:/home/cocoon/cocoon-2.1-x/build/webapp/sitemap.xmap:811:85
      at org.apache.cocoon.ProcessingException.throwLocated(ProcessingException.java:102)
      at
      org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(CallFunctionNode.java:140)
      at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
      at
      org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
      at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
      at
      org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:142)
      at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
      at
      org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:92)
      at
      org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:234)
      at
      org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:176)
      at
      org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:250)
      at
      org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:117)
      at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
      at
      org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
      at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
      at
      org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:142)
      at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
      at
      org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:92)
      at
      org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:234)
      at
      org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:176)
      at
      org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:250)
      at org.apache.cocoon.Cocoon.process(Cocoon.java:624)
      at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1149)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358)
      at
      org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1807)
      at
      org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1757)
      at org.mortbay.http.HttpServer.service(HttpServer.java:879)
      at org.mortbay.http.HttpConnection.service(HttpConnection.java:789)
      at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:960)
      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:806)
      at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:218)
      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:300)
      at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:511)
      Caused by: org.mozilla.javascript.WrappedException: Wrapped
      org.apache.cocoon.ProcessingException: Sitemap: error calling continuation
      at <map:call> - file:/home/philou/public_html/sitemap.xmap:24:66
      at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1776)
      at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:191)
      at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:456)
      at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:3026)
      at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2164)
      at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:140)
      at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:304)
      at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2769)
      at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2145)
      at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:140)
      at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:912)
      at
      org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.callFunction(FOM_JavaScriptInterpreter.java:766)
      at
      org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(CallFunctionNode.java:138)
      ... 35 more
      Caused by: org.apache.cocoon.ProcessingException: Sitemap: error calling
      continuation
      at <map:call> - file:/home/philou/public_html/sitemap.xmap:24:66
      at org.apache.cocoon.ProcessingException.throwLocated(ProcessingException.java:102)
      at
      org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(CallFunctionNode.java:125)
      at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
      at
      org.apache.cocoon.components.treeprocessor.sitemap.SelectNode.invoke(SelectNode.java:102)
      at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
      at
      org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
      at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
      at
      org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:142)
      at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
      at
      org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:92)
      at
      org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:234)
      at
      org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.handleCocoonRedirect(ConcreteTreeProcessor.java:298)
      at
      org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.access$000(ConcreteTreeProcessor.java:47)
      at
      org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor$TreeProcessorRedirector.cocoonRedirect(ConcreteTreeProcessor.java:339)
      at
      org.apache.cocoon.environment.ForwardRedirector.redirect(ForwardRedirector.java:59)
      at
      org.apache.cocoon.components.flow.AbstractInterpreter.forwardTo(AbstractInterpreter.java:209)
      at
      org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.forwardTo(FOM_JavaScriptInterpreter.java:914)
      at
      org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon.forwardTo(FOM_Cocoon.java:698)
      at
      org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon.jsFunction_sendPage(FOM_Cocoon.java:269)
      at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:174)
      ... 46 more
      Caused by: org.mozilla.javascript.WrappedException: Wrapped
      java.lang.NullPointerException
      (resource://org/apache/cocoon/components/flow/javascript/fom/fom_system.js#19)
      at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1776)
      at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:191)
      at org.mozilla.javascript.ScriptableObject.getByGetter(ScriptableObject.java:1617)
      at org.mozilla.javascript.ScriptableObject.get(ScriptableObject.java:177)
      at org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:1263)
      at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1332)
      at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1321)
      at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2744)
      at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2164)
      at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:140)
      at org.mozilla.javascript.Context.call(Context.java:497)
      at org.mozilla.javascript.ScriptableObject.callMethod(ScriptableObject.java:1496)
      at org.mozilla.javascript.ScriptableObject.callMethod(ScriptableObject.java:1466)
      at
      org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.handleContinuation(FOM_JavaScriptInterpreter.java:861)
      at
      org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(CallFunctionNode.java:123)
      ... 67 more
      Caused by: java.lang.NullPointerException
      at
      org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon.jsGet_continuation(FOM_Cocoon.java:252)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:174)
      ... 80 more


      Note that this error occurs with rhino 1.6r1 (taken from cocoon trunk svn),
      rhino 1.6r1 taken from mozilla.org and the cvs head from mozilla.org, but is
      working with rhino1.5r4-continuations-R26.jar

        Activity

        Hide
        Philippe Gassmann added a comment -
        Created an attachment (id=16162)
        Test case

        Test case : it contains a sitemap, a flowscript and finally a jx template.
        Just display the form pipeline and click on the submit button twice.
        Show
        Philippe Gassmann added a comment - Created an attachment (id=16162) Test case Test case : it contains a sitemap, a flowscript and finally a jx template. Just display the form pipeline and click on the submit button twice.
        Hide
        Sylvain Wallez added a comment -
        Weird... After some debugging, it looks like JS contexts get mixed up somewhere
        in Rhino, as the "cocoon" object which is used as the continuation call scope in
        handleContinuation() is not the same as the one on which the
        jsGet_continuation() call is done.

        The use case here is that a <map:call function> sends a page whose processing
        calls itself a <map:call continuation>. We have nested flowscript calls.

        I don't have time to investigate further ATM, but a workaround is to change the
        POST URL to "form" so that we don't have nested flowscript calls when calling
        continuations.
        Show
        Sylvain Wallez added a comment - Weird... After some debugging, it looks like JS contexts get mixed up somewhere in Rhino, as the "cocoon" object which is used as the continuation call scope in handleContinuation() is not the same as the one on which the jsGet_continuation() call is done. The use case here is that a <map:call function> sends a page whose processing calls itself a <map:call continuation>. We have nested flowscript calls. I don't have time to investigate further ATM, but a workaround is to change the POST URL to "form" so that we don't have nested flowscript calls when calling continuations.
        Hide
        Carsten Ziegeler added a comment -
        Is this still an issue with latest version (2.1.10)?
        Show
        Carsten Ziegeler added a comment - Is this still an issue with latest version (2.1.10)?
        Hide
        aleksander.bandelj added a comment -
        Yes, issue still exists with 2.1.10
        Show
        aleksander.bandelj added a comment - Yes, issue still exists with 2.1.10
        Hide
        Antonio Gallardo added a comment -
        This issue exists also in the current 2.1.11-dev trunk.
        Show
        Antonio Gallardo added a comment - This issue exists also in the current 2.1.11-dev trunk.
        Hide
        Antonio Gallardo added a comment -
        The attached test case still shows the error. Also the Sylvain comment is still valid. Looking into rhino, there are 2 interesting issues that seems to be close to this one:

        https://bugzilla.mozilla.org/show_bug.cgi?id=347154
        https://bugzilla.mozilla.org/show_bug.cgi?id=366550

        This is also another interesting link that may help to understand how rhino 1.6 is different that rhino 1.5 (our older forked version):

        http://www.mozilla.org/rhino/scopes.html
        Show
        Antonio Gallardo added a comment - The attached test case still shows the error. Also the Sylvain comment is still valid. Looking into rhino, there are 2 interesting issues that seems to be close to this one: https://bugzilla.mozilla.org/show_bug.cgi?id=347154 https://bugzilla.mozilla.org/show_bug.cgi?id=366550 This is also another interesting link that may help to understand how rhino 1.6 is different that rhino 1.5 (our older forked version): http://www.mozilla.org/rhino/scopes.html
        Hide
        Antonio Gallardo added a comment -
        wiki page describing a workaround for this issue:

        http://wiki.apache.org/cocoon/WorkaroundForCOCOON-1579
        Show
        Antonio Gallardo added a comment - wiki page describing a workaround for this issue: http://wiki.apache.org/cocoon/WorkaroundForCOCOON-1579
        Hide
        Antonio Gallardo added a comment -
        Feedback was received long ago.
        Show
        Antonio Gallardo added a comment - Feedback was received long ago.
        Hide
        imran pariyani added a comment - - edited
        I am also facing a similar problem but in my case the scenario is a bit different . I have a form which i submit and if everything is ok then in the flowscript i use sendpage(some pipeline).. this pipeline is again with a form and it calls the flowscript which generates a new continuation .. now if i try to submit this form i get a nullpointerexception .. below is the stacktrace ..

        i tried the workaround mentioned here .. but still i get the same error :(

        Any help would be appreciated

        java.lang.NullPointerException
        at org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon.jsGet_request(FOM_Cocoon.java:578)
        at sun.reflect.GeneratedMethodAccessor94.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:145)
        at org.mozilla.javascript.ScriptableObject.getByGetter(ScriptableObject.java:1677)
        at org.mozilla.javascript.ScriptableObject.get(ScriptableObject.java:180)
        at org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:1315)
        at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1337)
        at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1326)
        at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:2816


        i just tried the same with cocoon-2.1.10 samples .. in the blocks/forms/flow/binding_example.js
        change in the method form2bean(form) the line with sendpage
        cocoon.sendPage("form2bean.flow", { "form2bean": bean });
        send it to any pipeline with cforms and the if u try to submit that form u get to following exception in the method jsGet_request:

        Sitemap: error calling continuation
        java.lang.NullPointerException
        at org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon.jsGet_request(FOM_Cocoon.java:575)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:145)
        at org.mozilla.javascript.ScriptableObject.getByGetter(ScriptableObject.java:1677)
        at org.mozilla.javascript.ScriptableObject.get(ScriptableObject.java:180)
        at org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:1315)
        at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1337)
        at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1326)
        at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:2816)
        at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2251)
        at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:161)
        at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:340)
        at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2758)
        at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:159)
        at org.mozilla.javascript.Context.call(Context.java:489)
        at org.mozilla.javascript.ScriptableObject.callMethod(ScriptableObject.java:1556)
        at org.mozilla.javascript.ScriptableObject.callMethod(ScriptableObject.java:1526)
        at org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.handleContinuation(FOM_JavaScriptInterpreter.java:839)
        at org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(CallFunctionNode.java:124)
        at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)

        Show
        imran pariyani added a comment - - edited I am also facing a similar problem but in my case the scenario is a bit different . I have a form which i submit and if everything is ok then in the flowscript i use sendpage(some pipeline).. this pipeline is again with a form and it calls the flowscript which generates a new continuation .. now if i try to submit this form i get a nullpointerexception .. below is the stacktrace .. i tried the workaround mentioned here .. but still i get the same error :( Any help would be appreciated java.lang.NullPointerException at org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon.jsGet_request(FOM_Cocoon.java:578) at sun.reflect.GeneratedMethodAccessor94.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:145) at org.mozilla.javascript.ScriptableObject.getByGetter(ScriptableObject.java:1677) at org.mozilla.javascript.ScriptableObject.get(ScriptableObject.java:180) at org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:1315) at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1337) at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1326) at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:2816 i just tried the same with cocoon-2.1.10 samples .. in the blocks/forms/flow/binding_example.js change in the method form2bean(form) the line with sendpage cocoon.sendPage("form2bean.flow", { "form2bean": bean }); send it to any pipeline with cforms and the if u try to submit that form u get to following exception in the method jsGet_request: Sitemap: error calling continuation java.lang.NullPointerException at org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon.jsGet_request(FOM_Cocoon.java:575) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:145) at org.mozilla.javascript.ScriptableObject.getByGetter(ScriptableObject.java:1677) at org.mozilla.javascript.ScriptableObject.get(ScriptableObject.java:180) at org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:1315) at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1337) at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1326) at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:2816) at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2251) at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:161) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:340) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2758) at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:159) at org.mozilla.javascript.Context.call(Context.java:489) at org.mozilla.javascript.ScriptableObject.callMethod(ScriptableObject.java:1556) at org.mozilla.javascript.ScriptableObject.callMethod(ScriptableObject.java:1526) at org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.handleContinuation(FOM_JavaScriptInterpreter.java:839) at org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(CallFunctionNode.java:124) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
        Hide
        Reynaldo Porras added a comment -
        I try the test case above and this issue still exist in current 2.2-trunk rev 628673
        Show
        Reynaldo Porras added a comment - I try the test case above and this issue still exist in current 2.2-trunk rev 628673
        Hide
        Reynaldo Porras added a comment -
        Wiki page updated for a workaround on cocoon 2.2 too

        http://wiki.apache.org/cocoon/WorkaroundForCOCOON-1579
        Show
        Reynaldo Porras added a comment - Wiki page updated for a workaround on cocoon 2.2 too http://wiki.apache.org/cocoon/WorkaroundForCOCOON-1579
        Hide
        Jeroen Reijn added a comment -
        Added to 2.1.11, because this still occurs.
        Show
        Jeroen Reijn added a comment - Added to 2.1.11, because this still occurs.

          People

          • Assignee:
            Unassigned
            Reporter:
            Philippe Gassmann
          • Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:

              Development