Hi, I recently tried to add spring-loaded to aid our development. But When I add the spring-loaded jar, I keep getting this error for metadatasharing module(1.1.9) and openmrs did not startup ( It throws ‘Unable to start OpenMRS: Scheduler service not found’ which was not the real cause).
ERROR [org.openmrs.web.Listener] java.lang.IllegalStateException: Cannot load configuration class: org.openmrs.module.metadatasharing.MetadataSharing17Configuration
2015-10-03 22:25:51,610 ERROR [org.openmrs.web.Listener] Unable to refresh the spring application context. Root Cause was:
java.lang.NoSuchFieldError: r$sfields
at org.openmrs.module.metadatasharing.MetadataSharing17Configuration$$EnhancerByCGLIB$$ae5743fa.<clinit>(<generated>)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.springframework.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:386)
at org.springframework.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:219)
at org.springframework.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
at org.springframework.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
at org.springframework.context.annotation.ConfigurationClassEnhancer.createClass(ConfigurationClassEnhancer.java:118)
at org.springframework.context.annotation.ConfigurationClassEnhancer.enhance(ConfigurationClassEnhancer.java:92)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:358)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanFactory(ConfigurationClassPostProcessor.java:244)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:694)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:633)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
at org.openmrs.module.ModuleUtil.refreshApplicationContext(ModuleUtil.java:832)
at org.openmrs.module.web.WebModuleUtil.refreshWAC(WebModuleUtil.java:962)
at org.openmrs.web.Listener.performWebStartOfModules(Listener.java:617)
at org.openmrs.web.Listener.performWebStartOfModules(Listener.java:596)
at org.openmrs.web.Listener.startOpenmrs(Listener.java:239)
at org.openmrs.web.WebDaemon$1.run(WebDaemon.java:42)
This happens when spring application context is being refreshed.
And the command I used to add springloaded is -javaagent:/bahmni/springloaded-1.2.3.RELEASE.jar -noverify
.
OpenMRS started up fine when I restarted OpenMRS without this module. Any idea about these errors?