Reference Application: openMRS Version Number: 2.6.0.
OpenMRS is not able to start: The following error occurred at startup: Error occurred while trying to get the updates needed for the database. Unable to get a connection to the database. Please check your openmrs runtime properties file and make sure you have the correct connection.username and connection.password set java.lang.RuntimeException: Error occurred while trying to get the updates needed for the database. Unable to get a connection to the database. Please check your openmrs runtime properties file and make sure you have the correct connection.username and connection.password set at org.openmrs.util.DatabaseUpdater.getUnrunDatabaseChanges(DatabaseUpdater.java:627) at org.openmrs.util.DatabaseUpdater.getUnrunDatabaseChanges(DatabaseUpdater.java:583) at org.openmrs.util.DatabaseUpdater.updatesRequired(DatabaseUpdater.java:249) at org.openmrs.web.Listener.setupNeeded(Listener.java:222) at org.openmrs.web.Listener.contextInitialized(Listener.java:180) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4961) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5455) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.Exception: Unable to get a connection to the database. Please check your openmrs runtime properties file and make sure you have the correct connection.username and connection.password set at org.openmrs.util.DatabaseUpdater.getLiquibase(DatabaseUpdater.java:358) at org.openmrs.util.DatabaseUpdater.getUnrunDatabaseChanges(DatabaseUpdater.java:612) … 13 more Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.Util.getInstance(Util.java:386) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1015) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:989) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:975) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:920) at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2395) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2316) at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:834) at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:416) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:347) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at org.openmrs.util.DatabaseUpdater.getConnection(DatabaseUpdater.java:420) at org.openmrs.util.DatabaseUpdater.getLiquibase(DatabaseUpdater.java:355) … 14 more Caused by: com.mysql.management.util.SQLRuntimeException: java.sql.SQLException: Access denied for user ‘root’@‘localhost’ (using password: NO) at com.mysql.management.driverlaunched.ServerLauncherSocketFactory.alreadyStarted(ServerLauncherSocketFactory.java:160) at com.mysql.management.driverlaunched.ServerLauncherSocketFactory.ensureMysqlStarted(ServerLauncherSocketFactory.java:82) at com.mysql.management.driverlaunched.ServerLauncherSocketFactory.connect(ServerLauncherSocketFactory.java:72) at com.mysql.jdbc.MysqlIO.(MysqlIO.java:308) at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2489) at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2334) … 28 more Caused by: java.sql.SQLException: Access denied for user ‘root’@‘localhost’ (using password: NO) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1086) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4237) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4169) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:928) at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1750) at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1290) at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2493) at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2526) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2311) at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:834) at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:416) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:347) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at com.mysql.management.driverlaunched.ServerLauncherSocketFactory.alreadyStarted(ServerLauncherSocketFactory.java:155) … 33 more
See the server log for full output. Please can anyone help?