Hi,

I'm stuck wtih a problem where the valueStackFactory is null, and this
causes DWRValidator to fail. I had posted the stacktrace earlier, but didn't
get much responses.
Please confirm some of my assumptions reg the initialization process, so
that i can do some meaningful debugging:
1. Dispatcher.init() has a container.inject(*this*); - which i'm assuming
sets all properties that are annotated with @inject, like :

@Inject

*public* *void* setValueStackFactory(ValueStackFactory fac) {

*this*.valueStackFactory = fac;

}
2. StrutsPrepareFilter calls the Dispatcher.init() right? - how long in the
request lifecycle does the injected objects live? -- ex: i've DWRServlet
that's invoked after both Prepare and Execute filters, but at that point
valueStackFactory is null ; where does it get destroyed , and how will i
ensure that i've a handle to it in the servlet?

3. In a normal action invocation (ie non-DWR), the extraContext
.containsKey(ActionContext.*VALUE_STACK*) is true, while when the same is
invoked via DWR, this entry is not added to context map , while the other
keys like request, session, atttrs etc. are all present. Due to this, the
stack creation is attempted , i.e

stack = valueStackFactory.createValueStack();
and i get the dreaded NPE.

Any inputs on how to set the valuestack or valuestackFactory at the right
point in the flow will solve my problem.

Thanks,
Joseph

Reply via email to