• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:

 
Ranch Hand
Posts: 32
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
good noon...

i am using mysql database in my java application.
i've connected mysql stored and retrieved from database using my java program.

now my problem is i need to run a long process. that means 5 functions that is needed to run one by one (each function connects database do some work).
while doing this i am getting this exception

Unable to connect to database.com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.net.SocketException
MESSAGE: java.net.BindException: Address already in use: connect

STACKTRACE:

java.net.SocketException: java.net.BindException: Address already in use: connect
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:151)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:280)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1699)
at com.mysql.jdbc.Connection.<init>(Connection.java:405)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:268)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at mrf_general.DBConnection.getConnect(DBConnection.java:22)
at mrf_general.DataBase.update_SAPlog(DataBase.java:98)
at importSAP.ScheduleMyJob.updateStockInTransit(ScheduleMyJob.java:38)
at mrf_general.ScheduleMRF.RunSchedule(ScheduleMRF.java:30)
at Schedule.MrfSuserSchedule$1.startSchedule(MrfSuserSchedule.java:58)
at Schedule.MrfSuserSchedule$1.run(MrfSuserSchedule.java:51)
at Schedule.Scheduler$SchedulerTimerTask.run(Scheduler.java:54)
at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)


** END NESTED EXCEPTION **



I could not find why this exception occurs.

any one help me.....
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic