[resolved] Database connection disconnected on subjob

Highlighted
One Star

[resolved] Database connection disconnected on subjob

Hi,
We have a problem when we reuse a database connection (we have tried with Oracle and MySQL) on a subjob, when the flow returns to parent job, the connection is closed, and we need to keep it open and do some stuff with it.
Here are the screenshots...
Parent job:

  

I don't know why it appears so low-def, the flow goes like this: connection -> subJob (after these lines) -> if error -> rollback; if ok -> mysqlinput -> log -> commit.

Sub job:


When the flow reaches the input in main job, crashes with this:
Starting job DBLinkMySQL at 11:47 17/02/2015.
connecting to socket on port 3379
connected
.--+-----.
|tLogRow_1|
|=-+----=|
|id|login|
|=-+----=|
|1 |admin|
'--+-----'
Exception in component tMysqlInput_1
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
    at com.mysql.jdbc.Util.getInstance(Util.java:384)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1013)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:973)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:918)
    at com.mysql.jdbc.ConnectionImpl.throwConnectionClosedException(ConnectionImpl.java:1321)
    at com.mysql.jdbc.ConnectionImpl.checkClosed(ConnectionImpl.java:1313)
disconnected
    at com.mysql.jdbc.ConnectionImpl.createStatement(ConnectionImpl.java:2696)
    at com.mysql.jdbc.ConnectionImpl.createStatement(ConnectionImpl.java:2678)
    at proyecto_1.dblinkmysql_0_1.DBLinkMySQL.tMysqlInput_1Process(DBLinkMySQL.java:1088)
    at proyecto_1.dblinkmysql_0_1.DBLinkMySQL.tRunJob_1Process(DBLinkMySQL.java:669)
    at proyecto_1.dblinkmysql_0_1.DBLinkMySQL.tMysqlConnection_1Process(DBLinkMySQL.java:479)
    at proyecto_1.dblinkmysql_0_1.DBLinkMySQL.runJobInTOS(DBLinkMySQL.java:1603)
    at proyecto_1.dblinkmysql_0_1.DBLinkMySQL.main(DBLinkMySQL.java:1460)
Job DBLinkMySQL ended at 11:47 17/02/2015.
As you can see, connection is used in sub job and the query runs perfect. But trying the same query after that job has finished, at the main job, outputs than exception.
Thoughts? Anyway to solve this?
Thanks a lot!!!
One Star

Re: [resolved] Database connection disconnected on subjob

Hi,
Can you please post the screen shot here?
Also try disabling the "Close connection" option in the tmysqlcommit component.
Thanks,
Karthikeyan J.
www.mytalend.in
One Star

Re: [resolved] Database connection disconnected on subjob

Hope it's visible...




The commit is in the main job, it's ok that it closes the connection. The problem is that the subjob only gets some data, and after it finishes the connection is closed. I mean, we need the connection open after the subjob finishes and before the commit is done (there are some operations between them).
Thanks!!
One Star

Re: [resolved] Database connection disconnected on subjob

Let's see if attaching the images as normal files works... Maybe our proxy is having fun Smiley Sad
One Star

Re: [resolved] Database connection disconnected on subjob

Last try... Both in a zip...
screenshots.zip_20150218-0953.zip
One Star

Re: [resolved] Database connection disconnected on subjob

Still the images are appeared in the post. 
Thanks,
Karthikeyan J.
www.mytalend.in
One Star

Re: [resolved] Database connection disconnected on subjob

Imageshack links:
Job:
Subjob:
One Star

Re: [resolved] Database connection disconnected on subjob

Job
Subjob
I'm driving f******* mad...
One Star

Re: [resolved] Database connection disconnected on subjob

Hi,
The problem was an issue from TOS 5.6.0, solved in TOS 5.6.1.
Thanks!!

2019 GARNER 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

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Put Massive Amounts of Data to Work

Learn how to make your data more available, reduce costs and cut your build time

Watch Now

How OTTO Utilizes Big Data to Deliver Personalized Experiences

Read about OTTO's experiences with Big Data and Personalized Experiences

Blog

Talend Integration with Databricks

Take a look at this video about Talend Integration with Databricks

Watch Now