cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcus Wejderot" <mar...@wejderot.se>
Subject Re: CForms/Ajax
Date Fri, 26 Oct 2007 23:07:30 GMT
Hi all,

Sorry for not being more specific last time. I still can't get the Ajax parts to work, but
keep getting NullPointerExceptions. I am using Cocoon 2.2 and maybe this is a known problem.
More probable is that I have missed some detail. 

The exception is thrown both when the form is validated through ajax (when clicking submit)
and when a on-value-changed action is triggered. The stacktrace is found below.

Any help is highly appreciated!

Thanks,
Marcus


Caused by: org.apache.cocoon.ProcessingException: Failed to process pipeline
        at [SAXParseException] - resource://org/apache/cocoon/forms/generation/jx-macros.xml:65:52
        at [SAXParseException] - file:/d:/Projekt/Cocoon/company/clients/./src/main/resources/COB-INF/content/send-sms.jx:24:35
        at [SAXParseException] - resource://org/apache/cocoon/forms/generation/jx-macros.xml:54:23
        at [SAXParseException] - file:/d:/Projekt/Cocoon/company/clients/./src/main/resources/COB-INF/content/send-sms.jx:13:96
        at <map:serialize type="xml"> - file:/d:/Projekt/Cocoon/company/clients/./src/main/resources/COB-INF/sitemap.xmap:178:33
        at <map:transform type="i18n"> - file:/d:/Projekt/Cocoon/company/clients/./src/main/resources/COB-INF/sitemap.xmap:177:34
        at <map:transform> - file:/d:/Projekt/Cocoon/company/clients/./src/main/resources/COB-INF/sitemap.xmap:176:52
        at <map:transform type="i18n"> - file:/d:/Projekt/Cocoon/company/clients/./src/main/resources/COB-INF/sitemap.xmap:175:34
        at <map:transform type="browser-update"> - file:/d:/Projekt/Cocoon/company/clients/./src/main/resources/COB-INF/sitemap.xmap:174:44
        at <map:generate type="jx"> - file:/d:/Projekt/Cocoon/company/clients/./src/main/resources/COB-INF/sitemap.xmap:173:52
        at <map:match> - file:/d:/Projekt/Cocoon/company/clients/./src/main/resources/COB-INF/sitemap.xmap:172:36
        at resource://org/apache/cocoon/forms/flow/javascript/Form.js:257
        at ajaxForm - file:/d:/Projekt/Cocoon/company/clients/./src/main/resources/COB-INF/flow/company.js:38
        at <map:call> - file:/d:/Projekt/Cocoon/company/clients/./src/main/resources/COB-INF/sitemap.xmap:167:35
        at <map:match> - file:/d:/Projekt/Cocoon/company/clients/./src/main/resources/COB-INF/sitemap.xmap:166:36
        at org.apache.cocoon.ProcessingException.throwLocated(ProcessingException.java:143)
        at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.handleException(AbstractProcessingPipeline.java:921)
        at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:546)
        at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:437)
        at sun.reflect.GeneratedMethodAccessor37.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.cocoon.core.container.spring.avalon.PoolableProxyHandler.invoke(PoolableProxyHandler.java:61)
        at $Proxy3.process(Unknown Source)
        at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:143)
        at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:55)
        at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:87)
        at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:77)
        at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:151)
        at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:77)
        at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
        at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:240)
        at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.handleCocoonRedirect(ConcreteTreeProcessor.java:315)
        at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor$TreeProcessorRedirector.cocoonRedirect(ConcreteTreeProcessor.jav
a:365)
        at org.apache.cocoon.environment.ForwardRedirector.redirect(ForwardRedirector.java:62)
        at org.apache.cocoon.components.flow.AbstractInterpreter.forwardTo(AbstractInterpreter.java:196)
        at org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.forwardTo(FOM_JavaScriptInterpreter.java:705)
        at org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon.forwardTo(FOM_Cocoon.java:718)
        at org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon.jsFunction_sendPage(FOM_Cocoon.java:264)
        at sun.reflect.GeneratedMethodAccessor138.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.FunctionObject.call(FunctionObject.java:471)
        at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3085)
        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.ScriptRuntime.call(ScriptRuntime.java:915)
        at org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.callFunction(FOM_JavaScriptInterpreter.java:602)
        at org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(CallFunctionNode.java:109)
        at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:55)
        at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:87)
        at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:77)
        at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:151)
        at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:77)
        at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
        at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:240)
        at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:171)
        at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:251)
        at org.apache.cocoon.servlet.RequestProcessor.process(RequestProcessor.java:357)
        at org.apache.cocoon.servlet.RequestProcessor.service(RequestProcessor.java:171)
        ... 38 more
Caused by: org.apache.cocoon.components.expression.ExpressionException: Couldn't evaluate
expression cformsHelper.pushWidget(id)
        at org.apache.cocoon.template.instruction.Call.execute(Call.java:149)
        at org.apache.cocoon.template.script.Invoker.execute(Invoker.java:70)
        at org.apache.cocoon.template.JXTemplateGenerator.performGeneration(JXTemplateGenerator.java:140)
        at org.apache.cocoon.template.JXTemplateGenerator.generate(JXTemplateGenerator.java:131)
        at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.cocoon.core.container.spring.avalon.PoolableProxyHandler.invoke(PoolableProxyHandler.java:61)
        at $Proxy10.generate(Unknown Source)
        at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:542)
        ... 84 more
Caused by: org.apache.cocoon.components.expression.ExpressionException: Couldn't evaluate
expression cformsHelper.pushWidget(id)
        at org.apache.cocoon.template.instruction.EvalBody.execute(EvalBody.java:49)
        at org.apache.cocoon.template.script.Invoker.execute(Invoker.java:73)
        at org.apache.cocoon.template.instruction.Call.execute(Call.java:145)
        ... 93 more
Caused by: org.apache.cocoon.components.expression.ExpressionException: Couldn't evaluate
expression cformsHelper.pushWidget(id)
        at org.apache.cocoon.template.instruction.Call.execute(Call.java:149)
        at org.apache.cocoon.template.script.Invoker.execute(Invoker.java:70)
        at org.apache.cocoon.template.instruction.EvalBody.execute(EvalBody.java:46)
        ... 95 more
Caused by: org.apache.cocoon.components.expression.ExpressionException: Couldn't evaluate
expression cformsHelper.pushWidget(id)
        at org.apache.cocoon.template.instruction.If.execute(If.java:65)
        at org.apache.cocoon.template.script.Invoker.execute(Invoker.java:73)
        at org.apache.cocoon.template.instruction.Call.execute(Call.java:145)
        ... 97 more
Caused by: org.apache.cocoon.components.expression.ExpressionException: Couldn't evaluate
expression cformsHelper.pushWidget(id)
        at org.apache.cocoon.components.expression.jexl.JexlExpression.evaluate(JexlExpression.java:50)
        at org.apache.cocoon.template.expression.JXTExpression.getValue(JXTExpression.java:135)
        at org.apache.cocoon.template.instruction.If.execute(If.java:63)
        ... 99 more
Caused by: java.lang.NullPointerException
        at org.apache.cocoon.forms.generation.JXMacrosHelper.pushWidget(JXMacrosHelper.java:187)
        at org.apache.cocoon.forms.generation.JXMacrosHelper.pushWidget(JXMacrosHelper.java:255)
        at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.commons.jexl.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:268)
        at org.apache.commons.jexl.parser.ASTMethod.execute(ASTMethod.java:61)
        at org.apache.commons.jexl.parser.ASTReference.execute(ASTReference.java:68)
        at org.apache.commons.jexl.parser.ASTReference.value(ASTReference.java:50)
        at org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:86)
        at org.apache.cocoon.components.expression.jexl.JexlExpression.evaluate(JexlExpression.java:48)
        ... 101 more


  ----- Original Message ----- 
  From: Marcus Wejderot 
  To: users@cocoon.apache.org 
  Sent: Thursday, October 25, 2007 7:13 PM
  Subject: CForms/Ajax


  Hi,

  I am trying to learn cforms, and I get more and more impressed every day. I can't, however,
get the ajax part to work properly. Is there a simple example out there that shows how it
should be done? I find the provided samples quite "messy" (sorry for the expression) when
it comes to this. Or maybe someone could explain what kind of pipelines I need to set up.

  Thanks,
  Marcus
Mime
View raw message