Hello @dkayiwa @mherman22, I cloned the openMRS core repo to my machine (M1 MacBook Pro) running Java 21, but when I tried running mvn clean package
, it yielded a BUILD FAILURE
, then tried mvn clean install
, it also gave the same results.
Next, I installed Java 17 and set it in my JAVA_HOME, still the problem persisted.
Please some help if you know anything that can be done.
Sharing the screenshot alone doesn’t speak much, could you share the entire error log?
[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.070 s -- in org.openmrs.serialization.SimpleXStreamSerializerTest
[INFO] Running org.openmrs.module.ModuleFileParserTest
[ERROR] Tests run: 6, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 0.039 s <<< FAILURE! -- in org.openmrs.module.ModuleFileParserTest
[ERROR] org.openmrs.module.ModuleFileParserTest.moduleFileParser_shouldFailCreatingParserFromFileIfInputStreamClosed -- Time elapsed: 0.010 s <<< ERROR!
java.io.FileNotFoundException: /Users/2/ariho/Programming/Opensource%20Projects/openmrs-core/api/target/test-classes/org/openmrs/module/include/logic-0.2.omod (No such file or directory)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(FileInputStream.java:213)
at java.base/java.io.FileInputStream.<init>(FileInputStream.java:152)
at org.openmrs.module.ModuleFileParserTest.moduleFileParser_shouldFailCreatingParserFromFileIfInputStreamClosed(ModuleFileParserTest.java:85)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
[ERROR] org.openmrs.module.ModuleFileParserTest.parse_shouldParseValidLogicModuleFromFile -- Time elapsed: 0.003 s <<< ERROR!
org.openmrs.module.ModuleException: Unable to get jar file Module: logic-0.2.omod
at org.openmrs.module.ModuleFileParser.getModuleConfigXml(ModuleFileParser.java:233)
at org.openmrs.module.ModuleFileParser.parse(ModuleFileParser.java:222)
at org.openmrs.module.ModuleFileParserTest.parse_shouldParseValidLogicModuleFromFile(ModuleFileParserTest.java:137)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
Caused by: java.nio.file.NoSuchFileException: /Users/2/ariho/Programming/Opensource%20Projects/openmrs-core/api/target/test-classes/org/openmrs/module/include/logic-0.2.omod
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:171)
at java.base/java.nio.file.Files.readAttributes(Files.java:1854)
at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1445)
at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:724)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:251)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:180)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:345)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:316)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:282)
at org.openmrs.module.ModuleFileParser.getModuleConfigXml(ModuleFileParser.java:227)
... 5 more
[ERROR] org.openmrs.module.ModuleFileParserTest.parse_shouldParseValidXmlConfigCreatedFromInputStream -- Time elapsed: 0.003 s <<< ERROR!
java.io.FileNotFoundException: /Users/2/ariho/Programming/Opensource%20Projects/openmrs-core/api/target/test-classes/org/openmrs/module/include/logic-0.2.omod (No such file or directory)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(FileInputStream.java:213)
at java.base/java.io.FileInputStream.<init>(FileInputStream.java:152)
at org.openmrs.module.ModuleFileParserTest.parse_shouldParseValidXmlConfigCreatedFromInputStream(ModuleFileParserTest.java:96)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
[INFO] Running org.openmrs.module.ModuleUtilTest
[ERROR] Tests run: 79, Failures: 0, Errors: 6, Skipped: 0, Time elapsed: 0.253 s <<< FAILURE! -- in org.openmrs.module.ModuleUtilTest
[ERROR] org.openmrs.module.ModuleUtilTest.expandJar_shouldExpandDirectoryWithParentTreeIfNameIsDirectoryAndKeepFullPathIsTrue -- Time elapsed: 0.003 s <<< ERROR!
java.nio.file.NoSuchFileException: /Users/2/ariho/Programming/Opensource%20Projects/openmrs-core/api/target/test-classes/org/openmrs/module/include/testJarExpand.omod
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:171)
at java.base/java.nio.file.Files.readAttributes(Files.java:1854)
at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1445)
at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:724)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:251)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:180)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:345)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:316)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:282)
at org.openmrs.module.ModuleUtil.expandJar(ModuleUtil.java:564)
at org.openmrs.module.ModuleUtilTest.expandJar_shouldExpandDirectoryWithParentTreeIfNameIsDirectoryAndKeepFullPathIsTrue(ModuleUtilTest.java:681)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
[ERROR] org.openmrs.module.ModuleUtilTest.expandJar_shouldExpandEntireJarIfNameIsEmptyString -- Time elapsed: 0.004 s <<< ERROR!
java.nio.file.NoSuchFileException: /Users/2/ariho/Programming/Opensource%20Projects/openmrs-core/api/target/test-classes/org/openmrs/module/include/testJarExpand.omod
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:171)
at java.base/java.nio.file.Files.readAttributes(Files.java:1854)
at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1445)
at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:724)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:251)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:180)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:345)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:316)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:282)
at org.openmrs.module.ModuleUtil.expandJar(ModuleUtil.java:564)
at org.openmrs.module.ModuleUtilTest.expandJar_shouldExpandEntireJarIfNameIsEmptyString(ModuleUtilTest.java:720)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
[ERROR] org.openmrs.module.ModuleUtilTest.expandJar_shouldExpandEntireJarIfNameIsNull -- Time elapsed: 0.002 s <<< ERROR!
java.nio.file.NoSuchFileException: /Users/2/ariho/Programming/Opensource%20Projects/openmrs-core/api/target/test-classes/org/openmrs/module/include/testJarExpand.omod
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:171)
at java.base/java.nio.file.Files.readAttributes(Files.java:1854)
at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1445)
at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:724)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:251)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:180)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:345)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:316)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:282)
at org.openmrs.module.ModuleUtil.expandJar(ModuleUtil.java:564)
at org.openmrs.module.ModuleUtilTest.expandJar_shouldExpandEntireJarIfNameIsNull(ModuleUtilTest.java:736)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
[ERROR] org.openmrs.module.ModuleUtilTest.expandJar_shouldExpandFileWithParentTreeIfNameIsFileAndKeepFullPathIsTrue -- Time elapsed: 0.003 s <<< ERROR!
java.nio.file.NoSuchFileException: /Users/2/ariho/Programming/Opensource%20Projects/openmrs-core/api/target/test-classes/org/openmrs/module/include/testJarExpand.omod
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:171)
at java.base/java.nio.file.Files.readAttributes(Files.java:1854)
at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1445)
at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:724)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:251)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:180)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:345)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:316)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:282)
at org.openmrs.module.ModuleUtil.expandJar(ModuleUtil.java:564)
at org.openmrs.module.ModuleUtilTest.expandJar_shouldExpandFileWithParentTreeIfNameIsFileAndKeepFullPathIsTrue(ModuleUtilTest.java:752)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
[ERROR] org.openmrs.module.ModuleUtilTest.getPackagesFromFile_shouldSkipOptionalFoldersIfJarFile -- Time elapsed: 0.002 s <<< ERROR!
java.io.FileNotFoundException: Source '/Users/2/ariho/Programming/Opensource%20Projects/openmrs-core/api/target/test-classes/org/openmrs/module/include/test1-1.0-SNAPSHOT.omod' does not exist
at org.apache.commons.io.FileUtils.checkFileExists(FileUtils.java:317)
at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:866)
at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:902)
at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:801)
at org.openmrs.module.ModuleUtilTest.getPackagesFromFile_shouldSkipOptionalFoldersIfJarFile(ModuleUtilTest.java:796)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
[ERROR] org.openmrs.module.ModuleUtilTest.expandJar_shouldExpandDirectoryWithoutParentTreeIfNameIsDirectoryAndKeepFullPathIsFalse -- Time elapsed: 0.003 s <<< ERROR!
java.nio.file.NoSuchFileException: /Users/2/ariho/Programming/Opensource%20Projects/openmrs-core/api/target/test-classes/org/openmrs/module/include/testJarExpand.omod
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:171)
at java.base/java.nio.file.Files.readAttributes(Files.java:1854)
at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1445)
at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:724)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:251)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:180)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:345)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:316)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:282)
at org.openmrs.module.ModuleUtil.expandJar(ModuleUtil.java:564)
at org.openmrs.module.ModuleUtilTest.expandJar_shouldExpandDirectoryWithoutParentTreeIfNameIsDirectoryAndKeepFullPathIsFalse(ModuleUtilTest.java:702)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
[INFO] Running org.openmrs.module.ModuleActivatorTest
[INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.331 s -- in org.openmrs.module.ModuleActivatorTest
[INFO] Running org.openmrs.module.ModuleInteroperabilityTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.367 s -- in org.openmrs.module.ModuleInteroperabilityTest
[INFO] Running org.openmrs.module.UpdateFileParserTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 s -- in org.openmrs.module.UpdateFileParserTest
[INFO] Running org.openmrs.module.ModuleFactoryTest
[ERROR] Tests run: 9, Failures: 2, Errors: 5, Skipped: 0, Time elapsed: 0.781 s <<< FAILURE! -- in org.openmrs.module.ModuleFactoryTest
[ERROR] org.openmrs.module.ModuleFactoryTest.loadModule_shouldLoadModuleIfItIsCurrentlyNotLoaded -- Time elapsed: 0.683 s <<< ERROR!
org.openmrs.module.ModuleException: Unable to get jar file Module: test2-1.0-SNAPSHOT.omod
at org.openmrs.module.ModuleFileParser.getModuleConfigXml(ModuleFileParser.java:233)
at org.openmrs.module.ModuleFileParser.parse(ModuleFileParser.java:222)
at org.openmrs.module.ModuleFactory.loadModule(ModuleFactory.java:113)
at org.openmrs.module.ModuleFactoryTest.loadModule(ModuleFactoryTest.java:185)
at org.openmrs.module.ModuleFactoryTest.loadModule_shouldLoadModuleIfItIsCurrentlyNotLoaded(ModuleFactoryTest.java:59)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
Caused by: java.nio.file.NoSuchFileException: /Users/2/ariho/Programming/Opensource%20Projects/openmrs-core/api/target/test-classes/org/openmrs/module/include/test2-1.0-SNAPSHOT.omod
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:171)
at java.base/java.nio.file.Files.readAttributes(Files.java:1854)
at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1445)
at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:724)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:251)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:180)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:345)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:316)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:282)
at org.openmrs.module.ModuleFileParser.getModuleConfigXml(ModuleFileParser.java:227)
... 7 more
[ERROR] org.openmrs.module.ModuleFactoryTest.loadModules_shouldNotStartTheLoadedModules -- Time elapsed: 0.011 s <<< FAILURE!
org.opentest4j.AssertionFailedError: expected: <3> but was: <0>
at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197)
at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:150)
at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:145)
at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:531)
at org.openmrs.module.ModuleFactoryTest.loadModules_shouldNotStartTheLoadedModules(ModuleFactoryTest.java:171)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
[ERROR] org.openmrs.module.ModuleFactoryTest.loadModule_shouldNotLoadAnOlderVersionOfTheSameModule -- Time elapsed: 0.009 s <<< ERROR!
org.openmrs.module.ModuleException: Unable to get jar file Module: test1-2.0-SNAPSHOT.omod
at org.openmrs.module.ModuleFileParser.getModuleConfigXml(ModuleFileParser.java:233)
at org.openmrs.module.ModuleFileParser.parse(ModuleFileParser.java:222)
at org.openmrs.module.ModuleFactory.loadModule(ModuleFactory.java:113)
at org.openmrs.module.ModuleFactoryTest.loadModule(ModuleFactoryTest.java:185)
at org.openmrs.module.ModuleFactoryTest.loadModule_shouldNotLoadAnOlderVersionOfTheSameModule(ModuleFactoryTest.java:107)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
Caused by: java.nio.file.NoSuchFileException: /Users/2/ariho/Programming/Opensource%20Projects/openmrs-core/api/target/test-classes/org/openmrs/module/include/test1-2.0-SNAPSHOT.omod
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:171)
at java.base/java.nio.file.Files.readAttributes(Files.java:1854)
at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1445)
at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:724)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:251)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:180)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:345)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:316)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:282)
at org.openmrs.module.ModuleFileParser.getModuleConfigXml(ModuleFileParser.java:227)
... 7 more
[ERROR] org.openmrs.module.ModuleFactoryTest.loadModules_shouldSetupRequirementMappingsForEveryModule -- Time elapsed: 0.010 s <<< FAILURE!
org.opentest4j.AssertionFailedError: expected: <3> but was: <0>
at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197)
at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:150)
at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:145)
at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:531)
at org.openmrs.module.ModuleFactoryTest.loadModules_shouldSetupRequirementMappingsForEveryModule(ModuleFactoryTest.java:153)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
[ERROR] org.openmrs.module.ModuleFactoryTest.loadModule_shouldLoadANewerVersionOfTheSameModule -- Time elapsed: 0.008 s <<< ERROR!
org.openmrs.module.ModuleException: Unable to get jar file Module: test1-2.0-SNAPSHOT.omod
at org.openmrs.module.ModuleFileParser.getModuleConfigXml(ModuleFileParser.java:233)
at org.openmrs.module.ModuleFileParser.parse(ModuleFileParser.java:222)
at org.openmrs.module.ModuleFactory.loadModule(ModuleFactory.java:113)
at org.openmrs.module.ModuleFactoryTest.loadModule(ModuleFactoryTest.java:185)
at org.openmrs.module.ModuleFactoryTest.loadModule_shouldLoadANewerVersionOfTheSameModule(ModuleFactoryTest.java:95)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
Caused by: java.nio.file.NoSuchFileException: /Users/2/ariho/Programming/Opensource%20Projects/openmrs-core/api/target/test-classes/org/openmrs/module/include/test1-2.0-SNAPSHOT.omod
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:171)
at java.base/java.nio.file.Files.readAttributes(Files.java:1854)
at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1445)
at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:724)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:251)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:180)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:345)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:316)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:282)
at org.openmrs.module.ModuleFileParser.getModuleConfigXml(ModuleFileParser.java:227)
... 7 more
[ERROR] org.openmrs.module.ModuleFactoryTest.startModule_shouldStartAllDependencies -- Time elapsed: 0.009 s <<< ERROR!
org.openmrs.module.ModuleException: Unable to get jar file Module: test1-1.0-SNAPSHOT.omod
at org.openmrs.module.ModuleFileParser.getModuleConfigXml(ModuleFileParser.java:233)
at org.openmrs.module.ModuleFileParser.parse(ModuleFileParser.java:222)
at org.openmrs.module.ModuleFactory.loadModule(ModuleFactory.java:113)
at org.openmrs.module.ModuleFactoryTest.loadModule(ModuleFactoryTest.java:185)
at org.openmrs.module.ModuleFactoryTest.startModule_shouldStartAllDependencies(ModuleFactoryTest.java:121)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
Caused by: java.nio.file.NoSuchFileException: /Users/2/ariho/Programming/Opensource%20Projects/openmrs-core/api/target/test-classes/org/openmrs/module/include/test1-1.0-SNAPSHOT.omod
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:171)
at java.base/java.nio.file.Files.readAttributes(Files.java:1854)
at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1445)
at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:724)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:251)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:180)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:345)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:316)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:282)
at org.openmrs.module.ModuleFileParser.getModuleConfigXml(ModuleFileParser.java:227)
... 7 more
[ERROR] org.openmrs.module.ModuleFactoryTest.loadModule_shouldAlwaysLoadModuleIfReplacementIsWanted -- Time elapsed: 0.009 s <<< ERROR!
org.openmrs.module.ModuleException: Unable to get jar file Module: test1-1.0-SNAPSHOT.omod
at org.openmrs.module.ModuleFileParser.getModuleConfigXml(ModuleFileParser.java:233)
at org.openmrs.module.ModuleFileParser.parse(ModuleFileParser.java:222)
at org.openmrs.module.ModuleFactory.loadModule(ModuleFactory.java:113)
at org.openmrs.module.ModuleFactoryTest.loadModule(ModuleFactoryTest.java:185)
at org.openmrs.module.ModuleFactoryTest.loadModule_shouldAlwaysLoadModuleIfReplacementIsWanted(ModuleFactoryTest.java:82)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
Caused by: java.nio.file.NoSuchFileException: /Users/2/ariho/Programming/Opensource%20Projects/openmrs-core/api/target/test-classes/org/openmrs/module/include/test1-1.0-SNAPSHOT.omod
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:171)
at java.base/java.nio.file.Files.readAttributes(Files.java:1854)
at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1445)
at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:724)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:251)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:180)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:345)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:316)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:282)
at org.openmrs.module.ModuleFileParser.getModuleConfigXml(ModuleFileParser.java:227)
... 7 more
[INFO] Running org.openmrs.module.ModuleTest
[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 s -- in org.openmrs.module.ModuleTest
[INFO] Running org.openmrs.module.VersionComparatorTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s -- in org.openmrs.module.VersionComparatorTest
[INFO] Running org.openmrs.module.ModuleExtensionsTest
[ERROR] Tests run: 10, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.011 s <<< FAILURE! -- in org.openmrs.module.ModuleExtensionsTest
[ERROR] org.openmrs.module.ModuleExtensionsTest.getExtensions_shouldNotFailExpandingAnExtensionNameCausingANoClassDefinitionFoundError -- Time elapsed: 0.001 s <<< ERROR!
org.openmrs.module.ModuleException: null Module: logic-0.2.omod
at org.openmrs.module.ModuleFileParser.getModuleConfigXml(ModuleFileParser.java:233)
at org.openmrs.module.ModuleFileParser.parse(ModuleFileParser.java:222)
at org.openmrs.module.ModuleExtensionsTest.getExtensions_shouldNotFailExpandingAnExtensionNameCausingANoClassDefinitionFoundError(ModuleExtensionsTest.java:96)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
Caused by: java.nio.file.NoSuchFileException: /Users/2/ariho/Programming/Opensource%20Projects/openmrs-core/api/target/test-classes/org/openmrs/module/include/logic-0.2.omod
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:171)
at java.base/java.nio.file.Files.readAttributes(Files.java:1854)
at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1445)
at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:724)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:251)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:180)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:345)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:316)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:282)
at org.openmrs.module.ModuleFileParser.getModuleConfigXml(ModuleFileParser.java:227)
... 5 more
[INFO] Running org.openmrs.module.ModuleClassLoaderTest
[INFO] Tests run: 39, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.113 s -- in org.openmrs.module.ModuleClassLoaderTest
[INFO] Running org.openmrs.module.ModuleFileParserUnitTest
[Fatal Error] :1:67: XML document structures must start and end within the same entity.
[Fatal Error] :-1:-1: Premature end of file.
Some other tests ran successfully here.
[INFO] Running org.openmrs.annotation.OpenmrsProfileExcludeFilterWithModulesJUnit4Test
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.111 s -- in org.openmrs.annotation.OpenmrsProfileExcludeFilterWithModulesJUnit4Test
[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] ModuleFactoryTest.loadModules_shouldNotStartTheLoadedModules:171 expected: <3> but was: <0>
[ERROR] ModuleFactoryTest.loadModules_shouldSetupRequirementMappingsForEveryModule:153 expected: <3> but was: <0>
[ERROR] Errors:
[ERROR] ModuleExtensionsTest.getExtensions_shouldNotFailExpandingAnExtensionNameCausingANoClassDefinitionFoundError:96 » Module null Module: logic-0.2.omod
[ERROR] ModuleFactoryTest.loadModule_shouldAlwaysLoadModuleIfReplacementIsWanted:82->loadModule:185 » Module Unable to get jar file Module: test1-1.0-SNAPSHOT.omod
[ERROR] ModuleFactoryTest.loadModule_shouldLoadANewerVersionOfTheSameModule:95->loadModule:185 » Module Unable to get jar file Module: test1-2.0-SNAPSHOT.omod
[ERROR] ModuleFactoryTest.loadModule_shouldLoadModuleIfItIsCurrentlyNotLoaded:59->loadModule:185 » Module Unable to get jar file Module: test2-1.0-SNAPSHOT.omod
[ERROR] ModuleFactoryTest.loadModule_shouldNotLoadAnOlderVersionOfTheSameModule:107->loadModule:185 » Module Unable to get jar file Module: test1-2.0-SNAPSHOT.omod
[ERROR] ModuleFactoryTest.startModule_shouldStartAllDependencies:121->loadModule:185 » Module Unable to get jar file Module: test1-1.0-SNAPSHOT.omod
[ERROR] ModuleFileParserTest.moduleFileParser_shouldFailCreatingParserFromFileIfInputStreamClosed:85 » FileNotFound /Users/2/ariho/Programming/Opensource%20Projects/openmrs-core/api/target/test-classes/org/openmrs/module/include/logic-0.2.omod (No such file or directory)
[ERROR] ModuleFileParserTest.parse_shouldParseValidLogicModuleFromFile:137 » Module Unable to get jar file Module: logic-0.2.omod
[ERROR] ModuleFileParserTest.parse_shouldParseValidXmlConfigCreatedFromInputStream:96 » FileNotFound /Users/2/ariho/Programming/Opensource%20Projects/openmrs-core/api/target/test-classes/org/openmrs/module/include/logic-0.2.omod (No such file or directory)
[ERROR] ModuleUtilTest.expandJar_shouldExpandDirectoryWithParentTreeIfNameIsDirectoryAndKeepFullPathIsTrue:681 » NoSuchFile /Users/2/ariho/Programming/Opensource%20Projects/openmrs-core/api/target/test-classes/org/openmrs/module/include/testJarExpand.omod
[ERROR] ModuleUtilTest.expandJar_shouldExpandDirectoryWithoutParentTreeIfNameIsDirectoryAndKeepFullPathIsFalse:702 » NoSuchFile /Users/2/ariho/Programming/Opensource%20Projects/openmrs-core/api/target/test-classes/org/openmrs/module/include/testJarExpand.omod
[ERROR] ModuleUtilTest.expandJar_shouldExpandEntireJarIfNameIsEmptyString:720 » NoSuchFile /Users/2/ariho/Programming/Opensource%20Projects/openmrs-core/api/target/test-classes/org/openmrs/module/include/testJarExpand.omod
[ERROR] ModuleUtilTest.expandJar_shouldExpandEntireJarIfNameIsNull:736 » NoSuchFile /Users/2/ariho/Programming/Opensource%20Projects/openmrs-core/api/target/test-classes/org/openmrs/module/include/testJarExpand.omod
[ERROR] ModuleUtilTest.expandJar_shouldExpandFileWithParentTreeIfNameIsFileAndKeepFullPathIsTrue:752 » NoSuchFile /Users/2/ariho/Programming/Opensource%20Projects/openmrs-core/api/target/test-classes/org/openmrs/module/include/testJarExpand.omod
[ERROR] ModuleUtilTest.getPackagesFromFile_shouldSkipOptionalFoldersIfJarFile:796 » FileNotFound Source '/Users/2/ariho/Programming/Opensource%20Projects/openmrs-core/api/target/test-classes/org/openmrs/module/include/test1-1.0-SNAPSHOT.omod' does not exist
[INFO]
[ERROR] Tests run: 4775, Failures: 2, Errors: 15, Skipped: 55
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for OpenMRS 2.8.0-SNAPSHOT:
[INFO]
[INFO] OpenMRS ............................................ SUCCESS [ 0.795 s]
[INFO] openmrs-tools ...................................... SUCCESS [ 0.176 s]
[INFO] openmrs-test ....................................... SUCCESS [ 0.044 s]
[INFO] openmrs-api ........................................ FAILURE [06:09 min]
[INFO] openmrs-web ........................................ SKIPPED
[INFO] openmrs-webapp ..................................... SKIPPED
[INFO] openmrs-liquibase .................................. SKIPPED
[INFO] openmrs-test-module ................................ SKIPPED
[INFO] openmrs-test-module-api ............................ SKIPPED
[INFO] openmrs-test-module-omod ........................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 06:14 min
[INFO] Finished at: 2025-06-18T11:07:35+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.5.3:test (default-test) on project openmrs-api: There are test failures.
[ERROR]
[ERROR] See /Users/2/ariho/Programming/Opensource Projects/openmrs-core/api/target/surefire-reports for the individual test results.
[ERROR] See dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :openmrs-api
arihoseth@Macbook ~/ariho/Programming/Opensource Projects/openmrs-core %
The entire Error log was to large to fit here though I coped the sections that failed and pasted them here I hope this helps.
We usually use https://pastebin.com/ for such pastings.
Is your fork / clone updated with the latest changes? on GitHub - openmrs/openmrs-core: OpenMRS API and web application code?
My fork is up-to-date with the main repo
The issue is likely caused by the space in the folder name Opensource Projects
. It’s better to rename it to remove the space, e.g., Opensource-Projects
, OpensourceProjects
, since spaces in paths can break tests and builds.
1 Like
Thanks for your help, that solved my problem
1 Like