Are you Experiencing below kind of a problem when building the OpenMRS System for the First time?

[INFO] Starting jetty 6.1.10 ...
2012-01-19 11:46:28.295::INFO:  jetty-6.1.10
2012-01-19 11:46:29.043::INFO:  No Transaction manager found - if your webapp requires one, please configure one.
WARN - OpenmrsUtil.getRuntimePropertiesFilePathName(2438) |2012-01-19 11:46:30,460| Unable to find a runtime properties file at /home/harshadura/OpenMRS/Openmrs-trunk/webapp/openmrs-runtime.properties
ERROR - Listener.contextInitialized(154) |2012-01-19 11:46:35,015| Got exception while starting up: 
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:586)


Then, Create the "openmrs-runtime.properties" on the place mentioned by the jetty log.

vim /home/harshadura/OpenMRS/Openmrs-trunk/webapp/openmrs-runtime.properties

And then put the below data into it. Note : Create the Database and give the necessary details into it.

connection.username=open
connection.password=open
connection.url=jdbc:mysql://localhost:3306/openmrs?autoReconnect=true

Save and try a Jetty:run again! It should work.

Error with starting OpenMRS - "Unable to get a connection to the database"


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 ...
.................................................................................
.................................................................................
Caused by: java.sql.SQLException: Access denied for user 'openmrs_user'@'localhost' (using password: YES)

On Windows:
Delete this folder: C:\Users\USER_NAME\AppData\Roaming\OpenMRS

On Linux:
Delete this folder: /home/USER_NAME/.OpenMRS

And restart tomcat.