OpenMRS showing database connection error

Okay, I added the bolded line to the Wiki:

  1. Install the module After the download completes, copy the .omod file (legacyui-{versionNumber}.omod) into the modules directory of your OpenMRS app data folder (e.g. ${HOME}/.OpenMRS/modules) or (Windows + R > %appdata%>OpenMRS>Modules). If you are using Tomcat, copy the .omod file (legacyui-{versionNumber}-SNAPSHOT.omod) into the bundledModules directory (e.g. /webapp/openmrs/WEB-INF/bundledModules) in your Tomcat directory.

Can the old line be deleted or is this still relevant if using Jetty?

That sounds as if tomcat users canā€™t have modules copied into their modules directory of the OpenMRS app data folder.

1 Like

I changed it to this:

Install the module After the download completes, copy the .omod file (legacyui-{versionNumber}.omod) into the modules directory of your OpenMRS app data folder (e.g. ${HOME}/.OpenMRS/modules) or (Windows + R > %appdata%>OpenMRS>Modules). You may have to copy the .omod file (legacyui-{versionNumber}-SNAPSHOT.omod) into the bundledModules directory (e.g. /webapp/openmrs/WEB-INF/bundledModules) in your Tomcat directory.

I do not understand why the old instructions were not working for me.

2 Likes

@mozzy I have lately been trying out this Standalone instance but it happens to be the same problem of the database connection still popping up. I have followed up the links provided above but still not getting helped out. I have tried to create an openmrs data base and also create the server3 database as suggested here Unable to find a runtime properties file by @dkayiwa and it showed some bit of success. but on logging in it failed out suggesting openmrs_user@ localhost denied. I tried creating a user in the above names but still failed. and the other thing, it being a war file, a failing to locate the openmrs property file. any further suggestions?

@hadend the bundledModules folder is not the recommended one, for installations. Any time the webapp is undeployed, you lose the modules. What exactly did not work for you in the original instructions?

1 Like

Hello, I have successfully installed the standalone openmrs application. it has been a challenge however I have noted down somethings that werenā€™t included in the documentation and could maybe be of help to someone or even included in the documentation.

On the Database connection problem and how to make changes to the openmrs runtime properties below is how I managed to go about it:

1- Finding the runtime properties which are auto-generated and placed in a folder like so C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\openmrs\META-INF\maven\org.openmrs.web\openmrs-webapp.

2- Copy the pom.properties file to the tomcat bin folder.

3- Edit the pom.properties and change both the connection userName and password to the ones created in your MySQL database.

4- Manually create the new database by the names of openmrs in your MySQL.

5- Start tomcat via command line.

**On where to place the .omod files, I first placed them in ${HOME}/.OpenMRS/modules) and it showed an error. However on placing them it in the /webapp/openmrs/WEB-INF/bundledModules folder the application ran perfectly.

Thanks @reagan, @mozzy and @dkayiwa for the help rendered

@lgilbert its great you have atlast installed the App succesfuly ,butā€¦ afew things to note

  • You seem not to have installed the standalone. that was a manual installtion meant for Openmrs Enteprise

. Take a look at openmrs setup document to know about the different installations, otherwise with the standalone Installtion , you dint have to go throgh alot of procedures.

You do not have to manually create the Database, We already have frameworks that do that on server startup.

That was good if it worked for you ,Though i think that was unnecessary.You could have done it in an easier recommended way probably

1 Like

Thanks for this @mozzyā€¦ however that setup was the one advised to me by @reagan and described it as a stand-alone because I was initially installing an openmrs core. Thanks for the correction though

@mozzy actually you did refer me to this not @reagan as i had mentioned :relieved:ā€¦

Itā€™s the one I have been following up on

1 Like

@lgilbert yes i undestand , i was actually trying to give you two options

  1. A standalone installation ,which is automated, comes with pre-packagedserver and database .
  2. An Enterprise installtion where you do all the deployment, server installtion and database installtions manually .

But Its good you have finally succesfully done it , though you did it the hard way , which i think is a cool experience for you as a dev anyway :smiley:

1 Like

Thats great to hearā€¦cheers:grinning:

1 Like

Now that I have the app up and running, are there any introduction tickets that I can possibly dive in to give me a picture on how I can start contributing as a casual developer. Am kinder new to this process so if there is any kind of help to guide me I highly welcome it. Cc. @mozzy @reagan Thanks in advance

@lgilbert here you go https://wiki.openmrs.org/display/docs/Getting+Started+as+a+Developer. This document answers all your questions above and many more. If you can go through it step by step, youll be good to go.

1 Like

Just to emphasize this more , at the begining of that wiki page , they first of all refer you to this developers manual , to give you a start up understanding about openmrs , so go through it.

1 Like

Thanks @mozzyā€¦ Not a bad way to start :slightly_smiling_face::slightly_smiling_face:

@dkayiwa I changed the instructions back. I finally figured out that the home folder being used was the root user and not my user home directory. Everything is working fine now. Sorry for the confusion. Thanks for your help.

2 Likes

No problem. Thanks for giving us an update.

1 Like