SDK server failed to create demo-Data on next start up

i want to do a test , and i configured the global property referencedemodata.createDemoPatientsOnNextStartup to 10 . but on next strtup…nothing was added to the database, what could be wrong??

@dkayiwa @ssmusoke @wyclif

With no error logs from Tomcat, there is no way to know what went wrong…

  1. What version of Reference Application are you running

  2. Did you start the server or did you run the test?

  3. Are you using Standaalone, a Tomcat Server or SDK?

1 Like

thank you @ssmusoke. i like the questions :grin:. am running the latest snapshot version of reff app wc doesnt exist yet. i just added up the distribution my self using the SDK, so that i can get a full distribution that runs on SNAPSHOT platform version 2.2.0 .

after setting up theglobal property “referencedemodata.createDemoPatientsOnNextStartup” to 10 , i restarted the server , but the 10 patients werent created .

let me try to get all the log

@ssmusoke , in the first place , referencedemodata.createDemoPatientsOnNextStartup did not exist in the list of Global Properties, i actually just manually added it my self. i dont know whether thats nomamal.

2nd) am i expected to first add/load a demo-database to the sdk server …or it comes with pre-installed demo-data?

This does not make sense - I do not understand it. What version of the Reference Application are you running either it is 2.8.0 or 2.9.0-SNAPSHOT. If you do not have any of these then you cannot create demo data

Do you have the rederencedemodata module in your installation?

i wud say its 2.9.0 SNAPSHOT , but i heavily altered it, as in i removed the openmrs core war 2.1.3 , and replaced it with 2.2.0 SNAPSHOT. i manually fetched the latest commits , of the war file, core apps module . EMR-api , and Webrest services, and Compiled the latest versions of them and also replaced them in the reffApp 2.9. that was the only condition , i cud get the reffernce application run on plaform 2.2.0 . otherwise , merely cloning ref app 2.9.0 , coudnt make it run on platform version 2.2.0. thats wat i did

yes i do have it. am also wondering :thinking: . probably its because of the custom changes

I think you can update an SDK server using the steps below:

  1. Edit the file with the new versions

  2. Deploy the new versions using mvn openmrs-sdk:deploy -Ddistro=/path/to/ -DserverId=yourserverId

Let me know how this goes - we may have to add this to the wiki if it works

1 Like

ya , actually thats wat i did exactly to get a reffrence application that runs on platform 2.2.0. it works . just that even wen u define a certain snapshot version of a module say emrapi-1.25.0-SNAPSHOT , the sdk may not fetch the recently merged commits ,say of yesterday. ,and for the refapp to run on Platform core 2.2.0, Dkayiwa advised me to just fetch the latest commits in emr-api, core apps, and web-rest, and just compile them manually ,then drop them into the reff app.

if you want latest snapshots add the -U option of the SDK to pull the latest snapshots

oh sure? can that clone even the commits that have been merged like a few seconds ago?

You just have to wait about 5 to 10 minutes for the changes to be propagated to bin-tray where the SDK looks for the packages

because , the challenge i had, there were recently merged commits in the emr-api , that i needed , and the sdk coudnt clone them.

oh may be to ask , when commits are merged to the master , do they by default go to the bintray ? or a snapshot version has to be manually released to bintray?

otherwise i think at the end of the day , the sdk only looks for the released SNAPSHOT versions in bin-tray , it cant clone merged commits before releasing them to bintray? u can corect me, thats wat i think

When a PR is merged to master then a new snapshot is loaded to bin-tray … Not sure what you mean the other statements

1 Like

in other words, every PR merged , a new SNAPSHOT is loaded to bintray? ryt? then i get u.

can u give me a slight example of how to add the -U option and i try that then?

mvn openmrs-sdk:deploy -U -Ddistro=/path/to/ -DserverId=yourserverId

1 Like

ok let me do that

wat i meant , i thought , that whenever a PR is merged … some one has to release the SNAPSHOT versions manualy to bintray like after a certain period of time …or probabbly after a certain number of merges…meaning , we cud have merged commits that only exists in github , and arent yet loaded to bintray for the sdk to clone. .that was just wat i thought.

but now its clear in my head . thx sir