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

[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!!!
Labels (4)
8 Replies
Anonymous
Not applicable
Author

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
Anonymous
Not applicable
Author

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!!
Anonymous
Not applicable
Author

Let's see if attaching the images as normal files works... Maybe our proxy is having fun 0683p000009MPcz.png
Anonymous
Not applicable
Author

Last try... Both in a zip...
screenshots.zip_20150218-0953.zip
Anonymous
Not applicable
Author

Still the images are appeared in the post. 
Thanks,
Karthikeyan J.
www.mytalend.in
Anonymous
Not applicable
Author

Imageshack links:
Job:
Subjob:
Anonymous
Not applicable
Author

Job
Subjob
I'm driving f******* mad...
Anonymous
Not applicable
Author

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