Database Connection Error :

java.lang.Exception: Error reading DBConfig:

Caused by: java.sql.SQLException: Unable to connect to any hosts due to exception: java.net.ConnectException: Connection refused: connect

** BEGIN NESTED EXCEPTION ** 

java.net.ConnectException
MESSAGE: Connection refused: connect

STACKTRACE:

java.net.ConnectException: Connection refused: connect
	at java.net.DualStackPlainSocketImpl.connect0(Native Method)
	at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
	at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
	at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
	at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
	at java.net.PlainSocketImpl.connect(Unknown Source)
	at java.net.SocksSocketImpl.connect(Unknown Source)
	at java.net.Socket.connect(Unknown Source)
	at java.net.Socket.connect(Unknown Source)
	at java.net.Socket.(Unknown Source)
	at java.net.Socket.(Unknown Source)
	at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:124)
	at com.mysql.jdbc.MysqlIO.(MysqlIO.java:225)
	at com.mysql.jdbc.Connection.createNewIO(Connection.java:1779)
	at com.mysql.jdbc.Connection.(Connection.java:450)
	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:411)
	at java.sql.DriverManager.getConnection(Unknown Source)
	at java.sql.DriverManager.getConnection(Unknown Source)
	at CPPooler.GetConnFromSrv(cppooler.java:1072)
	at CPPooler.GetConnFromSrv(cppooler.java:983)
	at CPPooler.getTableNamesFromServer(cppooler.java:187)
	at CPPooler.getTableNamesFromServer(cppooler.java:178)
	at CPPooler.ReloadTableNames2(cppooler.java:853)
	at CPPooler.(cppooler.java:724)
	at CPContext.a(Unknown Source)
	at CPContext.(Unknown Source)
	at CPContext.GetRegular(Unknown Source)
	at CPTranslations.(cptranslations.java:57)
	at CPContext.new(Unknown Source)
	at CPContext.(Unknown Source)
	at SPApplicationShutdown.sessionDestroyed(spapplicationshutdown.java:129)
	at org.apache.catalina.session.StandardSession.expire(StandardSession.java:807)
	at org.apache.catalina.session.StandardSession.isValid(StandardSession.java:665)
	at org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:576)
	at org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:561)
	at org.apache.catalina.core.StandardContext.backgroundProcess(StandardContext.java:5540)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1381)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1385)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1385)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1353)
	at java.lang.Thread.run(Unknown Source)


** END NESTED EXCEPTION **


	at com.mysql.jdbc.Connection.createNewIO(Connection.java:1847)
	at com.mysql.jdbc.Connection.(Connection.java:450)
	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:411)
	at java.sql.DriverManager.getConnection(Unknown Source)
	at java.sql.DriverManager.getConnection(Unknown Source)
	at CPPooler.GetConnFromSrv(cppooler.java:1072)
	at CPPooler.GetConnFromSrv(cppooler.java:983)
	at CPPooler.getTableNamesFromServer(cppooler.java:187)
	at CPPooler.getTableNamesFromServer(cppooler.java:178)
	at CPPooler.ReloadTableNames2(cppooler.java:853)
	at CPPooler.(cppooler.java:724)
	at CPContext.a(Unknown Source)
	at CPContext.(Unknown Source)
	at CPContext.GetRegular(Unknown Source)
	at CPTranslations.(cptranslations.java:57)
	at CPContext.new(Unknown Source)
	at CPContext.(Unknown Source)
	at SPApplicationShutdown.sessionDestroyed(spapplicationshutdown.java:129)
	at org.apache.catalina.session.StandardSession.expire(StandardSession.java:807)
	at org.apache.catalina.session.StandardSession.isValid(StandardSession.java:665)
	at org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:576)
	at org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:561)
	at org.apache.catalina.core.StandardContext.backgroundProcess(StandardContext.java:5540)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1381)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1385)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1385)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1353)
	at java.lang.Thread.run(Unknown Source)