Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
vinoth Robert
Ranch Hand
Posts: 31
Firefox Browser MS IE
  • Mark post as helpful
  • send pies
  • 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.....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic