Handeling ADFC-12000 error
557719Jun 11 2010 — edited Jul 3 2013Hi,
A while ago with had some problems with handling the sessiontime out in an ADF 11.1.1.2.0 application. We got a server error which was from a functional point of view unacceptable. To solve this we did the http://www.yenlo.nl/harryvanoosten/2010/04/26/adf-11g-session-handling-avoiding-adfc-12012-error/.
But this isn't enough. Currently we see a lot of ADFC-12000 errors which end in an internal server error:
oracle.adf.controller.internal.AdfcIllegalStateException: oracle.adf.controller.ControllerException: ADFC-12000: State ID in request is invalid for the current session.
at oracle.adfinternal.controller.state.ControllerState.synchronizeStatePart2(ControllerState.java:509)
at oracle.adfinternal.controller.application.SyncNavigationStateListener.afterPhase(SyncNavigationStateListener.java:46)
at oracle.adfinternal.controller.lifecycle.ADFLifecycleImpl$PagePhaseListenerWrapper.afterPhase(ADFLifecycleImpl.java:531)
at oracle.adfinternal.controller.lifecycle.LifecycleImpl.internalDispatchAfterEvent(LifecycleImpl.java:120)
at oracle.adfinternal.controller.lifecycle.LifecycleImpl.dispatchAfterPagePhaseEvent(LifecycleImpl.java:168)
at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$PhaseInvokerImpl.dispatchAfterPagePhaseEvent(ADFPhaseListener.java:124)
at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.afterPhase(ADFPhaseListener.java:70)
at oracle.adfinternal.controller.faces.lifecycle.ADFLifecyclePhaseListener.afterPhase(ADFLifecyclePhaseListener.java:53)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:364)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
etc..
The documentation says the following:
ADFC-12000: State ID in request is invalid for the current session.
Cause: The request contained a state instance ID, but it did not exist in the session, nor was this a request for a bookmarked resource. This might be due to a session timeout.
Action: Contact the system administrator.
Level: 2
Type: ERROR
Impact: Session
We want to handle this exception as well in a functionally acceptable way.
We tried the following in the web xml didn't do much.
<error-page>
<exception-type>oracle.adf.controller.internal.AdfcIllegalStateException</exception-type>
<location>/sessionExp.jspx</location>
</error-page>
Also tried the following:
RequestState requestState = RequestState.getInstance();
requestState.isStateTokenInvalid();
But this can't be initialized in our filter. I think its to soon to have the context needed.
Anyone got a clue?
Edited by: Harry van Oosten on Jun 11, 2010 5:18 AM