One Star

[resolved] Error on insertion in database with multithreading

Hi,
I developed a job that inserts data from xml files into a database using multithreading. There are 12 iterations on 12 XML files, and so 12 executions on the component connection to the database(I'm using tAS400Output).
The console shows the error at the end of the execution that are probalblement in conjunction with the number of simultaneous connections. what to do in this case
A screenshot below explain the job architecture
Error in the console :
 connecting to socket on port 3495
connected
Communication link failure. (Software caused connection abort: recv failed) SQLSTATE= CODE
Communication link failure. (Software caused connection abort: recv failed) SQLSTATE= CODE
Communication link failure. (Software caused connection abort: recv failed) SQLSTATE= CODE
Communication link failure. (Software caused connection abort: recv failed) SQLSTATE= CODE
Communication link failure. (Software caused connection abort: recv failed) SQLSTATE= CODE
Communication link failure. (Software caused connection abort: recv failed) SQLSTATE= CODE
Communication link failure. (Software caused connection abort: recv failed) SQLSTATE= CODE
Communication link failure. (Software caused connection abort: recv failed) SQLSTATE= CODE
Communication link failure. (Software caused connection abort: recv failed) SQLSTATE= CODE
Exception in component tAS400Output_2
Exception in component tAS400Output_2
Exception in component tAS400Output_2
Exception in component tAS400Output_2
Exception in component tAS400Output_2
Exception in component tAS400Output_2
Exception in component tAS400Output_2
Exception in component tAS400Output_2
java.sql.SQLException: The connection does not exist.
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:389)
at com.ibm.as400.access.AS400JDBCConnection.checkOpen(AS400JDBCConnection.java:420)
at com.ibm.as400.access.AS400JDBCStatement.checkOpen(AS400JDBCStatement.java:323)
at com.ibm.as400.access.AS400JDBCPreparedStatement.setValue(AS400JDBCPreparedStatement.java:2913)
at com.ibm.as400.access.AS400JDBCPreparedStatement.setInt(AS400JDBCPreparedStatement.java:2292)
at projetvuc.clientvuc2_0_1.ClientVUC2$1tAsyncIn_tAS400Output_2_ParallelThread.run(ClientVUC2.java:5664)
java.sql.SQLException: The connection does not exist.
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:389)
at com.ibm.as400.access.AS400JDBCConnection.checkOpen(AS400JDBCConnection.java:420)
at com.ibm.as400.access.AS400JDBCStatement.checkOpen(AS400JDBCStatement.java:323)
at com.ibm.as400.access.AS400JDBCPreparedStatement.setValue(AS400JDBCPreparedStatement.java:2913)
at com.ibm.as400.access.AS400JDBCPreparedStatement.setInt(AS400JDBCPreparedStatement.java:2292)
at projetvuc.clientvuc2_0_1.ClientVUC2$1tAsyncIn_tAS400Output_2_ParallelThread.run(ClientVUC2.java:5664)
java.sql.SQLException: The connection does not exist.
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:389)
at com.ibm.as400.access.AS400JDBCConnection.checkOpen(AS400JDBCConnection.java:420)
at com.ibm.as400.access.AS400JDBCStatement.checkOpen(AS400JDBCStatement.java:323)
at com.ibm.as400.access.AS400JDBCPreparedStatement.setValue(AS400JDBCPreparedStatement.java:2913)
at com.ibm.as400.access.AS400JDBCPreparedStatement.setInt(AS400JDBCPreparedStatement.java:2292)
at projetvuc.clientvuc2_0_1.ClientVUC2$1tAsyncIn_tAS400Output_2_ParallelThread.run(ClientVUC2.java:5664)
java.sql.SQLException: The connection does not exist.
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:389)
at com.ibm.as400.access.AS400JDBCConnection.checkOpen(AS400JDBCConnection.java:420)
at com.ibm.as400.access.AS400JDBCStatement.checkOpen(AS400JDBCStatement.java:323)
at com.ibm.as400.access.AS400JDBCPreparedStatement.setValue(AS400JDBCPreparedStatement.java:2913)
at com.ibm.as400.access.AS400JDBCPreparedStatement.setInt(AS400JDBCPreparedStatement.java:2292)
at projetvuc.clientvuc2_0_1.ClientVUC2$1tAsyncIn_tAS400Output_2_ParallelThread.run(ClientVUC2.java:5664)
java.sql.SQLException: The connection does not exist.
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:389)
at com.ibm.as400.access.AS400JDBCConnection.checkOpen(AS400JDBCConnection.java:420)
at com.ibm.as400.access.AS400JDBCStatement.checkOpen(AS400JDBCStatement.java:323)
at com.ibm.as400.access.AS400JDBCPreparedStatement.setValue(AS400JDBCPreparedStatement.java:2913)
at com.ibm.as400.access.AS400JDBCPreparedStatement.setInt(AS400JDBCPreparedStatement.java:2292)
at projetvuc.clientvuc2_0_1.ClientVUC2$1tAsyncIn_tAS400Output_2_ParallelThread.run(ClientVUC2.java:5664)
java.sql.SQLException: The connection does not exist.
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:389)
at com.ibm.as400.access.AS400JDBCConnection.checkOpen(AS400JDBCConnection.java:420)
at com.ibm.as400.access.AS400JDBCStatement.checkOpen(AS400JDBCStatement.java:323)
at com.ibm.as400.access.AS400JDBCPreparedStatement.setValue(AS400JDBCPreparedStatement.java:2913)
at com.ibm.as400.access.AS400JDBCPreparedStatement.setInt(AS400JDBCPreparedStatement.java:2292)
at projetvuc.clientvuc2_0_1.ClientVUC2$1tAsyncIn_tAS400Output_2_ParallelThread.run(ClientVUC2.java:5664)
java.lang.InterruptedException
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:503)
at routines.system.ParallelThread.waitForFree(ParallelThread.java:40)
at routines.system.ParallelThreadPool.waitForEnd(ParallelThreadPool.java:101)
at projetvuc.clientvuc2_0_1.ClientVUC2$1tFileInputXML_2Thread.run(ClientVUC2.java:4701)
at routines.system.ThreadPoolWorker.runIt(TalendThreadPool.java:159)
at routines.system.ThreadPoolWorker.runWork(TalendThreadPool.java:150)
at routines.system.ThreadPoolWorker.access$0(TalendThreadPool.java:145)
at routines.system.ThreadPoolWorker$1.run(TalendThreadPool.java:122)
at java.lang.Thread.run(Unknown Source)
java.sql.SQLException: The connection does not exist.
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:389)
at com.ibm.as400.access.AS400JDBCConnection.checkOpen(AS400JDBCConnection.java:420)
at com.ibm.as400.access.AS400JDBCStatement.checkOpen(AS400JDBCStatement.java:323)
at com.ibm.as400.access.AS400JDBCPreparedStatement.setValue(AS400JDBCPreparedStatement.java:2913)
at com.ibm.as400.access.AS400JDBCPreparedStatement.setInt(AS400JDBCPreparedStatement.java:2292)
at projetvuc.clientvuc2_0_1.ClientVUC2$1tAsyncIn_tAS400Output_2_ParallelThread.run(ClientVUC2.java:5654)
java.sql.SQLException: The connection does not exist.
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:389)
at com.ibm.as400.access.AS400JDBCConnection.checkOpen(AS400JDBCConnection.java:420)
at com.ibm.as400.access.AS400JDBCStatement.checkOpen(AS400JDBCStatement.java:323)
at com.ibm.as400.access.AS400JDBCPreparedStatement.setValue(AS400JDBCPreparedStatement.java:2913)
at com.ibm.as400.access.AS400JDBCPreparedStatement.setInt(AS400JDBCPreparedStatement.java:2292)
at projetvuc.clientvuc2_0_1.ClientVUC2$1tAsyncIn_tAS400Output_2_ParallelThread.run(ClientVUC2.java:5654)
java.lang.InterruptedException
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:503)
at routines.system.ParallelThread.waitForFree(ParallelThread.java:40)
at routines.system.ParallelThreadPool.waitForEnd(ParallelThreadPool.java:101)
at projetvuc.clientvuc2_0_1.ClientVUC2$1tFileInputXML_2Thread.run(ClientVUC2.java:4697)
at routines.system.ThreadPoolWorker.runIt(TalendThreadPool.java:159)
at routines.system.ThreadPoolWorker.runWork(TalendThreadPool.java:150)
at routines.system.ThreadPoolWorker.access$0(TalendThreadPool.java:145)
at routines.system.ThreadPoolWorker$1.run(TalendThreadPool.java:122)
at java.lang.Thread.run(Unknown Source)
java.lang.InterruptedException
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:503)
at routines.system.ParallelThread.waitForFree(ParallelThread.java:40)
at routines.system.ParallelThreadPool.waitForEnd(ParallelThreadPool.java:101)
at projetvuc.clientvuc2_0_1.ClientVUC2$1tFileInputXML_2Thread.run(ClientVUC2.java:4701)
at routines.system.ThreadPoolWorker.runIt(TalendThreadPool.java:159)
at routines.system.ThreadPoolWorker.runWork(TalendThreadPool.java:150)
at routines.system.ThreadPoolWorker.access$0(TalendThreadPool.java:145)
at routines.system.ThreadPoolWorker$1.run(TalendThreadPool.java:122)
at java.lang.Thread.run(Unknown Source)
java.lang.InterruptedException
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:503)
at routines.system.ParallelThread.waitForFree(ParallelThread.java:40)
at routines.system.ParallelThreadPool.waitForEnd(ParallelThreadPool.java:101)
at projetvuc.clientvuc2_0_1.ClientVUC2$1tFileInputXML_2Thread.run(ClientVUC2.java:4697)
at routines.system.ThreadPoolWorker.runIt(TalendThreadPool.java:159)
at routines.system.ThreadPoolWorker.runWork(TalendThreadPool.java:150)
at routines.system.ThreadPoolWorker.access$0(TalendThreadPool.java:145)
at routines.system.ThreadPoolWorker$1.run(TalendThreadPool.java:122)
at java.lang.Thread.run(Unknown Source)
Exception in component tAS400Output_2
java.sql.SQLException: The connection does not exist.
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:389)
at com.ibm.as400.access.AS400JDBCConnection.checkOpen(AS400JDBCConnection.java:420)
at com.ibm.as400.access.AS400JDBCStatement.checkOpen(AS400JDBCStatement.java:323)
at com.ibm.as400.access.AS400JDBCPreparedStatement.setValue(AS400JDBCPreparedStatement.java:2913)
at com.ibm.as400.access.AS400JDBCPreparedStatement.setInt(AS400JDBCPreparedStatement.java:2292)
at projetvuc.clientvuc2_0_1.ClientVUC2$1tAsyncIn_tAS400Output_2_ParallelThread.run(ClientVUC2.java:5664)
java.lang.InterruptedException
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:503)
at routines.system.ParallelThread.waitForFree(ParallelThread.java:40)
at routines.system.ParallelThreadPool.waitForEnd(ParallelThreadPool.java:101)
at projetvuc.clientvuc2_0_1.ClientVUC2$1tFileInputXML_2Thread.run(ClientVUC2.java:4701)
at routines.system.ThreadPoolWorker.runIt(TalendThreadPool.java:159)
at routines.system.ThreadPoolWorker.runWork(TalendThreadPool.java:150)
at routines.system.ThreadPoolWorker.access$0(TalendThreadPool.java:145)
at routines.system.ThreadPoolWorker$1.run(TalendThreadPool.java:122)
at java.lang.Thread.run(Unknown Source)
java.lang.InterruptedException
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:503)
at routines.system.ParallelThread.waitForFree(ParallelThread.java:40)
at routines.system.ParallelThreadPool.waitForEnd(ParallelThreadPool.java:101)
at projetvuc.clientvuc2_0_1.ClientVUC2$1tFileInputXML_2Thread.run(ClientVUC2.java:4701)
at routines.system.ThreadPoolWorker.runIt(TalendThreadPool.java:159)
at routines.system.ThreadPoolWorker.runWork(TalendThreadPool.java:150)
at routines.system.ThreadPoolWorker.access$0(TalendThreadPool.java:145)
at routines.system.ThreadPoolWorker$1.run(TalendThreadPool.java:122)
at java.lang.Thread.run(Unknown Source)
java.lang.InterruptedException
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:503)
at routines.system.ParallelThread.waitForFree(ParallelThread.java:40)
at routines.system.ParallelThreadPool.waitForEnd(ParallelThreadPool.java:101)
at projetvuc.clientvuc2_0_1.ClientVUC2$1tFileInputXML_2Thread.run(ClientVUC2.java:4701)
at routines.system.ThreadPoolWorker.runIt(TalendThreadPool.java:159)
at routines.system.ThreadPoolWorker.runWork(TalendThreadPool.java:150)
at routines.system.ThreadPoolWorker.access$0(TalendThreadPool.java:145)
at routines.system.ThreadPoolWorker$1.run(TalendThreadPool.java:122)
at java.lang.Thread.run(Unknown Source)
disconnected
disconnected

6 REPLIES
Moderator

Re: [resolved] Error on insertion in database with multithreading

Hi,
Have you tried to use TalendHelpCenter:tAccessRollback in your job design to avoid involuntary commitment of part of a transaction?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] Error on insertion in database with multithreading

Hi,
I modified the job design but the execution still blocked in the last component.
A screenshot below explain the job design and the execution problem
One Star

Re: [resolved] Error on insertion in database with multithreading

I think that it is because of the ability of the DBMS to process request simultaneously
Moderator

Re: [resolved] Error on insertion in database with multithreading

Hi,
Have you tried other DB(oracle, my sql...) to see if this issue repro?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] Error on insertion in database with multithreading

Hi,
My colleague told me that he had the some problem with this DB installation. I am trying to solve this problem with the DB administrator.
Thanks
Moderator

Re: [resolved] Error on insertion in database with multithreading

Hi,
It's welcome to share your solution on forum.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.