cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Denis" <denis.thie...@aic-info.com>
Subject Re: Call continuations from flow instead of sitemap
Date Fri, 02 Apr 2004 09:02:12 GMT
Hi leszek,

Could it be your loginValidator that in fact generates the NPE?

//function header
function loginValidator( form )

and at line 62 you wrote
 form.validator = loginValidator;
try:
  form.validator = loginValidator(form);
instead ...

Hope this help,

Regards,

Denis


> On Thu, Apr 01, 2004 at 02:39:05PM -0500, Vadim Gritsenko wrote:
> > Leszek Gawron wrote:
> >
> > >I have this snipped in one of my .js files :
> > >
> > >
> > ...
> >
> > >function runContinuation( action ) {
> > >
> > >
> >
> > Provided that "action" contains continuation ID and not actual
> > continuation object... you need to lookupWebContinuation from the
> > ContinuationsManager component, this will give you WebContinuation
> > object. Once you have it... Something like this should be able to invoke
it:
> >
> >    var wk = contManager.lookupWebContinuation(action);
> >    var c = wk.getContinuation();
> >    c(c);
> Vadim,
> This does not work. I get this exception:
>
> rg.apache.avalon.framework.CascadingRuntimeException:
"resource://org/apache/cocoon/forms/flow/javascript/Form.js", line 106:
uncaught JavaScript exception: at main
(file:/C:/dev/eclipse-workspace/nTer/build/webapp/nTer/flow/test.js, Line
12) at (resource://org/apache/cocoon/forms/flow/javascript/Form.js, Line
106): java.lang.NullPointerException
>
> org.apache.avalon.framework.CascadingRuntimeException:
"resource://org/apache/cocoon/forms/flow/javascript/Form.js", line 106:
uncaught JavaScript exception:
> at main
(file:/C:/dev/eclipse-workspace/nTer/build/webapp/nTer/flow/test.js, Line
12)
> at  (resource://org/apache/cocoon/forms/flow/javascript/Form.js, Line
106):
> java.lang.NullPointerException
> at
org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.c
allFunction(FOM_JavaScriptInterpreter.java:695)
> at
org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(C
allFunctionNode.java:130)
> at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:49)
> at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
e(PreparableMatchNode.java:130)
> at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:72)
> at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
ineNode.java:126)
> at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:72)
> at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
linesNode.java:101)
> at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:336)
> at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:277)
> at
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNod
e.java:103)
> at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:49)
> at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
e(PreparableMatchNode.java:130)
> at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:72)
> at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
ineNode.java:126)
> at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:72)
> at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
linesNode.java:101)
> at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:336)
> at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:277)
> at org.apache.cocoon.Cocoon.process(Cocoon.java:619)
> at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1074)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:356)
> at
org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicatio
nHandler.java:342)
> at
com.mobilebox.hibernate.PersistenceManager.doFilter(PersistenceManager.java:
65)
> at
org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicatio
nHandler.java:334)
> at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandl
er.java:286)
> at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
> at org.mortbay.http.HttpContext.handle(HttpContext.java:1808)
> at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext
.java:525)
> at org.mortbay.http.HttpContext.handle(HttpContext.java:1758)
> at org.mortbay.http.HttpServer.service(HttpServer.java:879)
> at org.mortbay.http.HttpConnection.service(HttpConnection.java:790)
> at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:952)
> at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807)
> at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:197)
> at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
> at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:496)
> Caused by: java.lang.NullPointerException
> at
org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon.jsGet_request(FO
M_Cocoon.java:1350)
> at
org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon.getRequest(FOM_C
ocoon.java:1404)
> at
org.apache.cocoon.forms.flow.javascript.FormsFlowHelper.getFormContext(Forms
FlowHelper.java:37)
> 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.NativeJavaMethod.call(NativeJavaMethod.java:230)
> at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244)
> at
org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(Conti
nuationInterpreter.java:1134)
> at
org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(Conti
nuationInterpreter.java:190)
> at
org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(Conti
nuationInterpreter.java:138)
> at
org.mozilla.javascript.continuations.InterpretedFunctionImpl.call(Interprete
dFunctionImpl.java:121)
> at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244)
> at
org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.c
allFunction(FOM_JavaScriptInterpreter.java:686)
> ... 37 more
>
> I have attached the source of test.js
>
> When I disable the call to loginInternal, main application view is being
> shown. But after I press an action button there is an error with page
local
> variable. So it looks like invoking continuation this way does not set the
run
> environment properly
>
> lg
> -- 
>             __
>          | /  \ |        Leszek Gawron            //  \\
>         \_\\  //_/       ouzo@wlkp.org           _\\()//_
>          .'/()\'.     Phone: +48(501)720812     / //  \\ \
>           \\  //  recursive: adj; see recursive  | \__/ |
>
>


Mime
View raw message