Error while deploying my first module with openmrs

I’m getting this error while deploying my module on server . How can this be fixed? Any help on this is appreciated.

The following are the steps I followed:

  1. Have set up OpenMRS SDK using:
    mvn org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:setup-sdk
  2. Confirmed that OpenMRS SDK is working using:
    mvn openmrs-sdk:help
  3. Created my first module using:
    mvn openmrs-sdk:create-project
  4. Navigated to the module and ran:
    mvn clean install
  5. Started the server and tried to run
    http://localhost:8080/openmrs/admin/
    and got this error

Search for the openmrs-runtime.properties file to see if there is still application data left over from a previous installation then delete it see if it can solve the problem.

1 Like

or If you have the correct password and username, check if you have another openmrsruntime.properties files else where in another location. Then change it to the correct username and password of mySQL

1 Like

@kdaud , you would want to look at this thread,

1 Like

Hey @kdaud, did you check your MySQL server running or not? cause it throws a similar error when you forget to start your mysql server.

Am sorry for the delay @mozzy, @jwnasambu, @rushikesh class work for my studies had taken me up but here I am

@rushikesh MYSQL server is running

Where can I find the directory of openmrs-runtime.properties

I have passed through the thread so keenly though the blocker was about openmrs failing to connect to the MYSQL. For my case MYSQL 5.7 server is running fine

On Windows systems:

C:\Documents and Settings\YOURUSERNAME\Application Data\OpenMRS
C:\Windows\system32\config\systemprofile\Application Data\OpenMRS

On Mac OS X or Linux systems:

~/YOURUSERNAME/.OpenMRS
/usr/share/tomcatX/.OpenMRS

@jwnasambu .OpenMRS folder is present in only one directory.
When I open openmrs-runtime.properties I see this output. Does it need to change the password and username in this file to match those credentials of mysql?

Those are your mysql credentials. Kindly ensure you don’t have another folder in any location on your PC. If you do, follow the same procedure and match those credentials.

I only have one directory of .OpenMRS existing. According to the output in
openmrs-runtime.properties the username and password does not match those I set in mysql sever.
Did you mean to reset them so that they match those credential set in MYSQL server? @jwnasambu

If you think so, you can change them to match with what you have.

Have done the following:
Have edited the openmrs-runtime.properties file and set connection.username and conncection.password to match those I set in MYSQL server. ie currently in openmrs-runtime.properties file:
connection.username=root and connection.password=softwaredev@
The same exception persists when I run localhost:8080/openmrs/admin/

Have you tried this?

FYI. We just upgraded to Tomcat 7.0.96 on Windows, and the location of the OpenMRS data directory changed from C:\Windows\system32\config\systemprofile\Application Data\OpenMRS to C:\Windows\ServiceProfiles\LocalService\Application Data\OpenMRS

Kindly use Tomcat 8

The problem is rotating around either updating your mysql database or understanding the database connections and runtime.properties files

How does one create a ticket on Jira
cc:@jwnasambu, @sharif