Skip to Content
Former Member
Dec 11, 2013 at 04:56 AM

Avoiding error: "The session has been logged off or has expired. (FWM 01002)" after session kill / restore


I have a process that is pulling security information for objects in my environment. After a specified number of objects have been scanned, I am trying to 1) close my current user session, 2) re-open a session, then continue to 3) extract further security information. The initial security extraction is working fine, but after I close and re-open the session, security extraction no longer works and is throwing the following error:

Unable to reconnect to the CMS ......:6400. The session has been logged off or has expired. (FWM 01002)

Although it seems I am re-creating an enterprise session with no issue, the "securitySession" is no longer active. I say this as when I debug in Eclipse I see that there is a "m_sessionLoggedOff" property of some sort within the objSecurityInfo object (which is equal to true after logoff).

Can anyone advise as to what I need to do to properly close and re-open the session in order to be able to pull security info? Target environment is 3.1.


Code snippets:

es.logoff(); //ending my session

es = null;

psLog.println("enterprise session ended...");

es = CrystalEnterprise.getSessionMgr().logon(cmsusername, password, server, "secEnterprise");

psLog.println("created new enterprise session...");

//must also reinstanciate iStore for retrieving and examining additional objects downstream…

iStore = (IInfoStore) es.getService("", "InfoStore");

psLog.println("re-initialized infostore connection");


//now pulling security information

ISecurityInfo2 objSecurityInfo = boInfoObject.getSecurityInfo2();

IEffectivePrincipals effectivePrincipals = objSecurityInfo.getEffectivePrincipals(); //<- this is the line that throws the FWM 01002 error

Iterator objEffPrincipalIterator = effectivePrincipals.iterator();