Error on deploying the application to Tomcat

Hello All, I’m trying to setup the OpenMRS application using Openmrs-core → 2.4.x branch. I’ve built this branch and deployed the .war file using Tomcat 7.0.17 version. While running the initial setup, I’m facinf this issue:

Can anyone help me out here?

@ankitm can you tell me which mysql version you are using ?

  • please ensure that your password is correct.
  • If you are building an SDK instance, ensure you select the default options without trying anything.

MySQL version is 5.7.33. Also, it runs perfectly with mvn jetty:run. Only when I try to run the setup by adding the .war file in tomcat/webapps folder that i face the issue

Kindly upgrade Apache Tomcat to version 9 and ensure the java version you are running ranges from 8 - 15.

1 Like

Tried with Tomcat 9.0.37. Same error.

Can you share the full server side log via

Actually you can with non default options too, they must be working

1 Like

@dkayiwa @sharif Can you guys help me out here?

Which operating system are you developing on , if you are running on centOs7 configure SELinux permissions: there is some cool suggestion here How do I solve “could not create connection to database” error? - #9 by hany that might help out, could you try @ibacher suggestion first please thanks

I’m working on windows 10. I also also followed the steps mentioned here: Step 5 - Deploy OpenMRS - Documentation - OpenMRS Wiki.

Feel free to also try out the suggestions above they may be of help, the only problem is that your tomcat is not getting connected with openmrs msql db

I’m going through the link you have shared. If that works, I’ll let you know. Meanwhile, if you have come across something similar for windows, please feel free to share.

Sure will share it asap

Are you able to connect to your MySQL database using the root account from command line or any GUI?

Yes, I’m able to connect to the MySQL database using the root account. Also, I’m able to run the code using mvn jetty:run. Only while using Tomcat that I get the above issue.

Drop the openmrs database, delete the runtime properties file, delete the logs folder, and then go through the setup wizard afresh.

I’ve tried the setup after removing everything:

  1. Tomcat
  2. OpenMRS DB
  3. Built the openmrs-core 2.4.x

Still the same result.

Can you share the new server side log via

@dkayiwa: Can you share the exact steps to be followed? I’ve followed the below steps:

  1. Setup the root password for MySQL 5.7.33
  2. Cloned and built the openmrs-core github 2.4.x (mvn clean package)
  3. Installed Tomcat 7.0.107
  4. Pasted the .war file into the Tomcat webapps folder
  5. Started the Tomcat server
  6. Ran the setup using: localhost:8080/openmrs

Also, tried to update the tomcat-users file as mentioned here: