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

How to Try Catch openning MySQL Connections?

Hi, I have a job that gets N connectionStrings and opens a connection for each one, then get some data from them and create a Json file.

 

My problem comes when I have two connectionStrings. If I don't have any problem with them works perfectly, but if the first connection fails, the job stops, and I need that the second connection does this job even if the first one fails.

I attach a pic of my project.

The javaFlex code is:

At the begin:

 

try {

 

In the end:

 

} catch (Exception ex) {
System.out.println(ex.getLocalizedMessage());
}

 

 

 

 

 

Labels (2)
1 Reply
vapukov
Master II
Master II

Hi,

 

as I know - you can not disable job dying when a database connection error

 

but you can manage this situation by run subjob:

  1. in parent job you make a loop over you connection settings and pass them as parameters to the child job
  2. you must have unchecked Die on error in tRunJob component
  3. you can also control error code from subjob and log warnings if code not equal to 0