Getting multiple error in custom app by using DFC

Options
Ram_Kishan_Maitry
edited August 15, 2023 in Documentum #1

Hi Team,

We have written a custom web application using DFC code for viewing/uploading/downloading documents. During these activities, the listing of documents, viewing/uploading/downloading the document we are creating sessions and post completion, releasing at every step.

We are also done the session pooling setting in dfc.properties file.
dfc.session.pool.enable=true
dfc.session.pool.mode=level2

But we are getting the errors below.

  1. Error during the session release:-
    Session is not owned by this session manager
    java.lang.IllegalArgumentException: Session is not owned by this session manager
    at com.documentum.fc.client.impl.session.SessionManager.release(SessionManager.java:207)
  2. DfServiceException:: THREAD: http-nio-8080-exec-56; MSG: [DM_API_E_NO_SESSION]error: "There are no more available sessions."; ERRORCODE: 100; NEXT: null
    at com.documentum.fc.client.impl.connection.docbase.DocbaseConnectionManager.getConnectionFromPool(DocbaseConnectionManager.java:168)

Note:- We have not set the dfc.session.max_count in client custom application.

How to fix these errors? Kindly suggest.

Comments

  • gvicari
    Options

    Hi @Ram_Kishan_Maitry, we are submitting this to the team and will get back to you as soon as possible.

  • Karen Weir
    Options

    Hi there. I have moved your post to our Documentum community area where there are experts to help

  • Michael McCollough
    edited August 16, 2023 #4
    Options

    @Ram_Kishan_Maitry

    The error you are getting will happen if you are instantiating more than one session manager and you do not release the session that was estabilished with that session manager using the SAME session manager.

    Here is code to reproduce the issue you are seeing. Here you will note I have instantiated 2 session managers and go the session using sm trying to use sm2 to release it. Each SessionManager manages it own pool of sessions. I hope this helps you to find the problem.

    ** This is an example of how you can reproduce the issue to see if you can then identify a similar pattern in your code, it is an error reproduction use case to product the error seen**

    IDfSessionManager sm = new SessionManager();
    IDfSessionManager sm2 = new SessionManager();
    IDfLoginInfo li = new

    DfLoginInfo();
    li.setUser(user);
    li.setPassword(password);

    sm.setIdentity(docbaseName,li);
    DfShowVersion.main(null);try {
    session = sm.getSession(docbaseName);
    } finally {
    if(session != null) {
    sm2.release(session);
    }
    }

    Will give you: java.lang.IllegalArgumentException: Session is not owned by this session manager

    If you are not using the right session manager to release your sessions, then those sessions are remaining and as you run through iterations, you will run out of overall sessions. If you fix the problem using the wrong sessionManager to release, you should then also have your "out of sessions" message resolved.

    As a debug, you can also do:

    session.getSessionManager() to see which sessionManager is being used by the session.

  • We are still getting the same error. Kindly help to resolve this error.