HTML Form Entry v3.3.0 Installation Error

KenyaEMR 15.1.7


Question: I have just installed the HFE 3.3.0 module on a OpenMRS 1.9.9 instance. The logs keep spitting the error below. Any ideas on what I need to do to get rid of it? NB/ HFE Versions 2.* install and run quietly without any issues.

ERROR - EmrActivator.contextRefreshed(65) |2016-11-30 22:29:44,382| Unable to refresh core context org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: URL [jar:file:/var/cache/tomcat6/temp/1480533987342.openmrs-lib-cache/htmlformentry/lib/htmlformentry-api-3.3.0-tests.jar!/org/openmrs/module/htmlformentry/widget/TimeWidgetTest.class]; nested exception is java.io.FileNotFoundException: class path resource [org/openmrs/test/BaseModuleContextSensitiveTest.class] cannot be opened because it does not exist at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:237) at org.openmrs.module.kenyacore.calculation.CalculationManager.refresh(CalculationManager.java:63) at org.openmrs.module.kenyacore.api.impl.CoreServiceImpl.refreshManager(CoreServiceImpl.java:43) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.openmrs.aop.LoggingAdvice.invoke(LoggingAdvice.java:118) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at com.sun.proxy.$Proxy88.refreshManager(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at com.sun.proxy.$Proxy203.refreshManager(Unknown Source) at org.openmrs.module.kenyacore.CoreContext.refresh(CoreContext.java:103) at org.openmrs.module.kenyaemr.EmrActivator.contextRefreshed(EmrActivator.java:60) at org.openmrs.module.ModuleUtil.refreshApplicationContext(ModuleUtil.java:838) at org.openmrs.module.web.WebModuleUtil.refreshWAC(WebModuleUtil.java:842) at org.openmrs.web.Listener.performWebStartOfModules(Listener.java:561) at org.openmrs.web.Listener.startOpenmrs(Listener.java:212) at org.openmrs.web.WebDaemon$1.run(WebDaemon.java:42) Caused by: java.io.FileNotFoundException: class path resource [org/openmrs/test/BaseModuleContextSensitiveTest.class] cannot be opened because it does not exist at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:158) at org.springframework.core.type.classreading.SimpleMetadataReader.(SimpleMetadataReader.java:45) at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:80) at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:101) at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:76) at org.springframework.core.type.filter.AbstractTypeHierarchyTraversingFilter.match(AbstractTypeHierarchyTraversingFilter.java:105) at org.springframework.core.type.filter.AbstractTypeHierarchyTraversingFilter.match(AbstractTypeHierarchyTraversingFilter.java:76) at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.isCandidateComponent(ClassPathScanningCandidateComponentProvider.java:280) at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:214) … 37 more

@mogoodrich (and @wyclif and @dkayiwa) the immediate cause of this error is that our released omod artifact contains a -tests.jar in its lib folder. That seems wrong to me. Did something change about packaging? (Or am I missing something?)

Thanks @darius for identifying this. I have fixed it and released version 3.3.1 of the module. I wanted to upload it on modulus but failed because am not among the listed maintainers.

Thanks @dkayiwa!

I wasn’t able to add you as a maintainer for some reason, but I just uploaded version 3.3.1.

Take care, Mark

@dkayiwa, I noticed this failed HFE build: https://ci.openmrs.org/browse/HTML-HTML-378/log. Did everything get cleaned up in the end? (The error was PermGen, so maybe we need to ensure that we’re giving more memory to maven in the release stage for HFE…)

I rolled back and released again without using bamboo.

@moshon, please try the newly-released version of the HTML Form Entry module, and confirm this works.

@dkayiwa, our automated tools are supposed to work. If they don’t, please share that so we can get them fixed!

It works perfectly. Thanks guys. @darius @dkayiwa @mogoodrich