Could not Deserialize the session data

Recently there was an issue with the session not getting invalidated upon logging out in adf page. we were using the following code to invalidate the session in the logout method

FacesContext fc = FacesContext.getCurrentInstance();
ExternalContext ec = fc.getExternalContext();
HttpServletRequest req = (HttpServletRequest) ec.getRequest();
HttpServletResponse res = (HttpServletResponse) ec.getResponse();
HttpSession ses = (HttpSession) req.getSession(false);

with the above code the following exception was thrown to the user

 at oracle.adf.share.http.HttpUtil.getAttribute(
 at oracle.adf.share.http.HttpSessionScopeAdapter.get(
 at oracle.jbo.common.ampool.SessionCookieImpl.<init>(
 at oracle.jbo.http.HttpSessionCookieImpl.<init>(
 at oracle.jbo.http.HttpSessionCookieImpl.<init>(
 at oracle.jbo.http.HttpSessionCookieFactory.createSessionCookie(
 at oracle.jbo.common.ampool.ApplicationPoolImpl.createSessionCookie(
 at oracle.adf.model.bc4j.DataControlFactoryImpl.findOrCreateSessionCookie(
 at oracle.adf.model.bc4j.DataControlFactoryImpl.createSession(
 at oracle.adf.model.binding.DCDataControlReference.getDataControl(
 at oracle.adf.model.BindingContext.get(
 at oracle.adf.model.binding.DCUtil.findSpelObject(
 at oracle.adf.model.binding.DCUtil.findSpelObject(
 at oracle.adf.model.binding.DCUtil.findContextObject(
 at oracle.adf.model.binding.DCIteratorBinding.<init>(
 at oracle.jbo.uicli.binding.JUIteratorBinding.<init>(

the issue is solved using the solution given in this forum

ie. we have to release the Datacontrol also to invalidate the session

ValueBinding vb = fc.getCurrentInstance().getApplication().createValueBinding("#{data}");
BindingContext bc = (BindingContext)vb.getValue(fc.getCurrentInstance());
DataControl dc = bc.findDataControl("DataControl");

2 thoughts on “Could not Deserialize the session data

  1. shanthi

    i too have a similar scenario
    My code is:
    public String doLogout() {
    FacesContext ctx = FacesContext.getCurrentInstance();
    ExternalContext eCtx = ctx.getExternalContext();
    String url = eCtx.getRequestContextPath() + “/logoutservlet”;
    try {
    } catch (Exception e) {

    return “”;


    Where should i release the Datacontrol also to invalidate the session?Kindly reply


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s