tOracleConnection The Network Adapter could not establish the conn

One Star

tOracleConnection The Network Adapter could not establish the conn

I need to do some processing before load and after load so I decided to load file one by one through talend.
so I build the job in talend which takes one file path as context param then I integrated job in my java file as below.
File dir = new File("#########");
        LOADING_BKP bkp = new LOADING_BKP();
        if (dir.isDirectory()) {
            for (File file : dir.listFiles()) {

                String[] context = new String[] {
                        "--context_param FILE_LOC=" + file.getPath(),
                        "--context_param databaseUserName=####",
                        "--context_param databasePassword=####",
                        "--context_param databaseUrl=########" };
             
                bkp.runJob(context);
               
            }
        }

When I run above code for 5000 files, first around 150 file, it runs and loads data correctly but after that I keep getting the exception i.e. java.sql.SQLRecoverableException: Io exception: The Network Adapter could not establish the connection for some of file loading. and after that job doesn't load any record even I get success log.
Moderator

Re: tOracleConnection The Network Adapter could not establish the conn

Hi,
We suppose that there are so many oracle connection in your workflow. Did you also use tOracleClose to close the transaction committed in the connected DB?
Would you mind uploading your job design screenshots into 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.
One Star

Re: tOracleConnection The Network Adapter could not establish the conn

Solved it. By increasing the number of ports on system.Anyway thank you very much for quick reply