Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
dshahan
Contributor II
Contributor II

FileList Interation breaks shared DB connection after the first loop.

Hi everyone,

 

after much searching, I can't seem to find a solution online to my problem.

 

I have a tFileList iterating through all .xml Files in a specific folder.

In step 1 each file is read and has certain values saved to my database. Then it continues will all the further steps for each file.

0683p000009MZkq.png

This works fine for the first loop, but the once it starts the second loop around my shared DB connection doesn't work anymore.
This is my childjob.

0683p000009MaDd.png
This is my main DBConnection with shared DB connection name.
0683p000009MaGW.png
This is my child DBConnection, only using the shared DB connection.

0683p000009MaBy.png
And of course my error code.

Exception in component tDBConnection_1 (i_interchange)
java.sql.SQLException: Access denied for user ''@'localhost' (using password: NO)
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
	at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:832)
	at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:456)
	at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:240)
	at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:207)
	at java.sql.DriverManager.getConnection(Unknown Source)
	at java.sql.DriverManager.getConnection(Unknown Source)
	at routines.system.SharedDBConnection.getConnection(SharedDBConnection.java:70)
	at routines.system.SharedDBConnection.getDBConnection(SharedDBConnection.java:131)
	at dgw_poc.i_interchange_0_3.i_interchange.tDBConnection_1Process(i_interchange.java:416)
	at dgw_poc.i_interchange_0_3.i_interchange.runJobInTOS(i_interchange.java:2692)
	at dgw_poc.i_interchange_0_3.i_interchange.runJob(i_interchange.java:2536)
	at dgw_poc.i_main_0_3.i_main.tFileList_1Process(i_main.java:1549)
	at dgw_poc.i_main_0_3.i_main.tDBConnection_1Process(i_main.java:1098)
	at dgw_poc.i_main_0_3.i_main.tPrejob_1Process(i_main.java:936)
	at dgw_poc.i_main_0_3.i_main.runJobInTOS(i_main.java:4654)
	at dgw_poc.i_main_0_3.i_main.main(i_main.java:4506)

Does anyone have an idea how I can fix this?

Labels (5)
1 Solution

Accepted Solutions
dshahan
Contributor II
Contributor II
Author

I have discovered my error. In each loop I am commiting to the DB (which is fine sofar). But in the tDBCommit component, I had the box checked called "Close Connection". No wonder my connection only worked for the first loop.

0683p000009MaHj.png0683p000009MaHo.png

 

Thank you @manodwhb for the help finding the error Smiley Happy Have a great day.

View solution in original post

6 Replies
Anonymous
Not applicable

Hi
Which version of studio are you using? We need to make some testing and check if it was a bug.

Regards
Shong
dshahan
Contributor II
Contributor II
Author

Hi,

 

I am using Talend Open Studio for Data Integration version 7.2.1.20190620_1446

I am not sure if this helps at all:

0683p000009MaH5.png

 

Best regards

manodwhb
Champion II
Champion II

dshahan
Contributor II
Contributor II
Author

Yes I have, as seen here:
tDBConnection in Parentjob:
0683p000009MaHP.png
tDBConnection in Childjob:0683p000009MaHU.png

The only difference is that I am using tDBConnection instead of tMySQLConnection. I will try it out with the MySQL specific component.

manodwhb
Champion II
Champion II

@dshahan, do not give port ,password and additional jdbc parameters in subjob of tDBConnection and check

dshahan
Contributor II
Contributor II
Author

I have discovered my error. In each loop I am commiting to the DB (which is fine sofar). But in the tDBCommit component, I had the box checked called "Close Connection". No wonder my connection only worked for the first loop.

0683p000009MaHj.png0683p000009MaHo.png

 

Thank you @manodwhb for the help finding the error Smiley Happy Have a great day.