Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tDb2close component closing Issue

Hi All

 

I did not create metadata connection for Db2 connection. Directly used tDb2 Connection and read the data and print using tlogrow.

After that i am closing the connection which is not allowing me and giving the error.  log is as below and Design is attached for the reference.

 

Log:


Exception in component tDB2Close_1 (test)
com.ibm.db2.jcc.am.SqlException: [jcc][t4][10251][10308][4.14.111] java.sql.Connection.close() requested while a transaction is in progress on the connection.
The transaction remains active, and the connection cannot be closed. ERRORCODE=-4471, SQLSTATE=null
at com.ibm.db2.jcc.am.ed.a(ed.java:661)
at com.ibm.db2.jcc.am.ed.a(ed.java:60)
at com.ibm.db2.jcc.am.ed.a(ed.java:120)
at com.ibm.db2.jcc.am.Connection.checkForTransactionInProgress(Connection.java:1373)
at com.ibm.db2.jcc.t4.b.checkForTransactionInProgress(b.java:7152)
at com.ibm.db2.jcc.am.Connection.closeResourcesX(Connection.java:1395)
at com.ibm.db2.jcc.am.Connection.closeX(Connection.java:1381)
at com.ibm.db2.jcc.am.Connection.close(Connection.java:1363)
at local.test_0_1.test.tDB2Close_1Process(test.java:1027)
at local.test_0_1.test.tDB2Input_1Process(test.java:926)
at local.test_0_1.test.tDB2Connection_1Process(test.java:527)
at local.test_0_1.test.runJobInTOS(test.java:1338)
at local.test_0_1.test.main(test.java:1126)
[statistics] disconnected
Job test ended at 14:33 30/08/2019. [exit code=1]

 

 

Kindly help me come out of this issue.

 

Thanks,

Suresh V.

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

@vemparalasuresh
Check your tDB2Connection component if Auto Commit option is checked or not. If not then check-it else use tDBCommit---oncomponentok-->tlogrow to commit your transaction before you close the connection in PostJob

View solution in original post

5 Replies
Anonymous
Not applicable
Author

Hi
It's OK to use DB connection directly on the component, do you check the 'Use an existing connection' box on tDB2Input component?
Anonymous
Not applicable
Author

@vemparalasuresh
Check your tDB2Connection component if Auto Commit option is checked or not. If not then check-it else use tDBCommit---oncomponentok-->tlogrow to commit your transaction before you close the connection in PostJob
Anonymous
Not applicable
Author

Thank you Vikas. I did not give Autocommit on tDb2Connection.
I selected autoCommit and ran the job . Error on tDb2 Commit for resolved.

Thank you so much for the help.
Anonymous
Not applicable
Author

Hi  Shong,

 

Issue got resolved. Its because of Auto commit was not selected/Checked in tDb2Connection. 

Thank you so much for the response.

 

Thanks,

Suresh V

 

Anonymous
Not applicable
Author

Hi Vikas 

 

Can you please help me on below post as well

 

https://community.talend.com/t5/Design-and-Development/Db2-connection-issue-with-Talend-Open-Studio-...

 

 

Thanks,

Suresh V.