Getting errors in my DFC code

1: [ERROR] 2020-04-02 12:46:57,447 com.documentum.fc.common.impl.preferences.PreferencesManager readPersistentProperties - [DFC_PREFERENCE_LOAD_FAILED] Failed to load persistent preferences from null
java.io.FileNotFoundException: dfc.properties

2: DfServiceException:: THREAD: http-bio-8080-exec-28; MSG: [DM_API_E_NO_SESSION]error:  "There are no more available sessions."; ERRORCODE: 100; NEXT: null

Comments

  • rappard
    edited April 21, 2020 #2
    Hi @Ram_Kishan_Maitry,

    Please try not to post in the General forum, product experts rarely check here. I'll move this thread to the Documentum Developer Forum, you'll get more views/replies there.

    Martin van Rappard
    Technical Support Engineer III
    OpenText

  • 1) java.io.FileNotFoundException: dfc.properties

    - Do you have this file on the machine you running this code on?

    2: DfServiceException:: THREAD: http-bio-8080-exec-28; MSG: [DM_API_E_NO_SESSION]error:  "There are no more available sessions."; ERRORCODE: 100; NEXT: null

    - This typically happens when you dont disconnect your session in your custom code.  To reset the sessions, you will need to restart the docbase or manually kill the sessions using Documentum Administrator app

  • DCTM_Guru said:
    1) java.io.FileNotFoundException: dfc.properties

    - Do you have this file on the machine you running this code on? yes I have this file in my code

    2: DfServiceException:: THREAD: http-bio-8080-exec-28; MSG: [DM_API_E_NO_SESSION]error:  "There are no more available sessions."; ERRORCODE: 100; NEXT: null

    - This typically happens when you dont disconnect your session in your custom code.  To reset the sessions, you will need to restart the docbase or manually kill the sessions using Documentum Administrator app : I am releasing every session in my code.

  • 1) Are you running your code on Windows or Linux?  If windows, make sure the documentum config is in your PATH (eg. c:\Documentum\config)
    2) Go to DA and see if the sessions are getting created by your code or something else (eg some other job)
  • 1: We are using Linux server.
    2: We are getting 'no more available session' error only in our web application while we havn't set any limit for session in our code.
    3: We have checked at the time of error, our content server session count is 30-40 only and in our content server server.ini file session limit is 500.
  • 1) Are you running your code through IDE or JVM?  If through IDE, did you include documentum dir that has dfc.properties as external reference.  If through JVM, then make sure you package dfc.properties in your JAR file.
    2) How are you creating your sessions?  Please post code where you are getting this error
    3) Please confirm that you are using DA to confirm session count.  FYI - I know Documentum web apps establish multiple sessions per user to facilitate caching and enhance performance.  You can see this in DA.
  • 1: We are running our code through IDE and yes we have included documentum dir that has dfc.properties as external reference.
    2: Please find our code for session creation below:
    public boolean checkLogin(String docbase_name, String user_name,String password) {
            private static IDfSession _idfSession;
            private IDfClient _idfClient;
            private IDfLoginInfo _idfLoingInfo;
            private static IDfSessionManager _idfSessionManager;
            private IDfClientX _idfClientX;
            boolean status = false;
                 _idfLoingInfo = new DfLoginInfo();
                 _idfLoingInfo.setUser(user_name);
                 _idfLoingInfo.setPassword(password);
                 _idfLoingInfo.setDomain(null);
                            try {
                                   _idfClientX = new DfClientX();
                                   _idfClient = _idfClientX.getLocalClient();
                                   _idfSessionManager = null;
                                    if (_idfSessionManager == null) {
                                              _idfSessionManager = _idfClient.newSessionManager();
                                              _idfSessionManager.setIdentity(docbase_name, _idfLoingInfo);
                                            }
                                              _idfSession = _idfSessionManager.getSession(docbase_name);
                                                    status = true;
                                    } catch (Exception dfe) {
                                                  dfe.printStackTrace();
                                                  status = false;
                                                 }
                                             return status;
                           }

    3: We are using dqMan for session count check.
  • 1) If you are debugging your code in IDE, then you need to include the Documentum config folder (which contains dfc.properties) as external dir as part of your build.  Similar to this: https://dmnotes.wordpress.com/2007/10/10/configuring-eclipse-for-dfc-projects/

    2) Where are you releasing your sessions?
  • 1: We have followed same procedure as suggested by you in 1st point.

    2: We are using another method for session release, please find below.

    public void idfReleaseSession(IDfSession session){
    _idfSessionManager.release(session);
    }
    public void idfReleaseSession(){
    if ((_idfSessionManager != null) && (_idfSession != null) && (_idfSession.isConnected())) 
    {
    _idfSessionManager.release(_idfSession);
    }
    _idfSession = null;
    _idfSessionManager = null;
    }

    Please suggest if these are the correct way to release sessions.
  • Where are you calling these methods to release your session?  You should release your session as part of any "transaction", so at the end of your checkin method, you should release session as part of finally in your try/catch.
  • We are releasing every session created through checkin method at finally block.
  • Although we are following all procedure still getting 'no more available session error'. Please suggest. 
  • Since you are testing this in your IDE, you have full control on when your code is run.  So you can monitor creation/termination of sessions before, during, and after you run your code.
  • We have tested the code multiple times in IDE and we havn't found any session error but post deployment in production we are getting 'no more sessions available error'. 
  • DCTM_Guru
    edited May 6, 2020 #16
    Do you have any custom jobs?  If so, you might not be releasing sessions in your jobs properly.  Like I said before, you can monitor sessions in Documentum Administrator and actually see who is creating all these "excessive" sessions and not releasing them.  If they are getting created by docbase owner, then its definitely a job that is not releasing session.
  • No, we havn't scheduled any custom jobs.
  • Who is creating these excessive sessions then?
  • We are getting this session issue only in our code,,, while content server sessions are normal at that time period.
    We havn't set any session limit for our application code.
  • So its somewhere in your code.  I would be put logging statements in your code and see what part of your code is generating sessions and how often.  Each session has its own unique ID so you should be able to track them easily.
  • Please guide me, how can I put logging statement to track the session in my code. Thanks
  • You can use System.out or DfLogger.  Whatever you are comfortable with as java developer.