Accessibility

TechNote (Archived)

ColdFusion MX 6.1: Session is invalid error when using J2EE session management

Issue


When using session variables within a Macromedia ColdFusion MX 6.1 application, the following error may occur if J2EE session management is enabled in the ColdFusion Administrator:

 Error Occurred While Processing Request Session is invalid 

The error is generated when the underlying J2EE session times out before the ColdFusion session times out.

By default, the J2EE session timeout is hard coded to 30 minutes in the cf_root\wwwroot\WEB-INF\web.xml configuration file. The ColdFusion session timeout is set on the Memory Variables page in the ColdFusion MX administrator or in acfapplication tag. If the timeout value set for the ColdFusion session is greater than 30 minutes, it is possible for the J2EE session to time out before the ColdFusion session times out, resulting in the "Session is invalid" error. This has been identified as Macromedia Issue 51982.

Solution


Using the steps below, ensure the J2EE session timeout is greater than or equal to the longest ColdFusion session timeout being specified in the ColdFusion Administrator or within acfapplication tag.

  1. Stop the ColdFusion MX Application service.
  2. Open the web.xml file for editing.
    Server Configuration:cf_root\wwwroot\WEB-INF\web.xml
  3. Set the J2EE session timeout to be greater than or equal to the longest ColdFusion session timeout set in your ColdFusion Administrator and/or cfapplication tag.
     <session-config><session-timeout>66</session-timeout></session-config> 

    In the example above, the J2EE session timeout is set to 66 minutes.
  4. Save the changes to the web.xml file.
  5. Start the ColdFusion MX Application service.

Note: Do not set the J2EE session timeout to an arbitrarily high value, like several days or weeks, as these session structures are retained in memory. Doing so may lead to excessive memory utilization which may negatively impact performance.

Additional Information


Related TechNotes:


AlertThis content requires Flash

To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.

Download the free Flash Player now!

Get Adobe Flash Player

Creative Commons License

Search Support


Document Details

ID:tn_19109
Browser:Chrome
Internet Explorer
Netscape
Opera
Safari
Firefox
Database:DB2
Informix
MySQL
Oracle
SQL Server
Sybase
MS Access

Products Affected: