Errors occurred while closing connections and Resource is already being used in a parent transaction

Hello everyone,

I have an issue that I am facing currently. I am connecting to a HANA database which is LOCAL_TRANSACTION. we have setup this as LOCAL_TRANSACTION since it supports “batchInsert”.

Now, when we are trying to process the data. we have 4 tables.

  1. we insert some basic info ( insert statement )
  2. we insert into process control table ( insert statement )
  3. BatchInsert actual data into main table.
  4. Update the same main table with 2 other colums. ( update statement )
  5. Update the process control table to success.

Now, we are getting errors like " Error occurred while closing connections" (or) Unable to connect to resource…The resource is already being used in the parent transaction.

I am using explicity start, commit and rollback transactions for all the above tables. is there any missing. I am new to these database transactions. Any help is much appreciated.

Please help!

Thank you.

Also, is the start, commit and rollback should be implemented to only insert or update adapter services? not needed when pulling the data?

I am curious to understand, if its needed for all types of adapter services. Thank you.

Remember, in a single transaction context, you can have only one LOCAL_TRANSACTION, but you can have many XA_TRANSACTIONS / NO_TRANSACTIONS.

Could you please check how many different DBs you are connecting to, also check the schemas.


1 Like