initial dev setup problem

the application data modules folder. Please clarify. Where exactly is this?

Also, where is legacyui module within the build artifacts you pointed at?

In the logs, do you see any text starting with? Using runtime properties file:

yes, I know where the runtime props file is

The legacyui module is in referenceapplication-addons-snapshot

right, I found it. 1.7.0-SNAPSHOT. do I put it inside a ā€˜modulesā€™ folder alongside the properties file?

Yes, in that modules folder.

and now stop the server and start it again?

That is correct.

still get error :frowning: java.lang.IllegalStateException: identifying the snapshot version that had been used to initialize the OpenMRS database failed as no candidate change set resulted in zero un-run changes

Could it be that you already had an existing database that is being picked up?

not likely. I installed mysql just a couple days ago. and I can see in the mysql workbench that the openmrs schema is not there when I start this process.

is it possible I need to have some max-memory setting increased? any other ideas?

It does not look like a problem with memory. Which operating system are you running?

Windows 10 Pro Version 10.0.18362 Build 18362

And what do you have in the browser?

I just noticed Iā€™m not using the latest java8 (162 instead of 251), and my maven is somewhat old. so updating thoseā€¦

When you were running the database setup wizard, which install method did you choose?

Stop OpenMRS and clear the log. Then start it again and share the full log via pastebin.com or any other paste site.

Standalone.

Is there a log file somewhere? Iā€™ve just been using ā€˜mvn jetty:run >openmrs.logā€™ or similar.

I stopped and started. hereā€™s the whole log: https://pastebin.com/SfgZykHY

Thanks for sharing the log details, Lee and I also had a look at the whole log.

Please allow me to give you some context on the way the database initialisation of OpenMRS was changed. In the old days all Liquibase change sets that ever existed were run when starting OpenMRS for the first time.

https://issues.openmrs.org/browse/TRUNK-4830 introduced Liquibase snapshots (which are similar to database dumps). Liquibase snapshots were created for the versions 1.9.x, 2.1.x, 2.2.x and 2.3.x.

When initialising OpenMRS from the current master branch against an empty database, openmrs-core would use the latest snapshot, i.e. 2.3.x which reduces the initialisation and startup time.

When updating the database (which happens after initialisation or after re-starting), openmrs-core figures out which snapshot version was originally used during the initialisation, so that all Liquibase updates which are more recent than that version can be applied. This work is done by the ChangeLogDetective class.

Looking at the latest log (and searching for ā€œChangeLogDetectiveā€) there is one puzzle, namely that the latest snapshot was not used to initialise your OpenMRS database

'org\openmrs\liquibase\snapshots\schema-only\liquibase-schema-only-2.3.x.xml' contains 875 un-run change sets
...
'org\openmrs\liquibase\snapshots\core-data\liquibase-core-data-2.3.x.xml' contains 25 un-run change sets
...

Could you please try the following steps and let us know about the outcome. As Daniel mentioned, it would be good to get openmrs-core starting without complaints first and only look into adding modules after that.

I am using MacOS for development and the examples below are the commands I run on the console, you would need to translate them to the respective commands on Windows:

  1. Drop the OpenMRS database

    $ mysql -u root -p

    mysql> show databases; ā€“ the resulting list should contain ā€˜openmrsā€™

    mysql> drop database openmrs;

    mysql> show databases; ā€“ the resulting list should no longer contain ā€˜openmrsā€™

  2. Delete the OpenMRS application folder that contains the file openmrs-runtime.properties, on my machine the application folder sits under my profile /Users/wolf/.OpenMRS.

Steps 1. and 2. undo the OpenMRS installation on your machine so that you can repeat the initialisation without bumping into side effects of previous runs.

  1. Build OpenMRS core

    $ cd <somewhere>/openmrs-core

    $ mvn clean install

    $ cd webapp

    $ mvn jetty:run

    Please provide the initialisation wizard with all parameters needed and you should see a few green bars building up while the database is initialised. After the initialisation is complete, the UI should say something along the lines ā€œall went well, started OpenMRS without UIā€.

After the running step 3, please share your log file once more (without restarting OpenMRS). Could you also take a screenshot of the UI after initialisation went through?

This should give us insights whether the initialisation is going well in the first place.

Thank you, Wolf