Skip to Content
author's profile photo Former Member
Former Member

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.

Thanks!!!

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();

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Dec 11, 2013 at 12:57 PM

    Hi Brian,

    After you close the session and recreate the session, do you retrieve the IInfoObjects again from the infostore service or you are utilizing the the infoobject from the previous session?

    Here is the line I am referring to

    ISecurityInfo2 objSecurityInfo = boInfoObject.getSecurityInfo2();

    IEffectivePrincipals effectivePrincipals = objSecurityInfo.getEffectivePrincipals();

    Reason, once you logoff the old enterprise session, you create a new session, then you need to follow the enterprise process in relation to the new enterprise session and not any referrence with the old enterprise session which is logged off.

    Thanks,

    Prithvi

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      I think you hit it on the head. I'm still testing but it looks like while I was re-building my IInfoStore object, I wasn't re-building the IInfoObject (boInfoObject).

      Still testing but I will confirm this was the issue....

      Thanks!

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.