Eclipse error after executing "jetty:run"

I have followed all the procedures in running openmrs in eclipse, I downloaded all the plugins and I followed all the steps as described in this website but I get this error when I run “openmrs-web” :

****** " 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 " *******

, how do I solve this ? and if I need to create a file with name “runtime.properties”, what will be the username and password ? thanx in advance :wink:

@florencemayo89 are you still having this issue?

1 Like

hi @ivange94,

Thank you for the reply. I decided not to use eclipse so I followed the steps in the openMRS developer guide document which does not involve the use of eclipse and it has been going well so far.

Thank you.

@florencemayo89 cool

1 Like

Hi,

I’m experiencing an issue with eclispe. mvn jetty:run executes fine for me, but on eclipse, I’m thrown:

2015-10-14 15:55:05.512:INFO:/openmrs-webapp:Set web app root system property: 'webapp.root' = [C:\Users\Owais\git\openmrs-core\webapp\src\main\webapp]
2015-10-14 15:55:05.528:INFO:/openmrs-webapp:Initializing log4j from [classpath:log4j.xml]
WARN - OpenmrsUtil.getRuntimePropertiesFilePathName(2524) |2015-10-14 15:55:05,732| Unable to find a runtime properties file at C:\Users\Owais\git\openmrs-core\webapp\openmrs-webapp-runtime.properties
ERROR - OpenmrsConstants.getVersion(167) |2015-10-14 15:55:05,747| Unable to find pom.properties file built by maven
ERROR - OpenmrsConstants.getVersion(167) |2015-10-14 15:55:05,747| Unable to find pom.properties file built by maven
WARN - OpenmrsUtil.getRuntimePropertiesFilePathName(2550) |2015-10-14 15:55:05,778| Unable to find properties file: C:\Users\Owais\Application Data\OpenMRS\openmrs-webapp-runtime.properties
WARN - OpenmrsUtil.getRuntimeProperties(2488) |2015-10-14 15:55:05,778| Unable to find a runtime properties file. Initial setup is needed. View the webapp to run the setup wizard.
WARN - OpenmrsUtil.getRuntimePropertiesFilePathName(2524) |2015-10-14 15:55:05,981| Unable to find a runtime properties file at C:\Users\Owais\git\openmrs-core\webapp\openmrs-webapp-runtime.properties
WARN - OpenmrsUtil.getRuntimePropertiesFilePathName(2550) |2015-10-14 15:55:05,981| Unable to find properties file: C:\Users\Owais\Application Data\OpenMRS\openmrs-webapp-runtime.properties
WARN - OpenmrsUtil.getRuntimeProperties(2488) |2015-10-14 15:55:05,981| Unable to find a runtime properties file. Initial setup is needed. View the webapp to run the setup wizard.
2015-10-14 15:55:06.138:INFO::Started SelectChannelConnector@0.0.0.0:8080

My question is why is Jetty trying to find openmrs-webapp-runtime.properties, instead of openmrs-runtime.properties? And where do I set this parameter?

Hi @owais_hussain

I did not resolve this case with eclipse, rather I followed the openmrs developer guide which does not say anything about eclipse.

But maybe @ivange94 can help in this.

The name comes from your context path. By the way which version of openmrs?

1 Like

This is 1.9.x. What’s interesting me in particular is why is this path correctly picked on command line, but not via Eclipse.

Right click on the webapp project, then select “Web Project Settings”. You should then change “Context root” on the right hand side.

2 Likes

Thanks Daniel. It turns out that the Jetty plugin is our culprit. The solution is to Run as Maven build and set the goal “jetty:run”.

1 Like