Install OpenMRS

I’m trying to install OpenMRS on my pc, but I can’t and it gives me this error.

OpenMRS is not able to start.

The following error occurred at startup:

Unable to start OpenMRS. Error thrown was: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘conversionService’: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: java.util.Set org.openmrs.module.uiframework.UiFrameworkConversionServiceFactoryBean.springManagedConverters; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘stringToAppDescriptorConverter’: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.openmrs.module.appframework.service.AppFrameworkService org.openmrs.module.appui.converter.StringToAppDescriptorConverter.appFrameworkService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.openmrs.module.appframework.service.AppFrameworkService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)} Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘appFrameworkService’ defined in URL

…etc. Can someone help me? Thank you, Paola

@paolamagro can you please give the details of your environment and procedure .

Helo paoal, have u tried following this link:https://wiki.openmrs.org/display/docs/Getting+Started+as+a+Developer

@paolamagro, @tendomart is asking you to share the operating system, maven, JDK and git versions that you are running.

1 Like

Hi tendomart! I’m using a MacOs Mojave version 10.14.3, I downloaded Java JDK 11.0.2, MySQL 8.0.15, tomcat was provided in the standalone package.

Ehi gliff thank you for your help. I’m not a developer, i just to run it to use it as a researcher, to check databases and insert new patients. I tried to follow the steps in your link but it didn’t work…Suggestions?

Hi jwnasambu! I’m using a MacOs Mojave version 10.14.3, I downloaded Java JDK 11.0.2, MySQL 8.0.15, tomcat was provided in the standalone package. I don’t know what maven is…i just need to run this program to use it for research (browse database and insert data).

Downgrade your Java to version 1.8 and MySQL to version 5.7

tried to downgrade to java 8 and MySQL 5.7…but still not working

What does but still not working mean?

Sorry paola, my apologies

@paolamagro Am not sure of how MacOS manages caches @dkayiwa do you think he needs to do some cache cleaning on his Unix instance before his re-installation?

What does not working mean?

gcliff thank you for your help!

it just gave me the same error i sent you in the first place

Can you share the current server log on using Java version 1.8 and MySQL version 5.7?

Thank you I had the same problem downgrading the version of java helped.

1 Like

For anyone having this problem despite having the correct java version, check your POM files. The root POM will be directly located in your module and your other POM file will be in yourmodul/omod. My error was in my POM omod file.

This is where my error was coming from <dependency> <groupId>org.openmrs.module</groupId> <artifactId>appframework-api</artifactId> <scope> provided </scope> </dependency>

Corrected dependency: <dependency> <groupId>org.openmrs.module</groupId> <artifactId>appframework-api</artifactId> <version>2.8</version> <type>jar</type> </dependency>

Something that was helpful for me was running just: mvn in my terminal. It’s incorrectly formatted so the terminal gives you options on correct formatting. I honestly just went through every command until one of them failed. And that led me to find where my error was coming from. Hopefully this helps someone and saves you a lot of time