Error with OpenMRS startup.

OpenMRS was starting up fine at first but then I tried to add my first module which had some errors. I made some changes to the module config.xml file and that’s when this error started to appear. I restored the config.xml file as before but am still getting this error at startup. Also, I’m using jetty server to run.

This is part of the error I’m getting: The following error occurred at startup:

Unable to start OpenMRS. Error thrown was: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘messageSourceServiceTarget’ defined in class path resource [applicationContext-service.xml]: Cannot resolve reference to bean ‘mutableResourceBundleMessageSource’ while setting bean property ‘activeMessageSource’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘mutableResourceBundleMessageSource’ defined in class path resource [applicationContext-service.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘org.springframework.transaction.interceptor.TransactionAttributeSourceAdvisor#0’ defined in class path resource [applicationContext-service.xml]: Cannot resolve reference to bean ‘transactionInterceptor’ while setting bean property ‘transactionInterceptor’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘transactionInterceptor’ defined in class path resource [applicationContext-service.xml]: Cannot resolve reference to bean ‘transactionManager’ while setting bean property ‘transactionManager’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘transactionManager’ defined in class path resource [applicationContext-service.xml]: Cannot resolve reference to bean ‘sessionFactory’ while setting bean property ‘sessionFactory’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘sessionFactory’: Unsatisfied dependency expressed through field ‘interceptors’; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.openmrs.ui.framework.StandardModuleUiConfiguration] for bean with name ‘org.openmrs.ui.framework.StandardModuleUiConfiguration#0’ defined in URL [jar:file:/Users/rayangadmor/.OpenMRS/.openmrs-lib-cache/myfirstmodule/myfirstmodule.jar!/webModuleApplicationContext.xml]; nested exception is java.lang.ClassNotFoundException: org.openmrs.ui.framework.StandardModuleUiConfiguration Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.openmrs.ui.framework.StandardModuleUiConfiguration] for bean with name ‘org.openmrs.ui.framework.StandardModuleUiConfiguration#0’ defined in URL [jar:file:/Users/rayangadmor/.OpenMRS/.openmrs-lib-cache/myfirstmodule/myfirstmodule.jar!/webModuleApplicationContext.xml]; nested exception is java.lang.ClassNotFoundException: org.openmrs.ui.framework.StandardModuleUiConfiguration Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘basicexample.BasicexampleService’ defined in URL [jar:file:/Users/rayangadmor/.OpenMRS/.openmrs-lib-cache/basicexample/basicexample.jar!/moduleApplicationContext.xml]: Cannot create inner bean ‘org.openmrs.module.basicexample.api.impl.BasicexampleServiceImpl#7a0158a8’ of type [org.openmrs.module.basicexample.api.impl.BasicexampleServiceImpl] while setting bean property ‘target’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘org.openmrs.module.basicexample.api.impl.BasicexampleServiceImpl#7a0158a8’ defined in URL [jar:file:/Users/rayangadmor/.OpenMRS/.openmrs-lib-cache/basicexample/basicexample.jar!/moduleApplicationContext.xml]: Cannot resolve reference to bean ‘basicexample.BasicexampleDao’ while setting bean property ‘dao’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘basicexample.BasicexampleDao’: Unsatisfied dependency expressed through field ‘sessionFactory’; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.openmrs.ui.framework.StandardModuleUiConfiguration] for bean with name ‘org.openmrs.ui.framework.StandardModuleUiConfiguration#0’ defined in URL [jar:file:/Users/rayangadmor/.OpenMRS/.openmrs-lib-cache/myfirstmodule/myfirstmodule.jar!/webModuleApplicationContext.xml]; nested exception is java.lang.ClassNotFoundException: org.openmrs.ui.framework.StandardModuleUiConfiguration Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘myfirstmodule.MyfirstmoduleService’ defined in URL [jar:file:/Users/rayangadmor/.OpenMRS/.openmrs-lib-cache/myfirstmodule/lib/myfirstmodule-api-1.0.0-SNAPSHOT.jar!/moduleApplicationContext.xml]: Cannot create inner bean ‘org.openmrs.module.myfirstmodule.api.impl.MyfirstmoduleServiceImpl#3eda59c7’ of type [org.openmrs.module.myfirstmodule.api.impl.MyfirstmoduleServiceImpl] while setting bean property ‘target’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘org.openmrs.module.myfirstmodule.api.impl.MyfirstmoduleServiceImpl#3eda59c7’ defined in URL [jar:file:/Users/rayangadmor/.OpenMRS/.openmrs-lib-cache/myfirstmodule/lib/myfirstmodule-api-1.0.0-SNAPSHOT.jar!/moduleApplicationContext.xml]: Cannot resolve reference to bean ‘myfirstmodule.MyfirstmoduleDao’ while setting bean property ‘dao’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘myfirstmodule.MyfirstmoduleDao’: Unsatisfied dependency expressed through field ‘sessionFactory’; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.openmrs.ui.framework.StandardModuleUiConfiguration] for bean with name ‘org.openmrs.ui.framework.StandardModuleUiConfiguration#0’ defined in URL [jar:file:/Users/rayangadmor/.OpenMRS/.openmrs-lib-cache/myfirstmodule/myfirstmodule.jar!/webModuleApplicationContext.xml]; nested exception is java.lang.ClassNotFoundException: org.openmrs.ui.framework.StandardModuleUiConfiguration Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘myfirstmodule.MyfirstmoduleService’ defined in URL [jar:file:/Users/rayangadmor/.OpenMRS/.openmrs-lib-cache/myfirstmodule/lib/myfirstmodule-api-1.0.0-SNAPSHOT.jar!/moduleApplicationContext.xml]: Cannot create inner bean ‘org.openmrs.module.myfirstmodule.api.impl.MyfirstmoduleServiceImpl#3eda59c7’ of type [org.openmrs.module.myfirstmodule.api.impl.MyfirstmoduleServiceImpl] while setting bean property ‘target’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘org.openmrs.module.myfirstmodule.api.impl.MyfirstmoduleServiceImpl#3eda59c7’ defined in URL [jar:file:/Users/rayangadmor/.OpenMRS/.openmrs-lib-cache/myfirstmodule/lib/myfirstmodule-api-1.0.0-SNAPSHOT.jar!/moduleApplicationContext.xml]: Cannot resolve reference to bean ‘myfirstmodule.MyfirstmoduleDao’ while setting bean property ‘dao’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘myfirstmodule.MyfirstmoduleDao’: Unsatisfied dependency expressed through field ‘sessionFactory’; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.openmrs.ui.framework.StandardModuleUiConfiguration] for bean with name ‘org.openmrs.ui.framework.StandardModuleUiConfiguration#0’ defined in URL [jar:file:/Users/rayangadmor/.OpenMRS/.openmrs-lib-cache/myfirstmodule/myfirstmodule.jar!/webModuleApplicationContext.xml]; nested exception is java.lang.ClassNotFoundException: org.openmrs.ui.framework.StandardModuleUiConfiguration Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘basicexample.BasicexampleService’ defined in URL [jar:file:/Users/rayangadmor/.OpenMRS/.openmrs-lib-cache/basicexample/basicexample.jar!/moduleApplicationContext.xml]: Cannot create inner bean ‘org.openmrs.module.basicexample.api.impl.BasicexampleServiceImpl#7a0158a8’ of type [org.openmrs.module.basicexample.api.impl.BasicexampleServiceImpl] while setting bean property ‘target’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘org.openmrs.module.basicexample.api.impl.BasicexampleServiceImpl#7a0158a8’ defined in URL [jar:file:/Users/rayangadmor/.OpenMRS/.openmrs-lib-cache/basicexample/basicexample.jar!/moduleApplicationContext.xml]: Cannot resolve reference to bean ‘basicexample.BasicexampleDao’ while setting bean property ‘dao’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘basicexample.BasicexampleDao’: Unsatisfied dependency expressed through field ‘sessionFactory’; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.openmrs.ui.framework.StandardModuleUiConfiguration] for bean with name ‘org.openmrs.ui.framework.StandardModuleUiConfiguration#0’ defined in URL [jar:file:/Users/rayangadmor/.OpenMRS/.openmrs-lib-cache/myfirstmodule/myfirstmodule.jar!/webModuleApplicationContext.xml]; nested exception is java.lang.ClassNotFoundException: org.openmrs.ui.framework.StandardModuleUiConfiguration

Post your module on github for us to see and advise accordingly.

These are the basic modules I’ve attempted to add.