DB close before log written

Highlighted
Six Stars

DB close before log written

I use Post-Job to close my DB commection

I use a tLogCatcher to write logs into the same DB.

In my Job, the tLogCatcher subJob falis due to a connection close.

Anything wrong in the screenshot ?

 

tWarn_2 - tWarn failed to log message due to internal error: gettingstarted.job_delivery_010_importdatafiles_0_1.Job_Delivery_010_ImportDataFiles$TalendException
Exception in component tDBOutput_1 (Job_Delivery_010_ImportDataFiles)
java.sql.SQLNonTransientConnectionException: No operations allowed after connection closed.
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:110)
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63)
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:73)
	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:73)
	at com.mysql.cj.jdbc.ConnectionImpl.getMetaData(ConnectionImpl.java:1183)
	at com.mysql.cj.jdbc.ConnectionImpl.getMetaData(ConnectionImpl.java:1167)
	at gettingstarted.job_delivery_010_importdatafiles_0_1.Job_Delivery_010_ImportDataFiles.tLogCatcher_1Process(Job_Delivery_010_ImportDataFiles.java:9178)
	at gettingstarted.job_delivery_010_importdatafiles_0_1.Job_Delivery_010_ImportDataFiles.tWarn_2Process(Job_Delivery_010_ImportDataFiles.java:4016)
	at gettingstarted.job_delivery_010_importdatafiles_0_1.Job_Delivery_010_ImportDataFiles.tDBInput_3Process(Job_Delivery_010_ImportDataFiles.java:2638)
	at gettingstarted.job_delivery_010_importdatafiles_0_1.Job_Delivery_010_ImportDataFiles.tWarn_6Process(Job_Delivery_010_ImportDataFiles.java:6986)

Accepted Solutions
Six Stars

Re: DB close before log written

Found : due to a dynamic job call that ends the connection (even not shared) just before the tWarn.

View solution in original post


All Replies
Employee

Re: DB close before log written

Hi,

 

    Could you please check the commit component and verify whether the connection close option has been selected there?

 

     Also could you please bring the Post Job Option to the last? Ideally it should work fine irrespective of the position but do not know whether there is any bug due to the position of the code.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

Six Stars

Re: DB close before log written

Found : due to a dynamic job call that ends the connection (even not shared) just before the tWarn.

View solution in original post

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog