Case report module

Hello,

I’m trying to work with the case based report : https://wiki.openmrs.org/display/docs/Case+Based+Reporting+Module

so i looked at this module but it didn’t work : https://github.com/openmrs/openmrs-module-casereport

so where can i find a functioning module ?

Hi @intidhar,

Did you read the full user guide section? You also need to give more details on what issue you are running into.

Hello,

In the module that i could find, i couldn’t build the omod file so i couldn’t use the module. That’s why i asked here if someone knows where i could find a functioning module.

Can you share the details of the error you get when you try to build the module? If you just want an omod, I can get one for you.

this is the error that i get :

You’re still cutting some logs, please share the entire details of the build

This is the whole detail:

openhie@openhie-OptiPlex-3020:~$ cd openmrs-module-casereport/ openhie@openhie-OptiPlex-3020:~/openmrs-module-casereport$ mvn clean install[INFO] Scanning for projects… [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] Case Report Module [INFO] Case Report Module API [INFO] Case Report Module OMOD [INFO]
[INFO] ------------------------------------------------------------------------ [INFO] Building Case Report Module 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ Downloading: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/apache/maven/plugins/maven-compiler-plugin/maven-metadata.xml Downloaded: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/apache/maven/plugins/maven-compiler-plugin/maven-metadata.xml (1021 B at 0.8 KB/sec) Downloading: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/apache/maven/plugins/maven-compiler-plugin/3.6.2/maven-compiler-plugin-3.6.2.pom Downloaded: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/apache/maven/plugins/maven-compiler-plugin/3.6.2/maven-compiler-plugin-3.6.2.pom (11 KB at 27.7 KB/sec) Downloading: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/apache/maven/plugins/maven-compiler-plugin/3.6.2/maven-compiler-plugin-3.6.2.jar Downloaded: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/apache/maven/plugins/maven-compiler-plugin/3.6.2/maven-compiler-plugin-3.6.2.jar (74 KB at 155.6 KB/sec) [INFO] [INFO] — maven-clean-plugin:2.5:clean (default-clean) @ casereport — [INFO] [INFO] — license-maven-plugin:2.6:check (default) @ casereport — [INFO] Checking licenses… [INFO] [INFO] — maven-install-plugin:2.4:install (default-install) @ casereport — [INFO] Installing /home/openhie/openmrs-module-casereport/pom.xml to /home/openhie/.m2/repository/org/openmrs/module/casereport/1.0-SNAPSHOT/casereport-1.0-SNAPSHOT.pom [INFO]
[INFO] ------------------------------------------------------------------------ [INFO] Building Case Report Module API 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] — maven-clean-plugin:2.5:clean (default-clean) @ casereport-api — [INFO] Deleting /home/openhie/openmrs-module-casereport/api/target [INFO] [INFO] — maven-resources-plugin:2.6:resources (default-resources) @ casereport-api — [INFO] Using ‘UTF-8’ encoding to copy filtered resources. [INFO] Copying 16 resources [INFO] [INFO] — maven-compiler-plugin:3.1:compile (default-compile) @ casereport-api — [INFO] Changes detected - recompiling the module! [INFO] Compiling 21 source files to /home/openhie/openmrs-module-casereport/api/target/classes [WARNING] /home/openhie/openmrs-module-casereport/api/src/main/java/org/openmrs/module/casereport/api/db/hibernate/HibernateCaseReportDAO.java: /home/openhie/openmrs-module-casereport/api/src/main/java/org/openmrs/module/casereport/api/db/hibernate/HibernateCaseReportDAO.java uses unchecked or unsafe operations. [WARNING] /home/openhie/openmrs-module-casereport/api/src/main/java/org/openmrs/module/casereport/api/db/hibernate/HibernateCaseReportDAO.java: Recompile with -Xlint:unchecked for details. [INFO] [INFO] — maven-resources-plugin:2.6:testResources (default-testResources) @ casereport-api — [INFO] Using ‘UTF-8’ encoding to copy filtered resources. [INFO] Copying 13 resources [INFO] [INFO] — maven-compiler-plugin:3.1:testCompile (default-testCompile) @ casereport-api — [INFO] Changes detected - recompiling the module! [INFO] Compiling 8 source files to /home/openhie/openmrs-module-casereport/api/target/test-classes [WARNING] /home/openhie/openmrs-module-casereport/api/src/test/java/org/openmrs/module/casereport/CaseReportFormTest.java: Some input files use or override a deprecated API. [WARNING] /home/openhie/openmrs-module-casereport/api/src/test/java/org/openmrs/module/casereport/CaseReportFormTest.java: Recompile with -Xlint:deprecation for details. [INFO] [INFO] — maven-surefire-plugin:2.12.4:test (default-test) @ casereport-api — [INFO] Surefire report directory: /home/openhie/openmrs-module-casereport/api/target/surefire-reports


T E S T S

Running org.openmrs.module.casereport.CaseReportActivatorTest INFO - CaseReportActivator.loadQueries(65) |2017-07-31 09:59:48,690| Loading queries… INFO - CaseReportActivator.loadQueries(65) |2017-07-31 09:59:49,134| Loading queries… INFO - CaseReportActivator.loadQueries(65) |2017-07-31 09:59:49,461| Loading queries… INFO - CaseReportActivator.addSchedulerTaskIfNecessary(133) |2017-07-31 09:59:49,532| Creating Case Reports Task for: HIV Patient Died WARN - HibernateSchedulerDAO.getTaskByName(96) |2017-07-31 09:59:49,541| Task ‘HIV Patient Died’ not found WARN - TimerSchedulerServiceImpl.getTaskByName(393) |2017-07-31 09:59:49,543| getTaskByName(HIV Patient Died) failed, because: org.springframework.orm.ObjectRetrievalFailureException: Object of class [org.openmrs.scheduler.TaskDefinition] with identifier [HIV Patient Died]: not found INFO - CaseReportActivator.addSchedulerTaskIfNecessary(133) |2017-07-31 09:59:49,597| Creating Case Reports Task for: HIV Switched To Second Line WARN - HibernateSchedulerDAO.getTaskByName(96) |2017-07-31 09:59:49,601| Task ‘HIV Switched To Second Line’ not found WARN - TimerSchedulerServiceImpl.getTaskByName(393) |2017-07-31 09:59:49,602| getTaskByName(HIV Switched To Second Line) failed, because: org.springframework.orm.ObjectRetrievalFailureException: Object of class [org.openmrs.scheduler.TaskDefinition] with identifier [HIV Switched To Second Line]: not found INFO - CaseReportActivator.contextRefreshed(61) |2017-07-31 09:59:49,605| Case Report Module refreshed INFO - CaseReportActivator.loadQueries(65) |2017-07-31 09:59:49,656| Loading queries… INFO - CaseReportActivator.loadQueries(65) |2017-07-31 09:59:49,731| Loading queries… INFO - CaseReportActivator.addSchedulerTaskIfNecessary(133) |2017-07-31 09:59:49,747| Creating Case Reports Task for: HIV Patient Died WARN - HibernateSchedulerDAO.getTaskByName(96) |2017-07-31 09:59:49,749| Task ‘HIV Patient Died’ not found WARN - TimerSchedulerServiceImpl.getTaskByName(393) |2017-07-31 09:59:49,750| getTaskByName(HIV Patient Died) failed, because: org.springframework.orm.ObjectRetrievalFailureException: Object of class [org.openmrs.scheduler.TaskDefinition] with identifier [HIV Patient Died]: not found INFO - CaseReportActivator.contextRefreshed(61) |2017-07-31 09:59:49,760| Case Report Module refreshed INFO - CaseReportActivator.loadQueries(65) |2017-07-31 09:59:49,807| Loading queries… INFO - CaseReportActivator.loadQueries(65) |2017-07-31 09:59:49,831| Loading queries… WARN - HibernateSchedulerDAO.getTaskByName(96) |2017-07-31 09:59:49,851| Task ‘HIV Patient Died’ not found WARN - TimerSchedulerServiceImpl.getTaskByName(393) |2017-07-31 09:59:49,853| getTaskByName(HIV Patient Died) failed, because: org.springframework.orm.ObjectRetrievalFailureException: Object of class [org.openmrs.scheduler.TaskDefinition] with identifier [HIV Patient Died]: not found WARN - HibernateSchedulerDAO.getTaskByName(96) |2017-07-31 09:59:49,855| Task ‘HIV Switched To Second Line’ not found WARN - TimerSchedulerServiceImpl.getTaskByName(393) |2017-07-31 09:59:49,856| getTaskByName(HIV Switched To Second Line) failed, because: org.springframework.orm.ObjectRetrievalFailureException: Object of class [org.openmrs.scheduler.TaskDefinition] with identifier [HIV Switched To Second Line]: not found INFO - CaseReportActivator.loadQueries(65) |2017-07-31 09:59:49,920| Loading queries… INFO - CaseReportActivator.addSchedulerTaskIfNecessary(133) |2017-07-31 09:59:49,930| Creating Case Reports Task for: HIV Patient Died WARN - HibernateSchedulerDAO.getTaskByName(96) |2017-07-31 09:59:49,933| Task ‘HIV Patient Died’ not found WARN - TimerSchedulerServiceImpl.getTaskByName(393) |2017-07-31 09:59:49,933| getTaskByName(HIV Patient Died) failed, because: org.springframework.orm.ObjectRetrievalFailureException: Object of class [org.openmrs.scheduler.TaskDefinition] with identifier [HIV Patient Died]: not found INFO - CaseReportActivator.addSchedulerTaskIfNecessary(133) |2017-07-31 09:59:49,958| Creating Case Reports Task for: HIV Switched To Second Line WARN - HibernateSchedulerDAO.getTaskByName(96) |2017-07-31 09:59:49,960| Task ‘HIV Switched To Second Line’ not found WARN - TimerSchedulerServiceImpl.getTaskByName(393) |2017-07-31 09:59:49,961| getTaskByName(HIV Switched To Second Line) failed, because: org.springframework.orm.ObjectRetrievalFailureException: Object of class [org.openmrs.scheduler.TaskDefinition] with identifier [HIV Switched To Second Line]: not found INFO - CaseReportActivator.contextRefreshed(61) |2017-07-31 09:59:49,963| Case Report Module refreshed INFO - CaseReportActivator.loadQueries(65) |2017-07-31 09:59:50,002| Loading queries… INFO - CaseReportActivator.loadQueries(65) |2017-07-31 09:59:50,100| Loading queries… INFO - CaseReportActivator.addSchedulerTaskIfNecessary(133) |2017-07-31 09:59:50,110| Creating Case Reports Task for: HIV Patient Died WARN - HibernateSchedulerDAO.getTaskByName(96) |2017-07-31 09:59:50,113| Task ‘HIV Patient Died’ not found WARN - TimerSchedulerServiceImpl.getTaskByName(393) |2017-07-31 09:59:50,113| getTaskByName(HIV Patient Died) failed, because: org.springframework.orm.ObjectRetrievalFailureException: Object of class [org.openmrs.scheduler.TaskDefinition] with identifier [HIV Patient Died]: not found INFO - CaseReportActivator.addSchedulerTaskIfNecessary(133) |2017-07-31 09:59:50,124| Creating Case Reports Task for: HIV Switched To Second Line WARN - HibernateSchedulerDAO.getTaskByName(96) |2017-07-31 09:59:50,126| Task ‘HIV Switched To Second Line’ not found WARN - TimerSchedulerServiceImpl.getTaskByName(393) |2017-07-31 09:59:50,126| getTaskByName(HIV Switched To Second Line) failed, because: org.springframework.orm.ObjectRetrievalFailureException: Object of class [org.openmrs.scheduler.TaskDefinition] with identifier [HIV Switched To Second Line]: not found INFO - CaseReportActivator.contextRefreshed(61) |2017-07-31 09:59:50,128| Case Report Module refreshed Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 14.117 sec Running org.openmrs.module.casereport.CaseReportFormTest Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.359 sec <<< FAILURE! shouldGenerateTheReportFormForTheSpecifiedPatient(org.openmrs.module.casereport.CaseReportFormTest) Time elapsed: 0.357 sec <<< FAILURE! junit.framework.ComparisonFailure: expected:<…5-04-08T00:00:00.000[-05]00> but was:<…5-04-08T00:00:00.000[+01]00> at junit.framework.Assert.assertEquals(Assert.java:100) at junit.framework.Assert.assertEquals(Assert.java:107) at org.openmrs.module.casereport.CaseReportFormTest.shouldGenerateTheReportFormForTheSpecifiedPatient(CaseReportFormTest.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83) at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:88) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

Running org.openmrs.module.casereport.CaseReportTriggerValidatorTest Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.263 sec Running org.openmrs.module.casereport.api.CaseReportServiceTest Tests run: 37, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.139 sec Running org.openmrs.module.casereport.CaseReportUtilTest WARN - OpenmrsUtil.getDirectoryInApplicationDataDirectory(1346) |2017-07-31 09:59:54,314| ‘/tmp/appdir-for-unit-tests-2005236051826350011/REPORT_RESULTS’ doesn’t exist. Creating directories now. WARN - OpenmrsUtil.getDirectoryInApplicationDataDirectory(1346) |2017-07-31 09:59:54,489| ‘/tmp/appdir-for-unit-tests-6929391266723653260/REPORT_RESULTS’ doesn’t exist. Creating directories now. WARN - OpenmrsUtil.getDirectoryInApplicationDataDirectory(1346) |2017-07-31 09:59:54,891| ‘/tmp/appdir-for-unit-tests-1827761830267331115/REPORT_RESULTS’ doesn’t exist. Creating directories now. WARN - CaseReportUtil.getSqlCohortDefinition(251) |2017-07-31 09:59:54,990| Cannot find a Sql Cohort Query with name:some name that doesn’t exist WARN - OpenmrsUtil.getDirectoryInApplicationDataDirectory(1346) |2017-07-31 09:59:55,044| ‘/tmp/appdir-for-unit-tests-2471641536046737817/REPORT_RESULTS’ doesn’t exist. Creating directories now. DEBUG - CaseReportUtil.executeTask(353) |2017-07-31 09:59:55,048| Patient#2 already has an item in the queue with the trigger HIV Switched To Second Line WARN - CaseReportUtil.getSqlCohortDefinition(251) |2017-07-31 09:59:55,146| Cannot find a Sql Cohort Query with name:some name that does not exist WARN - OpenmrsUtil.getDirectoryInApplicationDataDirectory(1346) |2017-07-31 09:59:55,172| ‘/tmp/appdir-for-unit-tests-6249473532527874592/REPORT_RESULTS’ doesn’t exist. Creating directories now. WARN - CaseReportUtil.getSqlCohortDefinition(251) |2017-07-31 09:59:55,235| some retired cohort query is a retired Sql Cohort Query WARN - OpenmrsUtil.getDirectoryInApplicationDataDirectory(1346) |2017-07-31 09:59:55,330| ‘/tmp/appdir-for-unit-tests-6802738375868180891/REPORT_RESULTS’ doesn’t exist. Creating directories now. Tests run: 19, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.463 sec Running org.openmrs.module.casereport.CaseReportValidatorTest Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.116 sec ERROR - SchemaExport.execute(287) |2017-07-31 09:59:55,666| schema export unsuccessful org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add “;DB_CLOSE_ON_EXIT=FALSE” to the db URL) [90121-187] at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) at org.h2.message.DbException.get(DbException.java:179) at org.h2.message.DbException.get(DbException.java:155) at org.h2.message.DbException.get(DbException.java:144) at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1469) at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1444) at org.h2.jdbc.JdbcConnection.getAutoCommit(JdbcConnection.java:447) at com.mchange.v2.c3p0.impl.NewProxyConnection.getAutoCommit(NewProxyConnection.java:985) at org.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:82) at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:51) at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:263) at org.hibernate.tool.hbm2ddl.SchemaExport.drop(SchemaExport.java:229) at org.hibernate.impl.SessionFactoryImpl.close(SessionFactoryImpl.java:961) at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.destroy(AbstractSessionFactoryBean.java:228) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.destroy(LocalSessionFactoryBean.java:902) at org.openmrs.api.db.hibernate.HibernateSessionFactoryBean.destroy(HibernateSessionFactoryBean.java:206) at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:238) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:510) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:486) at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:742) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:455) at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1090) at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1064) at org.springframework.context.support.AbstractApplicationContext$1.run(AbstractApplicationContext.java:980)

Results :

Failed tests: shouldGenerateTheReportFormForTheSpecifiedPatient(org.openmrs.module.casereport.CaseReportFormTest): expected:<…5-04-08T00:00:00.000[-05]00> but was:<…5-04-08T00:00:00.000[+01]00>

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

[INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] Case Report Module … SUCCESS [ 5.572 s] [INFO] Case Report Module API … FAILURE [ 26.848 s] [INFO] Case Report Module OMOD … SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 35.068 s [INFO] Finished at: 2017-07-31T09:59:55+02:00 [INFO] Final Memory: 32M/171M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project casereport-api: There are test failures. [ERROR] [ERROR] Please refer to /home/openhie/openmrs-module-casereport/api/target/surefire-reports for the individual test results. [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 -rf :casereport-api

There were some tests that were timezone sensitive, I have fixed them and the build should work for you after pulling the updates, thanks for reporting the issue.

Hello, so what do i do now ? try the same module or can you give me the link to the new module.

As I mentioned in my previous comment, you need to pull the latest changes from this repo which is where you cloned the module’s code and then you can try the build again.

I did as you said but still got this error :

Trying to override old definition of task javac

clean: [delete] Deleting directory /home/narsil/Téléchargements/OpenElis-master/openelis/target

init: [mkdir] Created dir: /home/narsil/Téléchargements/OpenElis-master/openelis/target

java.compile: [javac] Compiling 1581 source files to /home/narsil/Téléchargements/OpenElis-master/openelis/target [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.7 [javac] Note: Some input files use or override a deprecated API. [javac] Note: Recompile with -Xlint:deprecation for details. [javac] Note: Some input files use unchecked or unsafe operations. [javac] Note: Recompile with -Xlint:unchecked for details. [javac] 1 warning [copy] Copying 137 files to /home/narsil/Téléchargements/OpenElis-master/openelis/target

jasper.compile: [jrc] Compiling 34 report design files. [jrc] log4j:ERROR setFile(null,true) call failed. [jrc] java.io.FileNotFoundException: /logs/openelis.log (Aucun fichier ou dossier de ce type) [jrc] at java.io.FileOutputStream.open0(Native Method) [jrc] at java.io.FileOutputStream.open(FileOutputStream.java:270) [jrc] at java.io.FileOutputStream.(FileOutputStream.java:213) [jrc] at java.io.FileOutputStream.(FileOutputStream.java:133) [jrc] at org.apache.log4j.FileAppender.setFile(FileAppender.java:290) [jrc] at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:194) [jrc] at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:164) [jrc] at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:257) [jrc] at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:285) [jrc] at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:171) [jrc] at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:184) [jrc] at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:502) [jrc] at org.apache.log4j.xml.DOMConfigurator.parseRoot(DOMConfigurator.java:471) [jrc] at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:921) [jrc] at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:790) [jrc] at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:696) [jrc] at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:471) [jrc] at org.apache.log4j.LogManager.(LogManager.java:125) [jrc] at org.apache.log4j.Logger.getLogger(Logger.java:105) [jrc] at org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:229) [jrc] at org.apache.commons.logging.impl.Log4JLogger.(Log4JLogger.java:65) [jrc] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [jrc] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [jrc] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [jrc] at java.lang.reflect.Constructor.newInstance(Constructor.java:423) [jrc] at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529) [jrc] at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235) [jrc] at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209) [jrc] at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351) [jrc] at net.sf.jasperreports.engine.xml.JRXmlDigesterFactory.(JRXmlDigesterFactory.java:179) [jrc] at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:205) [jrc] at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:170) [jrc] at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:154) [jrc] at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:111) [jrc] at net.sf.jasperreports.ant.JRAntCompileTask.compile(JRAntCompileTask.java:411) [jrc] at net.sf.jasperreports.ant.JRAntCompileTask.execute(JRAntCompileTask.java:254) [jrc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292) [jrc] at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) [jrc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [jrc] at java.lang.reflect.Method.invoke(Method.java:498) [jrc] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [jrc] at org.apache.tools.ant.Task.perform(Task.java:348) [jrc] at org.apache.tools.ant.Target.execute(Target.java:435) [jrc] at org.apache.tools.ant.Target.performTasks(Target.java:456) [jrc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393) [jrc] at org.apache.tools.ant.Project.executeTarget(Project.java:1364) [jrc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) [jrc] at org.apache.tools.ant.Project.executeTargets(Project.java:1248) [jrc] at org.apache.tools.ant.Main.runBuild(Main.java:851) [jrc] at org.apache.tools.ant.Main.startAnt(Main.java:235) [jrc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) [jrc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) [jrc] File : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/specimen_list.jrxml … OK. [jrc] File : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/ReferredOutBySite.jrxml … OK. [jrc] File : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/SampleLabel.jrxml … OK. [jrc] File : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/RetroCI_Patient_EID_Version2.jrxml … OK. [jrc] File : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/RetroCI_Patient_EID_info.jrxml … OK. [jrc] File : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/Patient_Indeterminate_Version2.jrxml … OK. [jrc] File : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/RetroCI_backlog.jrxml … FAILED. [jrc] Error compiling report design : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/RetroCI_backlog.jrxml [jrc] net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file: [jrc] 1. The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files [jrc] /* [jrc] ^ [jrc] 1 errors [jrc] [jrc] at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:191) [jrc] at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:215) [jrc] at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:131) [jrc] at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:113) [jrc] at net.sf.jasperreports.ant.JRAntCompileTask.compile(JRAntCompileTask.java:411) [jrc] at net.sf.jasperreports.ant.JRAntCompileTask.execute(JRAntCompileTask.java:254) [jrc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292) [jrc] at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) [jrc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [jrc] at java.lang.reflect.Method.invoke(Method.java:498) [jrc] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [jrc] at org.apache.tools.ant.Task.perform(Task.java:348) [jrc] at org.apache.tools.ant.Target.execute(Target.java:435) [jrc] at org.apache.tools.ant.Target.performTasks(Target.java:456) [jrc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393) [jrc] at org.apache.tools.ant.Project.executeTarget(Project.java:1364) [jrc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) [jrc] at org.apache.tools.ant.Project.executeTargets(Project.java:1248) [jrc] at org.apache.tools.ant.Main.runBuild(Main.java:851) [jrc] at org.apache.tools.ant.Main.startAnt(Main.java:235) [jrc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) [jrc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) [jrc] File : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/Workplan_Serology.jrxml … OK. [jrc] File : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/Patient_ARV_Followup_patient_info.jrxml … OK. [jrc] File : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/WorkplanByTest.jrxml … OK. [jrc] File : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/PatientReportCILNSP.jrxml … OK. [jrc] File : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/Patient_Indeterminate_ByLocation.jrxml … OK. [jrc] File : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/Workplan_BioChem.jrxml … OK. [jrc] File : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/RetroCI_Patient_EID_info_Version2.jrxml … OK. [jrc] File : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/Workplan_Default.jrxml … OK. [jrc] File : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/WorkplanByTestSection.jrxml … OK. [jrc] File : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/RetroCIHeader.jrxml … OK. [jrc] File : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/NonConformityByGroupCategory.jrxml … OK. [jrc] File : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/Patient_ARV_Version1.jrxml … OK. [jrc] File : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/NonConformityByReceivedDate.jrxml … OK. [jrc] File : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/PatientReportHaitiClinical.jrxml … OK. [jrc] File : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/ConfirmationSummary.jrxml … FAILED. [jrc] Error compiling report design : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/ConfirmationSummary.jrxml [jrc] net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file: [jrc] 1. The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files [jrc] /* [jrc] ^ [jrc] 1 errors [jrc] [jrc] at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:191) [jrc] at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:215) [jrc] at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:131) [jrc] at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:113) [jrc] at net.sf.jasperreports.ant.JRAntCompileTask.compile(JRAntCompileTask.java:411) [jrc] at net.sf.jasperreports.ant.JRAntCompileTask.execute(JRAntCompileTask.java:254) [jrc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292) [jrc] at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) [jrc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [jrc] at java.lang.reflect.Method.invoke(Method.java:498) [jrc] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [jrc] at org.apache.tools.ant.Task.perform(Task.java:348) [jrc] at org.apache.tools.ant.Target.execute(Target.java:435) [jrc] at org.apache.tools.ant.Target.performTasks(Target.java:456) [jrc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393) [jrc] at org.apache.tools.ant.Project.executeTarget(Project.java:1364) [jrc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) [jrc] at org.apache.tools.ant.Project.executeTargets(Project.java:1248) [jrc] at org.apache.tools.ant.Main.runBuild(Main.java:851) [jrc] at org.apache.tools.ant.Main.startAnt(Main.java:235) [jrc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) [jrc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) [jrc] File : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/RetroCI_Patient_EID.jrxml … OK. [jrc] File : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/NonConformityNotification.jrxml … OK. [jrc] File : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/RetroCI_FollowupRequired_ByLocation.jrxml … OK. [jrc] File : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/HaitiLabAggregate.jrxml … OK. [jrc] File : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/ElisaWorkplan.jrxml … OK. [jrc] File : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/CILNSPHeader.jrxml … OK. [jrc] File : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/HaitiNoticeOfReportError.jrxml … OK. [jrc] File : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/Patient_ARV_Version2.jrxml … OK. [jrc] File : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/HaitiHeader.jrxml … OK. [jrc] File : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/NoticeOfReportError.jrxml … OK. [jrc] File : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/Patient_Indeterminate_Version1.jrxml … OK. [jrc] File : /home/narsil/Téléchargements/OpenElis-master/openelis/WebContent/WEB-INF/reports/HaitiHIVSummary.jrxml … OK.

BUILD FAILED /home/narsil/Téléchargements/OpenElis-master/build.xml:74: Errors were encountered when compiling report designs.

Total time: 7 seconds narsil@narsil-OptiPlex-3020:~/Téléchargements/OpenElis-master$ cd narsil@narsil-OptiPlex-3020:~$ ls Bureau Documents Modèles openempi­-2.2.9-­openempi.zip.1 ­-p Vidéos default.json.1 examples.desktop Musique openhim-core.conf~ Public default.json.2 Images openempi­-2.2.9-­openempi.zip openmrs-module-casereport Téléchargements narsil@narsil-OptiPlex-3020:~$ cd openmrs-module-casereport/ narsil@narsil-OptiPlex-3020:~/openmrs-module-casereport$ mvn clean install [INFO] Scanning for projects… [INFO] Reactor build order: [INFO] Case Report Module [INFO] Case Report Module API [INFO] Case Report Module OMOD [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Error building POM (may not be this project’s POM).

Project ID: org.openmrs.maven.plugins:maven-openmrs-plugin POM Location: /home/narsil/.m2/repository/org/openmrs/maven/plugins/maven-openmrs-plugin/1.0.1/maven-openmrs-plugin-1.0.1.pom

Reason: Not a v4.0.0 POM. for project org.openmrs.maven.plugins:maven-openmrs-plugin at /home/narsil/.m2/repository/org/openmrs/maven/plugins/maven-openmrs-plugin/1.0.1/maven-openmrs-plugin-1.0.1.pom

[INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: < 1 second [INFO] Finished at: Thu Aug 03 09:52:19 CET 2017 [INFO] Final Memory: 5M/119M [INFO] ------------------------------------------------------------------------

I’m not exactly sure I know what you’re doing, I see logs to do with OpenElis-master and wondering what’s going on. Are you building it with Java 7 by the way?

Hello thank you for your reply. I’m sorry that error was a mistake. I’m building it with Java 8 and Maven 2 and this is the real error :

openhie@openhie-OptiPlex-3020:~/openmrs-module-casereport$ mvn clean package [INFO] Scanning for projects… [INFO] Reactor build order: [INFO] Case Report Module [INFO] Case Report Module API [INFO] Case Report Module OMOD [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Error building POM (may not be this project’s POM).

Project ID: org.openmrs.maven.plugins:maven-openmrs-plugin POM Location: /home/openhie/.m2/repository/org/openmrs/maven/plugins/maven-openmrs-plugin/1.0.1/maven-openmrs-plugin-1.0.1.pom

Reason: Not a v4.0.0 POM. for project org.openmrs.maven.plugins:maven-openmrs-plugin at /home/openhie/.m2/repository/org/openmrs/maven/plugins/maven-openmrs-plugin/1.0.1/maven-openmrs-plugin-1.0.1.pom

[INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: < 1 second [INFO] Finished at: Fri Aug 04 10:17:43 CET 2017 [INFO] Final Memory: 5M/119M [INFO] ------------------------------------------------------------------------ openhie@openhie-OptiPlex-3020:~/openmrs-module-casereport$

The recommended version to build it is Java 7, I would assume Java 8 should be fine. I think the real issue has to do with the maven version, from my my past experiences there is some version compatibility issues between Java 7+ and maven, I think may you need to upgrade maven to 3.2.x.

i retried with maven 3.2.5 and got this error:

openhie@openhie-OptiPlex-3020:~/Downloads/openmrs-module-casereport-master$ sudo mvn clean install [sudo] password for openhie: [INFO] Scanning for projects… [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] Case Report Module [INFO] Case Report Module API [INFO] Case Report Module OMOD [INFO]
[INFO] ------------------------------------------------------------------------ [INFO] Building Case Report Module 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ Downloading: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/apache/maven/plugins/maven-compiler-plugin/maven-metadata.xml Downloaded: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/apache/maven/plugins/maven-compiler-plugin/maven-metadata.xml (1021 B at 0.9 KB/sec) [INFO] [INFO] — maven-clean-plugin:2.5:clean (default-clean) @ casereport — [INFO] [INFO] — license-maven-plugin:2.6:check (default) @ casereport — [INFO] Checking licenses… [INFO] [INFO] — maven-install-plugin:2.4:install (default-install) @ casereport — [INFO] Installing /home/openhie/Downloads/openmrs-module-casereport-master/pom.xml to /root/.m2/repository/org/openmrs/module/casereport/1.0-SNAPSHOT/casereport-1.0-SNAPSHOT.pom [INFO]
[INFO] ------------------------------------------------------------------------ [INFO] Building Case Report Module API 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] — maven-clean-plugin:2.5:clean (default-clean) @ casereport-api — [INFO] Deleting /home/openhie/Downloads/openmrs-module-casereport-master/api/target [INFO] [INFO] — maven-resources-plugin:2.6:resources (default-resources) @ casereport-api — [INFO] Using ‘UTF-8’ encoding to copy filtered resources. [INFO] Copying 16 resources [INFO] [INFO] — maven-compiler-plugin:3.1:compile (default-compile) @ casereport-api — [INFO] Changes detected - recompiling the module! [INFO] Compiling 21 source files to /home/openhie/Downloads/openmrs-module-casereport-master/api/target/classes [WARNING] /home/openhie/Downloads/openmrs-module-casereport-master/api/src/main/java/org/openmrs/module/casereport/api/db/hibernate/HibernateCaseReportDAO.java: /home/openhie/Downloads/openmrs-module-casereport-master/api/src/main/java/org/openmrs/module/casereport/api/db/hibernate/HibernateCaseReportDAO.java uses unchecked or unsafe operations. [WARNING] /home/openhie/Downloads/openmrs-module-casereport-master/api/src/main/java/org/openmrs/module/casereport/api/db/hibernate/HibernateCaseReportDAO.java: Recompile with -Xlint:unchecked for details. [INFO] [INFO] — maven-resources-plugin:2.6:testResources (default-testResources) @ casereport-api — [INFO] Using ‘UTF-8’ encoding to copy filtered resources. [INFO] Copying 13 resources [INFO] [INFO] — maven-compiler-plugin:3.1:testCompile (default-testCompile) @ casereport-api — [INFO] Changes detected - recompiling the module! [INFO] Compiling 8 source files to /home/openhie/Downloads/openmrs-module-casereport-master/api/target/test-classes [WARNING] /home/openhie/Downloads/openmrs-module-casereport-master/api/src/test/java/org/openmrs/module/casereport/CaseReportUtilTest.java: Some input files use or override a deprecated API. [WARNING] /home/openhie/Downloads/openmrs-module-casereport-master/api/src/test/java/org/openmrs/module/casereport/CaseReportUtilTest.java: Recompile with -Xlint:deprecation for details. [INFO] [INFO] — maven-surefire-plugin:2.12.4:test (default-test) @ casereport-api — [INFO] Surefire report directory: /home/openhie/Downloads/openmrs-module-casereport-master/api/target/surefire-reports


T E S T S

Running org.openmrs.module.casereport.api.CaseReportServiceTest Tests run: 37, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 11.594 sec Running org.openmrs.module.casereport.CaseReportValidatorTest Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.116 sec Running org.openmrs.module.casereport.CaseReportTriggerValidatorTest Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.137 sec Running org.openmrs.module.casereport.CaseReportActivatorTest INFO - CaseReportActivator.loadQueries(65) |2017-08-09 09:36:08,306| Loading queries… INFO - CaseReportActivator.loadQueries(65) |2017-08-09 09:36:08,357| Loading queries… INFO - CaseReportActivator.loadQueries(65) |2017-08-09 09:36:08,500| Loading queries… INFO - CaseReportActivator.addSchedulerTaskIfNecessary(133) |2017-08-09 09:36:08,510| Creating Case Reports Task for: HIV Patient Died WARN - HibernateSchedulerDAO.getTaskByName(96) |2017-08-09 09:36:08,541| Task ‘HIV Patient Died’ not found WARN - TimerSchedulerServiceImpl.getTaskByName(393) |2017-08-09 09:36:08,543| getTaskByName(HIV Patient Died) failed, because: org.springframework.orm.ObjectRetrievalFailureException: Object of class [org.openmrs.scheduler.TaskDefinition] with identifier [HIV Patient Died]: not found INFO - CaseReportActivator.addSchedulerTaskIfNecessary(133) |2017-08-09 09:36:08,559| Creating Case Reports Task for: HIV Switched To Second Line WARN - HibernateSchedulerDAO.getTaskByName(96) |2017-08-09 09:36:08,563| Task ‘HIV Switched To Second Line’ not found WARN - TimerSchedulerServiceImpl.getTaskByName(393) |2017-08-09 09:36:08,565| getTaskByName(HIV Switched To Second Line) failed, because: org.springframework.orm.ObjectRetrievalFailureException: Object of class [org.openmrs.scheduler.TaskDefinition] with identifier [HIV Switched To Second Line]: not found INFO - CaseReportActivator.contextRefreshed(61) |2017-08-09 09:36:08,567| Case Report Module refreshed INFO - CaseReportActivator.loadQueries(65) |2017-08-09 09:36:08,585| Loading queries… INFO - CaseReportActivator.loadQueries(65) |2017-08-09 09:36:08,635| Loading queries… INFO - CaseReportActivator.addSchedulerTaskIfNecessary(133) |2017-08-09 09:36:08,642| Creating Case Reports Task for: HIV Patient Died WARN - HibernateSchedulerDAO.getTaskByName(96) |2017-08-09 09:36:08,644| Task ‘HIV Patient Died’ not found WARN - TimerSchedulerServiceImpl.getTaskByName(393) |2017-08-09 09:36:08,644| getTaskByName(HIV Patient Died) failed, because: org.springframework.orm.ObjectRetrievalFailureException: Object of class [org.openmrs.scheduler.TaskDefinition] with identifier [HIV Patient Died]: not found INFO - CaseReportActivator.contextRefreshed(61) |2017-08-09 09:36:08,653| Case Report Module refreshed INFO - CaseReportActivator.loadQueries(65) |2017-08-09 09:36:08,702| Loading queries… INFO - CaseReportActivator.loadQueries(65) |2017-08-09 09:36:08,710| Loading queries… WARN - HibernateSchedulerDAO.getTaskByName(96) |2017-08-09 09:36:08,720| Task ‘HIV Patient Died’ not found WARN - TimerSchedulerServiceImpl.getTaskByName(393) |2017-08-09 09:36:08,720| getTaskByName(HIV Patient Died) failed, because: org.springframework.orm.ObjectRetrievalFailureException: Object of class [org.openmrs.scheduler.TaskDefinition] with identifier [HIV Patient Died]: not found WARN - HibernateSchedulerDAO.getTaskByName(96) |2017-08-09 09:36:08,721| Task ‘HIV Switched To Second Line’ not found WARN - TimerSchedulerServiceImpl.getTaskByName(393) |2017-08-09 09:36:08,722| getTaskByName(HIV Switched To Second Line) failed, because: org.springframework.orm.ObjectRetrievalFailureException: Object of class [org.openmrs.scheduler.TaskDefinition] with identifier [HIV Switched To Second Line]: not found INFO - CaseReportActivator.loadQueries(65) |2017-08-09 09:36:08,757| Loading queries… INFO - CaseReportActivator.addSchedulerTaskIfNecessary(133) |2017-08-09 09:36:08,763| Creating Case Reports Task for: HIV Patient Died WARN - HibernateSchedulerDAO.getTaskByName(96) |2017-08-09 09:36:08,766| Task ‘HIV Patient Died’ not found WARN - TimerSchedulerServiceImpl.getTaskByName(393) |2017-08-09 09:36:08,766| getTaskByName(HIV Patient Died) failed, because: org.springframework.orm.ObjectRetrievalFailureException: Object of class [org.openmrs.scheduler.TaskDefinition] with identifier [HIV Patient Died]: not found INFO - CaseReportActivator.addSchedulerTaskIfNecessary(133) |2017-08-09 09:36:08,773| Creating Case Reports Task for: HIV Switched To Second Line WARN - HibernateSchedulerDAO.getTaskByName(96) |2017-08-09 09:36:08,774| Task ‘HIV Switched To Second Line’ not found WARN - TimerSchedulerServiceImpl.getTaskByName(393) |2017-08-09 09:36:08,775| getTaskByName(HIV Switched To Second Line) failed, because: org.springframework.orm.ObjectRetrievalFailureException: Object of class [org.openmrs.scheduler.TaskDefinition] with identifier [HIV Switched To Second Line]: not found INFO - CaseReportActivator.contextRefreshed(61) |2017-08-09 09:36:08,777| Case Report Module refreshed INFO - CaseReportActivator.loadQueries(65) |2017-08-09 09:36:08,784| Loading queries… INFO - CaseReportActivator.loadQueries(65) |2017-08-09 09:36:08,830| Loading queries… INFO - CaseReportActivator.addSchedulerTaskIfNecessary(133) |2017-08-09 09:36:08,835| Creating Case Reports Task for: HIV Patient Died WARN - HibernateSchedulerDAO.getTaskByName(96) |2017-08-09 09:36:08,836| Task ‘HIV Patient Died’ not found WARN - TimerSchedulerServiceImpl.getTaskByName(393) |2017-08-09 09:36:08,837| getTaskByName(HIV Patient Died) failed, because: org.springframework.orm.ObjectRetrievalFailureException: Object of class [org.openmrs.scheduler.TaskDefinition] with identifier [HIV Patient Died]: not found INFO - CaseReportActivator.addSchedulerTaskIfNecessary(133) |2017-08-09 09:36:08,845| Creating Case Reports Task for: HIV Switched To Second Line WARN - HibernateSchedulerDAO.getTaskByName(96) |2017-08-09 09:36:08,847| Task ‘HIV Switched To Second Line’ not found WARN - TimerSchedulerServiceImpl.getTaskByName(393) |2017-08-09 09:36:08,847| getTaskByName(HIV Switched To Second Line) failed, because: org.springframework.orm.ObjectRetrievalFailureException: Object of class [org.openmrs.scheduler.TaskDefinition] with identifier [HIV Switched To Second Line]: not found INFO - CaseReportActivator.contextRefreshed(61) |2017-08-09 09:36:08,849| Case Report Module refreshed Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.6 sec Running org.openmrs.module.casereport.CaseReportUtilTest WARN - OpenmrsUtil.getDirectoryInApplicationDataDirectory(1346) |2017-08-09 09:36:09,090| ‘/tmp/appdir-for-unit-tests-4226387009933283023/REPORT_RESULTS’ doesn’t exist. Creating directories now. WARN - OpenmrsUtil.getDirectoryInApplicationDataDirectory(1346) |2017-08-09 09:36:09,198| ‘/tmp/appdir-for-unit-tests-3280818113014999157/REPORT_RESULTS’ doesn’t exist. Creating directories now. WARN - OpenmrsUtil.getDirectoryInApplicationDataDirectory(1346) |2017-08-09 09:36:09,465| ‘/tmp/appdir-for-unit-tests-6063879352877438233/REPORT_RESULTS’ doesn’t exist. Creating directories now. WARN - CaseReportUtil.getSqlCohortDefinition(251) |2017-08-09 09:36:09,544| Cannot find a Sql Cohort Query with name:some name that doesn’t exist WARN - OpenmrsUtil.getDirectoryInApplicationDataDirectory(1346) |2017-08-09 09:36:09,586| ‘/tmp/appdir-for-unit-tests-7447834445469864609/REPORT_RESULTS’ doesn’t exist. Creating directories now. DEBUG - CaseReportUtil.executeTask(353) |2017-08-09 09:36:09,589| Patient#2 already has an item in the queue with the trigger HIV Switched To Second Line WARN - CaseReportUtil.getSqlCohortDefinition(251) |2017-08-09 09:36:09,671| Cannot find a Sql Cohort Query with name:some name that does not exist WARN - OpenmrsUtil.getDirectoryInApplicationDataDirectory(1346) |2017-08-09 09:36:09,689| ‘/tmp/appdir-for-unit-tests-3042786242687817229/REPORT_RESULTS’ doesn’t exist. Creating directories now. WARN - CaseReportUtil.getSqlCohortDefinition(251) |2017-08-09 09:36:09,727| some retired cohort query is a retired Sql Cohort Query WARN - OpenmrsUtil.getDirectoryInApplicationDataDirectory(1346) |2017-08-09 09:36:09,807| ‘/tmp/appdir-for-unit-tests-9071977171144711315/REPORT_RESULTS’ doesn’t exist. Creating directories now. Tests run: 19, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.052 sec Running org.openmrs.module.casereport.CaseReportFormTest Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.511 sec <<< FAILURE! shouldGenerateTheReportFormForTheSpecifiedPatient(org.openmrs.module.casereport.CaseReportFormTest) Time elapsed: 0.51 sec <<< FAILURE! junit.framework.AssertionFailedError: expected:<0> but was:<-1> at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.failNotEquals(Assert.java:329) at junit.framework.Assert.assertEquals(Assert.java:78) at junit.framework.Assert.assertEquals(Assert.java:234) at junit.framework.Assert.assertEquals(Assert.java:241) at org.openmrs.module.casereport.CaseReportFormTest.shouldGenerateTheReportFormForTheSpecifiedPatient(CaseReportFormTest.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83) at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:88) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

ERROR - SchemaExport.execute(287) |2017-08-09 09:36:10,513| schema export unsuccessful org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add “;DB_CLOSE_ON_EXIT=FALSE” to the db URL) [90121-187] at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) at org.h2.message.DbException.get(DbException.java:179) at org.h2.message.DbException.get(DbException.java:155) at org.h2.message.DbException.get(DbException.java:144) at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1469) at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1444) at org.h2.jdbc.JdbcConnection.getAutoCommit(JdbcConnection.java:447) at com.mchange.v2.c3p0.impl.NewProxyConnection.getAutoCommit(NewProxyConnection.java:985) at org.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:82) at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:51) at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:263) at org.hibernate.tool.hbm2ddl.SchemaExport.drop(SchemaExport.java:229) at org.hibernate.impl.SessionFactoryImpl.close(SessionFactoryImpl.java:961) at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.destroy(AbstractSessionFactoryBean.java:228) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.destroy(LocalSessionFactoryBean.java:902) at org.openmrs.api.db.hibernate.HibernateSessionFactoryBean.destroy(HibernateSessionFactoryBean.java:206) at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:238) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:510) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:486) at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:742) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:455) at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1090) at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1064) at org.springframework.context.support.AbstractApplicationContext$1.run(AbstractApplicationContext.java:980)

Results :

Failed tests: shouldGenerateTheReportFormForTheSpecifiedPatient(org.openmrs.module.casereport.CaseReportFormTest): expected:<0> but was:<-1>

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

[INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] Case Report Module … SUCCESS [ 1.743 s] [INFO] Case Report Module API … FAILURE [ 16.818 s] [INFO] Case Report Module OMOD … SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 19.114 s [INFO] Finished at: 2017-08-09T09:36:10+01:00 [INFO] Final Memory: 33M/259M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project casereport-api: There are test failures. [ERROR] [ERROR] Please refer to /home/openhie/Downloads/openmrs-module-casereport-master/api/target/surefire-reports for the individual test results. [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 -rf :casereport-api

There were a couple more time zone sensitive tests I had to fix, you need to pull the latest changes again and rebuild.

hello, i tried it now but it still gave me the following error :

Tests in error: shouldDismissTheCaseReport(org.openmrs.module.casereport.rest.v1_0.controller.StatusChangeControllerTest): java.lang.RuntimeException: java.net.BindException: Address already in use shouldSubmitTheCaseReport(org.openmrs.module.casereport.rest.v1_0.controller.StatusChangeControllerTest): java.lang.RuntimeException: java.net.BindException: Address already in use shouldGetAll(org.openmrs.module.casereport.rest.v1_0.controller.StatusChangeControllerTest): java.lang.RuntimeException: java.net.BindException: Address already in use shouldGetRefByUuid(org.openmrs.module.casereport.rest.v1_0.controller.StatusChangeControllerTest): java.lang.RuntimeException: java.net.BindException: Address already in use shouldGetDefaultByUuid(org.openmrs.module.casereport.rest.v1_0.controller.StatusChangeControllerTest): java.lang.RuntimeException: java.net.BindException: Address already in use shouldGetFullByUuid(org.openmrs.module.casereport.rest.v1_0.controller.StatusChangeControllerTest): java.lang.RuntimeException: java.net.BindException: Address already in use onApplicationEvent_shouldSubmitTheDocumentSuccessfullyToTheConfiguredUrl(org.openmrs.module.casereport.HealthInfoExchangeListenerTest): java.lang.RuntimeException: java.net.BindException: Address already in use onApplicationEvent_shouldFailForAResponseThatIsNotASuccess(org.openmrs.module.casereport.HealthInfoExchangeListenerTest): java.lang.RuntimeException: java.net.BindException: Address already in use

Tests run: 38, Failures: 0, Errors: 8, Skipped: 0

[INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] Case Report Module … SUCCESS [ 1.357 s] [INFO] Case Report Module API … SUCCESS [ 21.269 s] [INFO] Case Report Module OMOD … FAILURE [ 27.079 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 51.202 s [INFO] Finished at: 2017-08-11T09:46:44+01:00 [INFO] Final Memory: 47M/332M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project casereport-omod: There are test failures. [ERROR] [ERROR] Please refer to /home/openhie/openmrs-module-casereport/omod/target/surefire-reports for the individual test results. [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 -rf :casereport-omod

You probably have a process already listening on port 5000 which the test uses, I’ll have to fix the test to find and use an available port. You shouldn’t have to run the unit tests anyways, to build the project just run the command below:

mvn clean install -DskipTests