Win a copy of AWS Security this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

SQLNonTransientConnection Exception : address already in use

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created a spring mvc project with maven build.
I am trying to read an xml file with 300K records to insert if not exists else update into mysql database,
i have written a scheduler which does following steps
1. parse xml file
2. validates each record
3. executes select query to find if record exists then update else insert

i have kept scheduler pool-size =1 in XML job-scheduler and Executors.newScheduledThreadPool(1)
in scheduler configuration class.

whenever shedular runs , it creates lots of threads which access database connection
which gives address already in use exception which causes sheduler to freeze.

I have even used batchUpdate() method of JdbcTemplate for insert / update but still problem persists.

please help me to resolve this issue
https://stackoverflow.com/questions/56637014/sqlnontransientconnectionexception-address-already-in-use
 
Tick check! Okay, I guess that was just an itch. Oh wait! Just a tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic