Help: Build failure in openmrs-core api

Looking at the shared logs your fork you cloned is 102 commits behind openmrs:master. So update your fork with the latest changes from upstream master then pull those changes locally and compile again.

Thank you so much. I am requesting for the git commands i can run to achieve that.

You can use the github gui to update your fork with changes from upstream. On your fork click Synch fork button and Update branch. Then on your local repo run git pull --rebase origin master

I have done as above. The error in liquibase still occurs. here is a loghttps://pastebin.com/BT16mUKh. what changed in the sure-reports where the errors arise is the line causing the error. for CoreDataTunerTest it’s line 64 which is herehttps://pastebin.com/0eceG55A. Then for SchemaOnlyTunerTest ,it’s line 58 <property name="java.vm.info" value="mixed mode"/> - Pastebin.com :person_facepalming:

I am not able to reproduce the issue. Does the test pass when you target just the failing test class? e.g., mvn test -Dtest=SchemaOnlyTunerTest

@reganmakanga basing on the error log, resource '{}' raised an exception which is causing the the system not to find the file liquibase-core-data-SNAPSHOT.xm. (To get to know more about exception kindly follow this link Java Exception Handling Tutorials - Java Code Geeks - 2022). Kindly let me know when you are available for a sync on how to fix this issue since @kdaud has already given all the would be options that I had thought of.

In a sense, the issue is straight-forward:

org.dom4j.DocumentException: C:\Users\HP\openmrs-core\liquibase\target\test-classes\org%5copenmrs%5cliquibase%5csnapshots%5ccore-data%5cliquibase-core-data-SNAPSHOT.xml (The system cannot find the file specified)

Obviously, that’s not a valid file name. The expected thing is something like C:\Users\HP\openmrs-core\liquibase\target\test-classes\org\openmrs\liquibase\snapshots\core-data\liquibase-core-data-SNAPSHOT.xml (and, indeed, %5c corresponds to the URI-encoded version of \). At a guess
 things maybe just aren’t well-tested on windows?

That said, try running through the whole Maven process without tests (mvn clean install -DskipTests) and then see if things work better


1 Like

No , the test doesn’t pass. here is it’s log C:\Users\HP\openmrs-core>mvn test -Dtest=SchemaOnlyTunerTest[INFO] Scanning fo - Pastebin.com

Thank you @jwnasambu . Is 9 am tomorrow Tuesday favorable?

Can you ensure that you run the exact command that @ibacher suggested?

mvn clean install -DskipTests

when I skip tests, all projects pass as seen here in the log C:\Users\HP\openmrs-core>mvn clean install -DskipTests[INFO] Scanning for proj - Pastebin.com

when i run mvn clean install -DskipTests , all of them pass. here is the log C:\Users\HP\openmrs-core>mvn clean install -DskipTests[INFO] Scanning for proj - Pastebin.com

The command above does not run any of the tests but rather compiles the module.

What happens then when run mvn clean install ?

when i run mvn clean install , liquibase fails as seen here C:\Users\HP\openmrs-core>mvn clean install[INFO] Scanning for projects...[IN - Pastebin.com

Just pushed a commit that should fix this. Can you try it out and report back please?

There is a build failure in liquibase Microsoft Windows [Version 10.0.18363.628](c) 2019 Microsoft Corporation. All - Pastebin.com but it occurs in the CoreDataTunerTest file now only as seen this loghttps://pastebin.com/5HbWzDZD . The SchemaOnlyTunerTest is fine, thanks.

Kindly did you pull the latest changes?

Yes. i ran this command git pull --rebase origin master after syncing fork on my repo

Did you specify the server id for the module?

No. How can I do that?