-
1. Re: meaning/reason of (a4j:log) 'class java.lang.RuntimeException' / 'object not found: 0'
healeyb Aug 18, 2012 8:36 AM (in response to roeber)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?
Regards,
Brendan.
-
2. Re: meaning/reason of (a4j:log) 'class java.lang.RuntimeException' / 'object not found: 0'
roeber Aug 18, 2012 10:59 AM (in response to healeyb)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.
Regards,
Axel
-
3. Re: meaning/reason of (a4j:log) 'class java.lang.RuntimeException' / 'object not found: 0'
healeyb Aug 18, 2012 11:24 AM (in response to roeber)1 of 1 people found this helpfulI 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.
Regards,
Brendan.
-
4. Re: meaning/reason of (a4j:log) 'class java.lang.RuntimeException' / 'object not found: 0'
roeber Aug 19, 2012 2:28 AM (in response to healeyb)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,
Axel
-
5. Re: meaning/reason of (a4j:log) 'class java.lang.RuntimeException' / 'object not found: 0'
healeyb Aug 19, 2012 5:49 AM (in response to roeber)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:
https://issues.jboss.org/browse/RFPL-1430http://www.mkyong.com/jsf2/jsf-2-0-spring-integration-example/
Regards,
Brendan.