4 Replies Latest reply on Mar 6, 2018 1:48 AM by cj

    cx_Oracle does not close connection with clob if exception raise

    3651332

      Hi there!

      I have very strange error with cx_Oracle 6.1

      Here is my code

       

      import cx_Oracle

      conn = cx_Oracle.connect('mbank','cnfkby','pro800-2n.ora.mmbank.ru:1521/CHIN')

      cursor = conn.cursor()

      res = cursor.callfunc('mbank.test_null', cx_Oracle.CLOB, keywordParameters={})

      ---

      mbank.test_null raises simple exception (and nothing else)

      ---

      after that if i try to close connection i get

       

      "cx_Oracle.DatabaseError: DPI-1054: connection cannot be closed when open statements or LOBs exist"

      ---

      it happens despite closing cursor, or calling del res, or declaring clob = cursor.var(cx_Oracle.CLOB), putting it insted of cx_Oracle.CLOB and after del clob

       

      May be someone knows how to solve it? It seems that there is one LOB exists but i cann't get it.