Need solution for MySQL Not connected problem
Posted by: Nataraja mani
Date: January 09, 2019 02:54AM

Actually I have trouble with MYSQL database.

I am working in below mentioned working Enviroment.

1.CentOS Linux release 7.6.1810 (Core)

2.Tomcat 7

3.JAVA 1.8.0_191 - (openjdk version)

4.MySQL Databse - Ver 14.14 Distrib 5.6.42

I have developed the one Java Web Application using tomcat and MySQL database.

From Eclipse IDE , I run code MySQL Is connected successfully and It's working Perfectly.

But After creating the war file and I deployed that war file in Tomcat Server ,

MySQL Database Not Connected. I am getting following Exception.

In My Application , I am writing Log file for exception. that Log file shows this Exception.

Kindly provide the solution as soon as possible.


1.0-20160813-CMS:08-Jan-2019 11:33:03 PM : com.mysql.jdbc.CommunicationsException --> DbUtil : getConnection
com.mysql.jdbc.Connection.createNewIO(Connection.java:2820)com.mysql.jdbc.Connection.<init>(Connection.java:1553)com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)java.sql.DriverManager.getConnection(DriverManager.java:664)java.sql.DriverManager.getConnection(DriverManager.java:247)com.sardonyx.dbaccess.DbUtil.getConnection(DbUtil.java:19)com.sardonyx.dbaccess.DataAccess.callquery(DataAccess.java:5651)com.sardonyx.dbaccess.DataAccess.querytoInt(DataAccess.java:1385)com.sardonyx.dbaccess.DataAccess.getStringResourceModule(DataAccess.java:1365)com.sardonyx.server.CommonServlet.doPost(CommonServlet.java:197)javax.servlet.http.HttpServlet.service(HttpServlet.java:650)javax.servlet.http.HttpServlet.service(HttpServlet.java:731)org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1087)org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)java.lang.Thread.run(Thread.java:748)

Options: ReplyQuote




Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.