Banda/openHMIS inventory module language issue

Module: OpenHMIS Inventory Module

Module Version: 3.0.0

System Version: 2.1.4

Reference Application Module: 2.9.0

Issue or Question:

The Inventory reports page seems to have some labels hard coded in Spanish, see screenshot:

If my understanding is correct, the file responsible for this is:

I’m ready to help and create a PR for this, however my skills in java are very low and I’m having problems with building the package. Here are the steps that I did:

  1. Fork the project on github
  2. Clone it locally
  3. Run: mvn clean package

Then I get the following errors:

[ERROR] Failed to execute goal on project openhmis.inventory-api: Could not resolve dependencies for project org.openmrs.module:openhmis.inventory-api:jar:3.0.0: The following artifacts coul
d not be resolved: org.openmrs.module:openhmis.commons-api:jar:4.0.0, org.openmrs.module:openhmis.commons-tests:jar:4.0.0, org.openmrs.module:jasperreport-api:jar:2.0.0: Failure to find org.
openmrs.module:openhmis.commons-api:jar:4.0.0 in http://mavenrepo.openmrs.org/nexus/content/repositories/public was cached in the local repository, resolution will not be reattempted until the update interval of openmrs-repo has elapsed or updates are forced -> [Help 1]

Could you advice on the correct steps to take @ibewes, @whiscard, @insiderish ?

Thanks !

The module has quite a number of dependencies on snapshot versions of other modules. So it requires you to first compile each of those modules with mvn clean install, before you can successfully compile this one. For instance, that error requires you to first compile this one: https://github.com/OpenHMIS/openmrs-module-openhmis.commons

1 Like

Thanks again @dkayiwa for your help, it is very much appreciated!

I could get passed my previous error, by compiling openmrs-module-openhmis.commons and openmrs-module-jasperreports. But one of the test from openmrs-module-openhmis.inventory fails and I get the following error:

Error message
Results :

Failed tests: 
  StockOperationServiceImplTest.calculateReservations_shouldCreateAdditionalTransactionsWhenWhenMultipleDetailsAreNeedToFulfillRequest:749 null

Tests run: 639, Failures: 1, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] OpenHMIS Inventory Module 3.1.0-SNAPSHOT ........... SUCCESS [  0.130 s]
[INFO] OpenHMIS Inventory Module Module API ............... FAILURE [01:34 min]
[INFO] OpenHMIS Inventory Module Module OMOD 1.x .......... SKIPPED
[INFO] OpenHMIS Inventory Module Module OMOD 2.x .......... SKIPPED
[INFO] OpenHMIS Inventory Module Module OMOD 3.1.0-SNAPSHOT SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:34 min
[INFO] Finished at: 2020-02-28T10:26:56Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.14:test (default-test) on project openhmis.inventory-api: There are test failures.
[ERROR] 
[ERROR] Please refer to /home/nicolas/projects/ELWA/IT/openmrs/modules/openmrs-module-openhmis.inventory/api/target/surefire-reports for the individual test results.
[/details]

Here is the test results : https://paste.centos.org/view/31a673d4

You can just ignore that test, for now.

OK thanks, I’ll try to make the changes

Just to follow up, the changes are done and merged upstream:

That is so awesome! Thank you so much @npiaget :slight_smile:

Hello! Is there a chance you can share these inventory omod files with me here? I have tried compiling but without success. And to make things worse I am not a coder. Will be really appreciated as using spanish im my health facility to run reports is a bit confusing and frustrating, Thanks in advance

Did you try downloading it from here? OpenMRS Add Ons

1 Like

I did, Daniel. I am using the latest OMOD file from there. It was last updated 3 years ago. It still has the spanish language error. I have followed your advice in this post. I was able to successfully compile openhmis common and jasper reports. However, unable to compile inventory due to error as in above post. You had advised the poster to ignore the error and just continue. My question is: Where is the OMOD file stored if the build was a failure? Many thanks in anticipation of your help.

If the build is successful after compiling with mvn clean package -DskipTests , then you can find the OMOD in the omod\target folder.

I did with above command. You made it look very easy. Many thanks

Hi, I am also trying to build openhmis-inventory module from source. I have followed all the above and have gotten stuck at the following error

[ERROR] Failed to execute goal on project openhmis.inventory-api: Could not resolve dependencies for project org.openmrs.module:openhmis.inventory-api:jar:3.1.0-SNAPSHOT: Failed to collect dependencies at org.openmrs.module:jasperreport-api:jar:2.1.0-SNAPSHOT: Failed to read artifact descriptor for org.openmrs.module:jasperreport-api:jar:2.1.0-SNAPSHOT: Could not transfer artifact org.openmrs.module:jasperreport-api:pom:2.1.0-SNAPSHOT from/to openmrs-repo-thirdparty (JFrog): Transfer failed for JFrog 409 Conflict → [Help 1]

Any help will be greatly appreciated.

I got this working, Had to build most of the dependencies. Now working on getting the server to boot up with openhmis modules.

1 Like

Now everything is working.

One issue I found with some of the openhmis projects was that “DefaultAnnotationHandlerMapping”, was giving an issue with the new spring5 , since spring5 is not supporting DefaultAnnotationHandlerMapping.

I got this resolved by commenting the bean mapping in webModuleApplicationContext.xml.

Since we do not need to specify annotation handlers with spring5, shouldn’t we permanently fix this by removing the bean mapping from webModuleApplicationContext.xml ?

Why not? Do you want to take a stab at this?

1 Like

Sure… be happy to.