Open chughrahul opened 1 year ago
I think it is happening due to the comment in the line - https://github.com/Bahmni/openmrs-module-bahmni.ie.apps/blob/master/api/src/main/resources/moduleApplicationContext.xml#L21 Please have a look before next release.
Hi,
We're getting a bean error while working with version 1.3.0 but the system is working fine with 1.2.0.
The error says - The following error occurred at startup: Unable to start OpenMRS. Error thrown was: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serviceContext$child#0' defined in URL [jar:file:/openmrs/data/.openmrs-lib-cache/bahmni.ie.apps/lib/bahmni.ie.apps-api-1.3.0.jar!/moduleApplicationContext.xml]: Cannot resolve reference to bean 'bahmniFormService' while setting bean property 'moduleService' with key [1]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'bahmniFormService' available org.openmrs.module.ModuleException: Unable to start OpenMRS. Error thrown was: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serviceContext$child#0' defined in URL [jar:file:/openmrs/data/.openmrs-lib-cache/bahmni.ie.apps/lib/bahmni.ie.apps-api-1.3.0.jar!/moduleApplicationContext.xml]: Cannot resolve reference to bean 'bahmniFormService' while setting bean property 'moduleService' with key [1]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'bahmniFormService' available at org.openmrs.web.WebDaemon.startOpenmrs(WebDaemon.java:65) at org.openmrs.web.Listener.contextInitialized(Listener.java:243) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4759) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5229) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:727) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:695) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1016) at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1903) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) Caused by: javax.servlet.ServletException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serviceContext$child#0' defined in URL [jar:file:/openmrs/data/.openmrs-lib-cache/bahmni.ie.apps/lib/bahmni.ie.apps-api-1.3.0.jar!/moduleApplicationContext.xml]: Cannot resolve reference to bean 'bahmniFormService' while setting bean property 'moduleService' with key [1]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'bahmniFormService' available at org.openmrs.web.Listener.startOpenmrs(Listener.java:315) at org.openmrs.web.WebDaemon$1.run(WebDaemon.java:42) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serviceContext$child#0' defined in URL [jar:file:/openmrs/data/.openmrs-lib-cache/bahmni.ie.apps/lib/bahmni.ie.apps-api-1.3.0.jar!/moduleApplicationContext.xml]: Cannot resolve reference to bean 'bahmniFormService' while setting bean property 'moduleService' with key [1]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'bahmniFormService' available at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:342) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:113) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:428) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:173) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1702) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1447) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551) at org.openmrs.module.ModuleUtil.refreshApplicationContext(ModuleUtil.java:885) at org.openmrs.module.web.WebModuleUtil.refreshWAC(WebModuleUtil.java:844) at org.openmrs.web.Listener.performWebStartOfModules(Listener.java:661) at org.openmrs.web.Listener.performWebStartOfModules(Listener.java:641) at org.openmrs.web.Listener.startOpenmrs(Listener.java:307) ... 1 more Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'bahmniFormService' available at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:816) at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1288) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:330) ... 20 more
See the server log for full output.