Question on installing Legacy UI module with version 2.0 of OpenMRS

Hello

I hope to use OpenMRS as a case study for my students to work on and learn from in a Software Engineering course I will teach starting in February. So that I’m able to guide them in this endeavor, I’ve been trying to install a working version of OpenMRS myself. So far, I’ve successfully built version 2 by downloading the source code at https://github.com/openmrs/openmrs-core. When I start the OpenMRS system using the “mvn jetty:run” command, the page I see at localhost:8080/openmrs indicates that “If you are seeing this page, it means that the OpenMRS Platform is running successfully, but no user interface module is installed.”

I’ve followed the information link provided on that start-up page to https://wiki.openmrs.org/display/docs/User+Interface+Modules. There it tells me that I will need to build and install the Legacy UI module. I’ve consequently done that by building the source code available at https://github.com/openmrs/openmrs-module-legacyui.git. After I build the Legacy UI, I’ve copied the resulting jar (legacyui-1.0-SNAPSHOT.jar) and omod (legacyui-1.0-SNAPSHOT.omod) files to

openmrs-core/api/target/classes/org/openmrs/module/

since that is what the instructions at https://wiki.openmrs.org/display/docs/User+Interface+Modules indicate I should do. However, when I re-start the server, I’m still seeing that "no user interface module is installed’. Have I put the Legacy UI jar and omod files in the wrong directory under openmrs-core?

I think I’m getting close to successfully building something that I could give my students to work from, but I need to get past this problem. Any guidance would be appreciated.

Thanks, Tom Naps Professor, Computer Science University of Wisconsin Oshkosh

2 Likes

@tomnaps on the instructions page, do we need to make this clearer? 2) 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).’

For the rest, on this platform running page, should we include the modules folder for the running platform instance?

1 Like

You should only be installing the legacyui module’s .omod file and not the jar file

Yes, this would be helpful because after building Version 2 from the github repository, there is no ${HOME}./OpenMRS/modules directory. Instead there is an openmrs-core directory. So should the modules directory referred to in the instructions be located directly under the openmrs-core directory? I’ve tried creating the modules folder directly under ${HOME}./openmrs-core and also under ${HOME}./openmrs-core/webapp/target/openmrs and using those as the location for the omod file, but neither of those locations for the modules folder succeeds in getting the application to recognize the legacy UI module after I restart the jetty server.

${HOME} refers to your operating system login home folder. This may give you some tips: https://wiki.openmrs.org/display/docs/Overriding+OpenMRS+Default+Runtime+Properties

Thank you – this information helped me get around the problem I was having.

I have tried to configure. But I got an error for Jetty installation according to this link (http://run-jetty-run.googlecode.com/svn/trunk/updatesite) with eclipse. It shows me that there are no projects to download. I need some help to move forward!

i believe there is a maven plugin for eclipse to configure jetty. in case you still aren’t able to install it, you can use intellij. It dosen’t require any external plugins :slight_smile:

2 Likes

When I am trying to install the User Interface Modules for Developers, It’s failed to success. mvn clean install command show me these invalid target release error.

[INFO] Changes detected - recompiling the module! [INFO] Compiling 1 source file to D:\GSoC\OpenMrs\Project\openmrs-ui\openmrs-mod ule-legacyui\api\target\classes [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] Legacy UI Module … SUCCESS [01:05 min] [INFO] Legacy UI Module API … FAILURE [01:43 min] [INFO] Legacy UI Module OMOD … SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 03:59 min [INFO] Finished at: 2017-03-23T15:30:31+05:30 [INFO] Final Memory: 19M/154M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3. 1:compile (default-compile) on project legacyui-api: Fatal error compiling: inva lid target release: 1.8 → [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit ch. [ERROR] Re-run Maven using the -X switch to enable full debug logging.

Check if you are in the correct directory when running mvn clean install. In case their are build error pull in the latest changes, or use the latest stable release :slight_smile:

Thank you @jtatia for the tips. Anyway the problem is about to Java jdk version. I have installed both versions in my pc and forget to change the JAVA HOME variable from 1.7 to 1.8. After the changes it’s going successfully. :slight_smile:

1 Like

I have successfully deployed Open MRS with my environment :slight_smile: Thanks for the guidance!

When I am configuring IntelliJ IDEA for Open MRS, I got an error. So I would like to create a issue, but Issure page is not allowed to create issues using Open MRS ID, then I created a new case and send that to Open MRS. Is it correct way?

have you created a help desk case for access to JIRA ?? in case you don’t have access to issues please create a help desk case requesting for access. You can then create an issue :slight_smile:

1 Like

Yah, I have created a help desk case and now waiting for the access.

1 Like

hello all

I have the same issue as tomnaps… please excuse any faux pas as i am a complete newbie

I am also trying to grapple with the following instruction in the deployment section.

move the legacyui-(version#)-SNAPSHOT.omod into the ~/.OpenMRS/modules directory.

I am on a clean ubuntu 16.04 install

when I do a basic search through all of my file system I don’t see a directory “modules” I get the following output

root@healthEX1:/# find . -name “openmrs” ./root/.m2/repository/org/openmrs ./root/.m2/repository/org/openmrs/openmrs ./home/openmrs-module-legacyui/omod/target/classes/org/openmrs ./home/openmrs-module-legacyui/omod/target/classes/web/module/resources/scripts/dojo/src/widget/openmrs ./home/openmrs-module-legacyui/omod/target/test-classes/org/openmrs ./home/openmrs-module-legacyui/omod/target/legacyui-1.3.3-SNAPSHOT/org/openmrs ./home/openmrs-module-legacyui/omod/target/legacyui-1.3.3-SNAPSHOT/web/module/resources/scripts/dojo/src/widget/openmrs ./home/openmrs-module-legacyui/omod/src/main/webapp/resources/scripts/dojo/src/widget/openmrs ./home/openmrs-module-legacyui/omod/src/main/java/org/openmrs ./home/openmrs-module-legacyui/omod/src/test/resources/org/openmrs ./home/openmrs-module-legacyui/omod/src/test/java/org/openmrs ./home/openmrs-module-legacyui/api/target/classes/org/openmrs ./home/openmrs-module-legacyui/api/src/main/java/org/openmrs ./home/openmrs-core/webapp/src/test/java/org/openmrs ./home/openmrs-core/api/src/main/resources/org/openmrs ./home/openmrs-core/api/src/main/java/org/openmrs ./home/openmrs-core/api/src/test/resources/org/openmrs ./home/openmrs-core/api/src/test/java/org/openmrs ./home/openmrs-core/web/src/main/resources/org/openmrs ./home/openmrs-core/web/src/main/java/org/openmrs ./home/openmrs-core/web/src/test/java/org/openmrs ./home/openmrs-core/tools/src/main/java/org/openmrs root@healthEX1:/# find . -name “modules” ./usr/share/doc/initramfs-tools-core/examples/modules ./usr/share/initramfs-tools/modules ./usr/lib/x86_64-linux-gnu/gio/modules ./usr/lib/x86_64-linux-gnu/ldb/modules ./usr/lib/apache2/modules ./tmp/appdir-for-unit-tests-1833453559701790647/modules ./tmp/appdir-for-unit-tests-6758148906348707415/modules ./tmp/appdir-for-unit-tests-7230657640612314841/modules ./tmp/appdir-for-unit-tests-1742007912397244525/modules ./tmp/appdir-for-unit-tests-8868902397009732700/modules ./etc/modules ./etc/initramfs-tools/modules ./proc/modules ./home/openmrs-module-legacyui/omod/target/classes/web/module/admin/modules ./home/openmrs-module-legacyui/omod/target/legacyui-1.3.3-SNAPSHOT/web/module/admin/modules ./home/openmrs-module-legacyui/omod/src/main/webapp/admin/modules ./lib/modules root@healthEX1:/#

and when i do a deach for hidden directories

root@healthEX1:/# find . -type d -iname “modules” -ls 2370225 4 drwxr-xr-x 2 root root 4096 Jul 11 20:29 ./usr/lib/x86_64-linux-gnu/gio/modules 2490969 4 drwxr-xr-x 3 root root 4096 Nov 26 2016 ./usr/lib/x86_64-linux-gnu/ldb/modules 2491619 4 drwxr-xr-x 2 root root 4096 Jul 9 10:50 ./usr/lib/apache2/modules 3018133 4 drwxr-xr-x 2 root root 4096 Jul 11 21:14 ./tmp/appdir-for-unit-tests-1833453559701790647/modules 3018129 4 drwxr-xr-x 2 root root 4096 Jul 11 21:14 ./tmp/appdir-for-unit-tests-6758148906348707415/modules 3018131 4 drwxr-xr-x 2 root root 4096 Jul 11 21:14 ./tmp/appdir-for-unit-tests-7230657640612314841/modules 3018127 4 drwxr-xr-x 2 root root 4096 Jul 11 21:14 ./tmp/appdir-for-unit-tests-1742007912397244525/modules 3018135 4 drwxr-xr-x 2 root root 4096 Jul 11 21:14 ./tmp/appdir-for-unit-tests-8868902397009732700/modules 4197708 4 drwxr-xr-x 2 root root 4096 Jul 11 21:13 ./home/openmrs-module-legacyui/omod/target/classes/web/module/admin/modules 4326753 4 drwxr-xr-x 2 root root 4096 Jul 11 21:15 ./home/openmrs-module-legacyui/omod/target/legacyui-1.3.3-SNAPSHOT/web/module/admin/modules 4196695 4 drwxr-xr-x 2 root root 4096 Jul 11 21:08 ./home/openmrs-module-legacyui/omod/src/main/webapp/admin/modules 3277596 4 drwxr-xr-x 3 root root 4096 Jul 11 02:15 ./lib/modules root@healthEX1:/#

any help would be appreciated … where am i ment to copy the legacyui-(version#)-SNAPSHOT.omod file to?

Can you see /home/<username>/openmrs/server/modules ?

hello suthagar23 thanks for the reply

all i see is /home/openmrs-core/… not just /home//openmrs/server/

I am trying to install as root user,

also the document i am following https://wiki.openmrs.org/display/docs/OpenMRS+Installation+for+Developers+on+Ubuntu does not mention that i need to set up tomcat… before i start the install does this get set up as part of GIT?

jenv ftw!

hello burke I’m not sure what you mean with your post, I am running the latest version of both the JRE and JDK

root@healthEX1:/# java -version openjdk version “1.8.0_131” OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-0ubuntu1.16.04.2-b11) OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode) root@healthEX1:/# javac -version javac 1.8.0_131

My Jetty server is running and the “OpenMRS Platform” is running ok I just don’t have a ui loaded.

No where in the documentation does it state that i need to install Tomcat as a prerequisite?

Is the

/home//openmrs/server/modules

  • directory set up as part of the Tomcat install? are there other prerequisites required?

Following the documentation “OpenMRS Installation for Developers on Ubuntu”- to the letter I have only undertaken the following steps

  1. Clean install of ubuntu 16.04.02
  2. Install Java JRE
  3. Install Java JDK
  4. Install MySQL
  5. Set mysql password
  6. Install Maven
  7. Install GIT-all
  8. Clone GIT - git clone GitHub - openmrs/openmrs-module-legacyui: The legacy user interface for OpenMRS Platform 2.x is chiefly comprised of administrative functions and the patient dashboard. Apparently, a new and more contemporary UI has been introduced via a UI framework and the legacy UI is kept around for administrative functions that are not yet implemented in the new UI. To retire the Legacy UI as planned, it is required to move the implementations and modules that still rely on it in order to maintain backwards compatibility. The main idea behind this project is to move legacy UI functions into an OpenMRS module that these implementations can install until they are able to migrate away from it, since most of the implementations of OpenMRS around the world are running OpenMRS 1.9.
  9. Maven compile - openmrs-module-legacyui
  10. Clone GIT - git clone - github.com//openmrs-core.git
  11. Maven compile - openmrs-core

Any help would be appreciated

Regards

Oliver