Unable to Import Users Into a Directory Due to Tomcat Session Already Invalidated

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

When importing a large number of users or groups into a directory in Crowd, the import fails after a long time with a system error.

The following appears on screen and also in the atlassian-crowd.log:

1 2012-03-21 06:37:49,576 http-8095-4 INFO [atlassian.xwork.interceptors.TransactionalInvocation] Invoking rollback for transaction on action '/console/secure/dataimport/directoryconfirmation.action (DirectoryConfirmation.execute())' due to throwable: java.lang.IllegalStateException: getAttribute: Session already invalidated

Cause

The amount of time it took to perform the directory import exceeded Tomcat's session-timeout value (which is set to 30 minutes by default). This issue is tracked here: CWD-2638 - Import failed despite being reported is finished due to 'Session already invalidated'.

Workaround

  1. Make a note of how long it takes before the import fails.

  2. Locate and open <crowd_install>/apache-tomcat/conf/web.xml in a text editor.

  3. Locate the following line and increase the numeric value (in minutes) as necessary to accomodate the import (currently set to 30 in this example):

    1 <session-timeout>30</session-timeout>

    ℹ️ For more details on the Tomcat web.xml, please see: http://tomcat.apache.org/tomcat-6.0-doc/appdev/web.xml.txt

Resolution

This issue is being tracked here: CWD-2638 - Import failed despite being reported is finished due to 'Session already invalidated'

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.