Skip to Content

SAP CCO Crashing due to plugin (DB connection open/close)

My team experiencing one issue at a Customer location in the plugin for CCO. I am using the below command to connect to database and read custom table for the promotional activities. "CDBSession dbSession1= CDBSessionFactory.instance.createSession();" And after completing all the activities i am closing the session as well like the below. dbSession1.closeDBSession(); dbSession1.close(); dbSession1 = null; But it seems the session is not getting closed actually, because while shutting down the POS we are experiencing the below kind of warnings and also it may hold the resources. 2018-09-28 03:20:54,772 [http-nio-127.0.0.1-9999-exec-1] WARN com.sap.scco.ap.pos.dao.CDBSession - Too many open DB Sessions (352): 2018-09-28 03:20:54,774 [http-nio-127.0.0.1-9999-exec-1] WARN com.sap.scco.ap.pos.dao.CDBSession - UUID: 131838600:0, Object: com.sap.scco.ap.pos.dao.CDBSession@7dbb288 2018-09-28 03:20:54,776 [http-nio-127.0.0.1-9999-exec-1] WARN com.sap.scco.ap.pos.dao.CDBSession - Stacktrace: 2018-09-28 03:20:54,777 [http-nio-127.0.0.1-9999-exec-1] WARN com.sap.scco.ap.pos.dao.CDBSession - (To see stacktrace start application with LOG_DBSESSION_STACK_TRACE=true) 2018-09-28 03:20:54,780 [http-nio-127.0.0.1-9999-exec-1] WARN com.sap.scco.ap.pos.dao.CDBSession - UUID: 1100882086:0, Object: com.sap.scco.ap.pos.dao.CDBSession@419e20a6 2018-09-28 03:20:54,782 [http-nio-127.0.0.1-9999-exec-1] WARN com.sap.scco.ap.pos.dao.CDBSession - Stacktrace: So please check and advice us how to close the session properly which is opened by Plugin source code.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Sep 28, 2018 at 08:21 AM

    Hi Arun,

    please check if you experience the same behaviour if you open and close sessions with the "try-with-resources" pattern.

    try (CDBSession session = CDBSessionFactory.instance.createSession()) {

    // Do stuff

    } catch (...) {

    // Do Exception Handling

    }

    Kind regards

    Robert

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 02, 2018 at 06:56 AM

    Hi Arun,

    were you successful?

    Kind regards

    Robert

    Add a comment
    10|10000 characters needed characters exceeded

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.