adfemg
  1. adfemg
  2. ADFEMG-191

12c error : HttpSessionScopeAdapter : Request is in an invalid state

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Labels:
      None

      Description

      hi

      Please consider the example application created using JDeveloper 12.1.2.0.0
      at http://www.consideringred.com/files/oracle/2013/RequestInInvalidStateApp-v0.01.zip

      It has two pages that show session information and allow to invalidate the session and navigate from one to the other page.

      It allows to reproduce the following scenario (sc1) :

      • (sc1-a) run the sessionInfoA view in JDeveloper, which shows a session object String on the page (e.g. "weblogic.servlet.internal.session.MemorySessionData@cbaaf5b")
      • (sc1-b) click the button "do invalidateSession and goSessionInfoB", which shows the sessionInfoB page with a different session object String (confirming we have a different session)
      • (sc1-c) check the "IntegratedWebLogicServer - Log" panel in JDeveloper, showing the error
        <Dec 3, 2013 9:10:47 AM CET> <Error> <oracle.adf.share.http.HttpSessionScopeAdapter> <BEA-000000> <HttpSessionScopeAdapter:  Request is in an invalid state.  Could not access the request session.> 
        

      It also has a page that allows to login and logout which causes similar HttpSessionScopeAdapter errors to be logged.

      It allows to reproduce the following scenario (sc2) :

      • (sc2-a) run the loginInfo view in JDeveloper, which shows securityContext.userName as anonymous
      • (sc2-b) click the login link, which shows the login page
      • (sc2-c) login, e.g. using usergreen/welcome1 , which shows securityContext.userName no longer as anonymous (but e.g. usergreen) which confirms authentication
      • (sc2-d) click the logout link, which shows securityContext.userName as anonymous
      • (sc2-e) check the "IntegratedWebLogicServer - Log" panel in JDeveloper, showing the errors
        <Dec 3, 2013 9:11:45 AM CET> <Error> <oracle.adf.share.http.HttpSessionScopeAdapter> <BEA-000000> <HttpSessionScopeAdapter:  Request is in an invalid state.  Could not access the request session.> 
        <Dec 3, 2013 9:11:45 AM CET> <Error> <oracle.adf.share.http.HttpSessionScopeAdapter> <BEA-000000> <HttpSessionScopeAdapter:  Request is in an invalid state.  Could not access the request session.> 
        <Dec 3, 2013 9:11:45 AM CET> <Error> <oracle.adf.share.http.HttpSessionScopeAdapter> <BEA-000000> <HttpSessionScopeAdapter:  Request is in an invalid state.  Could not access the request session.> 
        <Dec 3, 2013 9:11:45 AM CET> <Error> <oracle.adf.share.http.HttpSessionScopeAdapter> <BEA-000000> <HttpSessionScopeAdapter:  Request is in an invalid state.  Could not access the request session.> 
        
      • (q1) How can these HttpSessionScopeAdapter errors in (sc1) and (sc2), about 'Request is in an invalid state', be explained?

      many thanks
      Jan Vervecken

        Activity

        Hide
        Jan Vervecken added a comment -

        We create Oracle service request 3-8185072051 for this. Also because we have an application that causes more than 500 log-lines for this error HttpSessionScopeAdapter to be logged for a single logout.

        Show
        Jan Vervecken added a comment - We create Oracle service request 3-8185072051 for this. Also because we have an application that causes more than 500 log-lines for this error HttpSessionScopeAdapter to be logged for a single logout.
        Hide
        Jan Vervecken added a comment -

        fyi

        Some feedback I got in SR 3-8185072051 :
        "... from the reported and verified behavior it seems you are hitting internal bug 16916289 ... which has already been fixed in a future JDeveloper 12c release (it should be 12.1.3.0.0) and it seems it's not an easy job to have a back-port to 12.1.2.0.0. ..."

        regards
        Jan Vervecken

        Show
        Jan Vervecken added a comment - fyi Some feedback I got in SR 3-8185072051 : "... from the reported and verified behavior it seems you are hitting internal bug 16916289 ... which has already been fixed in a future JDeveloper 12c release (it should be 12.1.3.0.0) and it seems it's not an easy job to have a back-port to 12.1.2.0.0. ..." regards Jan Vervecken
        Hide
        Jan Vervecken added a comment -

        fyi

        Combining the following feedback in SR 3-8185072051 ...

        ... allowed me to implement and configure a Filter ...

        package requestininvalidstateapp.loggingfilters;
        
        import java.util.logging.Filter;
        import java.util.logging.Level;
        import java.util.logging.LogRecord;
        
        public class HttpSessionScopeAdapterLoggingFilter
        	implements Filter
        {
        	@Override
        	public boolean isLoggable(LogRecord pLogRecord)
        	{
        		if (Level.SEVERE.equals(pLogRecord.getLevel()))
        		{
        			String vMessage = pLogRecord.getMessage();
        			if (vMessage != null && vMessage.contains("Request is in an invalid state.  Could not access the request session."))
        			{
        				return false;
        			}
        		}
        		return true;
        	}
        }
        

        ... available in the modified example application
        at http://www.consideringred.com/files/oracle/2013/RequestInInvalidStateApp-v0.02.zip

        ... which I have been able to use by configuring EXT_PRE_CLASSPATH in the file
        C:\Users\verveja\AppData\Roaming\JDeveloper\system12.1.2.0.40.66.68\DefaultDomain\bin\setDomainEnv.cmd

        set EXT_PRE_CLASSPATH=D:\screencast\RequestInInvalidStateApp-v0.02\RequestInInvalidStateApp\LoggingFilters\deploy\loggingfilters.jar
        echo EXT_PRE_CLASSPATH=%EXT_PRE_CLASSPATH%
        

        ... and by adding a logger configuration in the file
        C:\Users\verveja\AppData\Roaming\JDeveloper\system12.1.2.0.40.66.68\DefaultDomain\config\fmwconfig\servers\DefaultServer\logging.xml

          <logger name='oracle.adf.share.http.HttpSessionScopeAdapter'
            filter='requestininvalidstateapp.loggingfilters.HttpSessionScopeAdapterLoggingFilter'/>
        

        regards
        Jan Vervecken

        Show
        Jan Vervecken added a comment - fyi Combining the following feedback in SR 3-8185072051 ... "... note that the ADF error is diagnostic only and, while it is annoying to see, it should not have a functional impact on the HttpSession.invalidate() codepath ..." "... please, check the following article ... https://blogs.oracle.com/groundside/entry/selective_suppression_of_log_messages Selective Suppression of Log Messages By Duncan Mills ..." ... allowed me to implement and configure a Filter ... package requestininvalidstateapp.loggingfilters; import java.util.logging.Filter; import java.util.logging.Level; import java.util.logging.LogRecord; public class HttpSessionScopeAdapterLoggingFilter implements Filter { @Override public boolean isLoggable(LogRecord pLogRecord) { if (Level.SEVERE.equals(pLogRecord.getLevel())) { String vMessage = pLogRecord.getMessage(); if (vMessage != null && vMessage.contains("Request is in an invalid state. Could not access the request session.")) { return false; } } return true; } } ... available in the modified example application at http://www.consideringred.com/files/oracle/2013/RequestInInvalidStateApp-v0.02.zip ... which I have been able to use by configuring EXT_PRE_CLASSPATH in the file C:\Users\verveja\AppData\Roaming\JDeveloper\system12.1.2.0.40.66.68\DefaultDomain\bin\setDomainEnv.cmd set EXT_PRE_CLASSPATH=D:\screencast\RequestInInvalidStateApp-v0.02\RequestInInvalidStateApp\LoggingFilters\deploy\loggingfilters.jar echo EXT_PRE_CLASSPATH=%EXT_PRE_CLASSPATH% ... and by adding a logger configuration in the file C:\Users\verveja\AppData\Roaming\JDeveloper\system12.1.2.0.40.66.68\DefaultDomain\config\fmwconfig\servers\DefaultServer\logging.xml <logger name='oracle.adf.share.http.HttpSessionScopeAdapter' filter='requestininvalidstateapp.loggingfilters.HttpSessionScopeAdapterLoggingFilter'/> regards Jan Vervecken
        Hide
        chriscmuir added a comment -

        Internal (non published) bug 16916289 for this has been fixed for 12.1.3. I'll close the ADF EMG issue as a result. If the issue is not resolved on the 12.1.3 public release, please reopen the issue.

        CM.

        Show
        chriscmuir added a comment - Internal (non published) bug 16916289 for this has been fixed for 12.1.3. I'll close the ADF EMG issue as a result. If the issue is not resolved on the 12.1.3 public release, please reopen the issue. CM.

          People

          • Assignee:
            Unassigned
            Reporter:
            Jan Vervecken
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: