Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

failed to close the connection in tDB2Output

hi team, the below is the error while connecting DB2 output. kinldy adivse.

 

Error log:-

failed to close the connection in tDB2Output_1 :[jcc][t4][10251][10308][4.11.77] 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

Labels (3)
1 Solution

Accepted Solutions
cterenzi
Specialist
Specialist

Don't use a row connection to tDB2Commit. Use OnComponentOK instead.

In more detail, Talend starts all of the components connected with row connections at the same time. You don't want to commit until your tDB2Output component has completely finished.

View solution in original post

12 Replies
Anonymous
Not applicable
Author

It seems connection was not established properly, what is the input connection??

Create a METADATA connection and  use this to connect DB-  Use an existing connection 

 

Regards,

Avinash

Anonymous
Not applicable
Author

Thanks Avinash for response. 

 

the below is the error after your suggestion applied.

 

Exception in component tDB2Close_1

com.ibm.db2.jcc.am.SqlException: [jcc][t4][10251][10308][4.11.77] 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.gd.a(gd.java:660)

      at com.ibm.db2.jcc.am.gd.a(gd.java:60)

      at com.ibm.db2.jcc.am.gd.a(gd.java:120)

      at com.ibm.db2.jcc.am.lb.u(lb.java:1238)

      at com.ibm.db2.jcc.am.lb.x(lb.java:1260)

      at com.ibm.db2.jcc.am.lb.v(lb.java:1246)

      at com.ibm.db2.jcc.am.lb.close(lb.java:1228)

      at poc_project.extcdmgcqualscoreload_0_1.EXTCDMGCQualScoreLoad.tDB2Close_1Process(EXTCDMGCQualScoreLoad.java:2108)

      at poc_project.extcdmgcqualscoreload_0_1.EXTCDMGCQualScoreLoad.tFileInputDelimited_1Process(EXTCDMGCQualScoreLoad.java:1991)

      at poc_project.extcdmgcqualscoreload_0_1.EXTCDMGCQualScoreLoad.tDB2Connection_1Process(EXTCDMGCQualScoreLoad.java:448)

      at poc_project.extcdmgcqualscoreload_0_1.EXTCDMGCQualScoreLoad.runJobInTOS(EXTCDMGCQualScoreLoad.java:2350)

      at poc_project.extcdmgcqualscoreload_0_1.EXTCDMGCQualScoreLoad.main(EXTCDMGCQualScoreLoad.java:2207)

Anonymous
Not applicable
Author

Hello,

What does your whole work flow look like? Could you please post your job design screenshots into forum?

Best regards

Sabrina

Anonymous
Not applicable
Author

the job design like

 

db2 connection -> file input delimied -> tMap ->Db2 output -> Db2 commit

 

the job reading the data from file and load into table

cterenzi
Specialist
Specialist

Don't use a row connection to tDB2Commit. Use OnComponentOK instead.

In more detail, Talend starts all of the components connected with row connections at the same time. You don't want to commit until your tDB2Output component has completely finished.
Anonymous
Not applicable
Author

Hello,

If you want to use a Row > Main connection to link tDB2Commit to your Job, your data will be committed row by row.

In this case, do not select the Close connection check box or your connection will be closed before the end of your first row commit.

 

Please see a related scenario:TalendHelpCenter: Inserting data in mother/daughter tables (MySql DB as an example)

Best regards

Sabrina

 

Anonymous
Not applicable
Author

it looks your box not able to connect DB2 port, are you able to create a DSN??

Anonymous
Not applicable
Author

Sorry for late reply.

It's worked "tDB2Commit. Use OnComponentOK"

Anonymous
Not applicable
Author

Hi Team,

 

I am facing an issue while i am trying to load data into Db2 by using talend. Error message is below mentioned -

 

failed to close the connection in tDB2Output_1 :[jcc][t4][10251][10308][4.13.127] 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
Exception in component tDB2Output_1
[statistics] disconnected
com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-604, SQLSTATE=42611, SQLERRMC=VARCHAR(0), DRIVER=4.13.127
at com.ibm.db2.jcc.am.id.a(id.java:677)
at com.ibm.db2.jcc.am.id.a(id.java:60)
at com.ibm.db2.jcc.am.id.a(id.java:127)
at com.ibm.db2.jcc.am.no.c(no.java:2653)
at com.ibm.db2.jcc.am.no.d(no.java:2641)
at com.ibm.db2.jcc.am.no.b(no.java:2027)
at com.ibm.db2.jcc.t4.cb.i(cb.java:225)
at com.ibm.db2.jcc.t4.cb.c(cb.java:48)
at com.ibm.db2.jcc.t4.q.b(q.java:38)
at com.ibm.db2.jcc.t4.sb.h(sb.java:114)
at com.ibm.db2.jcc.am.no.hb(no.java:2022)
at com.ibm.db2.jcc.am.no.a(no.java:3166)
at com.ibm.db2.jcc.am.no.e(no.java:1053)
at com.ibm.db2.jcc.am.no.execute(no.java:1037)
at local_project.firstjob_0_1.FirstJob.tRowGenerator_1Process(FirstJob.java:573)
at local_project.firstjob_0_1.FirstJob.runJobInTOS(FirstJob.java:1080)
at local_project.firstjob_0_1.FirstJob.main(FirstJob.java:937)

 

Please help me out here ASAP.

 


1.PNG