You need to post up a lot more of the xhtml code, java backing bean code and server stack trace (if any) to get further
assistance. You say that the page is complex but can you reduce it down to a simple excerpt that exhibits the problem?
Of course, no, there isn't any (visible) stack trace. Is there a way to catch this RuntimeException?
And I guess you won't be happy if I would post the whole xhtml.
I also assume that the error will disappear if I remove some parts of the page.
The background of my question was the hope to get a more concrete (an fast) approach (e. g. based on a4j:log output, jsf node tree, ...) to get the reason than try and error.
But as long as no one has a better idea I have to try to create less complex scenarios.
1 of 1 people found this helpful
I can't suggest anything other than a divide and conquer approach I'm afraid, I've seen this happen before where an exception
is caught and indicated in the ajax response but nothing in the server log. At least if you post some code up there's a chance
that someone may be able to spot the likely cause of the problem.
After nearly the whole page was empty I saw this line
<f:event type="preRenderView" listener="..." />
and it came to my mind that this listener is also executed during ajax calls.
The project is using spring managed beans and within the listener method there is used a request scoped object. During the ajax call this (cglib) object wasn't initialized properly, so that an access of this object was throwing the RuntimeExecption.
I don't know whether my configuration is missing an important aspect or spring has a problem with getting the request (scope) during an jsf ajax call.
As a workaround I set a flag in the action that causes the preRenderView method to skip its inner part and avoid the access to the request scoped object.
So it is not a RF problem. Besides that it would be very helpful to get more information about the exception with in a4j:log anyway.
Thx and best regards,
I don't imagine that the flag will be preserved across requests with RequestScoped, you normally need to use
ViewScoped with ajax because the ajax request is a request in it's own right.
There is some discussion here regarding configuring JSF/Richfaces & Spring which may or may not be relevant
but I've no personal experience with this: