Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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.
This is my main DBConnection with shared DB connection name.
This is my child DBConnection, only using the shared DB connection.
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?
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.
Thank you @manodwhb for the help finding the error Have a great day.
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:
Best regards
@dshahan , have you configured specified in the below link.
Yes I have, as seen here:
tDBConnection in Parentjob:
tDBConnection in Childjob:
The only difference is that I am using tDBConnection instead of tMySQLConnection. I will try it out with the MySQL specific component.
@dshahan, do not give port ,password and additional jdbc parameters in subjob of tDBConnection and check
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.
Thank you @manodwhb for the help finding the error Have a great day.