I've got a simple app for which I'm using latest 2.1.X from SVN.

I've got the following in my sitemap:

  <map:flow language="javascript">
      <map:script src="flow.js"/>
  </map:flow>

 <map:pipelines>
   <map:pipeline>
     <map:match pattern="">
       <map:call function="testFunc"/>
     </map:match>

     <map:match pattern="welcome">
      <map:generate src="welcome.xml"/>
      <map:transform src="template.xsl"/>
      <map:serialize/>
     </map:match>

   </map:pipeline>

And this, very simple flow function:

function testFunc() {
   print("HELLO");
   cocoon.sendPage("welcome");
}

Which gives me this exception:

java.lang.ClassCastException
at org.mozilla.javascript.optimizer.InvokerImpl.createInvoker(InvokerImpl.java:273)
        at 
org.mozilla.javascript.FunctionObject.doInvoke(FunctionObject.java:520)
at org.mozilla.javascript.FunctionObject.callVarargs(FunctionObject.java:538)
        at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:403)
        at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244)
at org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:1134) at org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:190) at org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:138) at org.mozilla.javascript.continuations.InterpretedFunctionImpl.call(InterpretedFunctionImpl.java:121)
        at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244)
at org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.callFunction(FOM_JavaScriptInterpreter.java:758) at org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(CallFunctionNode.java:138) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)

While I'm at it, http://localhost:8888/samples/flow/jxcalc/ is giving:

TypeError: function FOM_WebContinuation() {
        [native code]
}
is not a function. (resource://org/apache/cocoon/components/flow/javascript/fom/fom_system.js; line 19) at org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:581) at org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:541)
        at org.mozilla.javascript.NativeGlobal.typeError1(NativeGlobal.java:551)
        at 
org.mozilla.javascript.ScriptRuntime.newObject(ScriptRuntime.java:1324)
at org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:1201) at org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:190) at org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:138) at org.mozilla.javascript.continuations.InterpretedFunctionImpl.call(InterpretedFunctionImpl.java:121)
        at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244)
at org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.callFunction(FOM_JavaScriptInterpreter.java:758) at org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(CallFunctionNode.java:138) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)

Any ideas? Quite a bit of other stuff doesn't work, too.

Am I the only one?

Regards, Upayavira

Reply via email to