Problem in Setting up Reference Application on OpenMRS-core

Hi everyone I was trying building and running the reference application for OpenMRS shifting from legacyUI module.

I am using this link as reference: https://wiki.openmrs.org/display/projects/Setting+Up+a+Development+Environment+for+OpenMRS+2.x

I have the openmrs core working and set up on eclipse with legacy ui and also I have cloned the reference application distro from github and run the required script mentioned in the link above. The problem is no .omod files are being generated in target folder to be copied to module folder in .OpenMRS directory on running the given script in the link mentioned above.

So I am kinda struck. Any help is welcomed.

Kindly share the error log to help evaluate the exact problem.

After cloning the https://github.com/openmrs/openmrs-distro-referenceapplication , I am running the script given below in the “Building and running the reference application” section of the link https://wiki.openmrs.org/display/projects/Setting+Up+a+Development+Environment+for+OpenMRS+2.x#SettingUpaDevelopmentEnvironmentforOpenMRS2.x-Buildingandrunningthereferenceapplication.

#########################################################

#!/bin/bash

mvn clean package -DskipTests

if [ -d ~/.OpenMRS/modules ];

then

rm ~/.OpenMRS/modules/*

else

mkdir -p ~/.OpenMRS/modules

fi

cp package /target/distro/*.omod ~/.OpenMRS/modules

echo Done copying omods to module repo

#####################################

After the successfull package build, it looks for .omod files in target/distro folder but there is no such file, so in terminal it gives the error of no such file. There is no error while building, its just that there’s supposed to be .omod files as mentioned in the documentation except that there ain’t one.

logs.txt (34.3 KB)

Here are the logs of build

If you look at the log carefully, you can see the OMODs being created in package/target/distro/web/modules. You can probably just update the path in the script accordingly.

That solved the problem and now I am able to get to the login page but after entering the correct credentials I get an error. These credentials worked with legacyUI.

Paste the stack trace at https://pastebin.com/ and then edit your post to replace it with a paste url

Sorry for the misconvenience, Heres the link: https://pastebin.com/05HP51Mw to the error I get on logging in through reference application. I am able to get to the log in page but I get this error after giving the correct credentials. These credentials work with legacyUI module.

You should also get the stack trace from the OpenMRS log. It seems like some useful information is being truncated in the web display.

Which version of the webservices module are you running? And which version of the OpenMRS platform?

Web Services => webservices.rest-2.26.0.omod

OpenMRS platform => 2.4.0-SNAPSHOT

In that case use the snapshot version of the rest webservices module.

Now I am using 2.27.0-SNAPSHOT cloned from https://github.com/openmrs/openmrs-module-webservices.rest

Web Services => webservices.rest-2.27.0-SNAPSHOT.0.omod copied from omod folder after the build.

And my problem is solved. Thanks for help. :slightly_smiling_face: