Unable to compile Legacy UI module OMOD

Tags: #<Tag:0x00007f23d9214ef0> #<Tag:0x00007f23d9214e00>

Platform: 2.4:

Question: I’m trying to install Legacy UI by following the instructions at https://wiki.openmrs.org/display/docs/User+Interface+Modules but I’m unable to due to a compilation error: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (default-testCompile) on project legacyui-omod: Compilation failure: Compilation failure: [ERROR] /Users/trustbirungi/eclipse-workspace/openmrs-module-legacyui/omod/src/test/java/org/openmrs/web/servlet/DownloadDictionaryServletTest.java:[15,24] package javax.annotation does not exist

I’ve researched similar issues and they seem to be caused by having JDK versions higher than 1.8 but my JDK version is 1.8.0_232.

I’ve tried to check out and compile other branches of Legacy UI but I’m getting the same error.

Here’s the pastebin with the full maven log.

1 Like

Could there be a reason why you did not just use this? https://addons.openmrs.org/show/org.openmrs.module.legacy-ui-module

I was just following the guide step by step.

I’ve now downloaded the omod for legacy ui and added it to the modules folder in ${HOME}./OpenMRS/modules. I’m using MacOS.

This has led to other errors which are causing OpenMRS not to start. Here is the pastebin with the full details.

Since you are running the snapshot version of the platform, you can get it from here: https://ci.openmrs.org/build/result/artifactUrlRedirect.action?planKey=REFAPP-OMODDISTRO&buildNumber=10062&artifactName=referenceapplication-addons-snapshot

Thanks @dkayiwa . That solved my issue.

However, for someone else having the same issue, they’d have no way of knowing that that’d be the solution. I’m thinking of including it in the Manual Installation section as the source for UI modules when running the snapshot version of the platform.

Should I go ahead and include it there?

Yes go ahead. Thanks in advance. :slight_smile:

I am unable to find anything from that link. Can you please post the solution again. Thanks

What problem are you facing currently @kyokobah

exact same problem as user above. Here’s my error message from the console in pastebin

Are you deploying it under a snapshot version of platform?

Yes. The repository was cloned from Github

can you try cloning Legacy UI module OMOD, build the snapshot version and deploy that!

Legacy UI module OMOD was cloned wit the repository

build it using mvn clean install

Ok thank you it worked. I have a mac… where should I place the legacyui-1.9-SNAPSHOT.omod file that was generated from the clean install. All the instructions say in openers/modules , but I don’t have that folder. What is the mac equivalent?