Unable to start Openmrs 1.11.x

Hi,

I tried in vain trying to get platform 2.0 to work with our modules over the last couple of days (Platform 2.0 doesn’t work with our modules). I figured it was a hibernate issue (we are still using version 3) but didn’t find time to get to the bottom of the issue.

However, I tried reverting back to my working version 1.11.x_dev and I just can’t get it to start. I have downgraded from Java 8 to 7. Cleaned up my db. Checked out openmrs-core branch 1.11.x_dev afresh but it won’t start.

I keep getting Caused by: org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name ‘sessionFactory’: FactoryBean which is currently in creation returned null from getObject…

Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘userService’ defined in class path resource [applicationContext-service.xml]: Cannot resolve reference to bean ‘userServiceTarget’ while setting bean property ‘target’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘userServiceTarget’ defined in class path resource [applicationContext-service.xml]: Cannot resolve reference to bean ‘userDAO’ while setting bean property ‘userDAO’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘userDAO’ 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.BeanCurrentlyInCreationException: Error creating bean with name ‘sessionFactory’: FactoryBean which is currently in creation returned null from getObject

Any ideas what is causing the issue?

Thanks

-Andrew

You will need to paste the entire log at pastebin.com

Just to add to this, I have experience the exact same issue on a Mac. Since building and running the omrs platform 2.0.x (via mvn jetty:run) I have not been able to run older versions of the platform. I have likewise double checked that I’m using java 1.7 and created a new database.

http://pastebin.com/qqRW1XBH

@insiderish this does not look like the full log.

full log.txt (600.3 KB)

Log is too large for pastebin.

See attached

Great! Before doing mvn jetty: run, did you start with mvn clean install?

Yes I did. And it completed successfully

Does that mean the problem is now solved?

Nope, I did an ‘mvn clean install’ and it completed successfully. However, when I still try to run ‘mvn jetty:run’ I get the startup error.

@insiderish does it still fail to start if you revert all modules (in the application data modules folder) to what they were before you attempted to upgrade them?

Yes.

I’ve gone ahead and cleaned up the modules folder just to have the basic openmrs interface loading but it doesn’t work either.

I have deleted the .OpenMRS folder and it now works! Could it be that the 2.0.x platform is adding something in that folder?

Anyways I am a happy guy :slight_smile:

Thanks

If you still have the deleted in the recycle bin, you could add back and we identify the culprit. Could it be the lucene folder?

I had created a backup. I have restored it and it’s failing again. What do I look out for?

I have removed the lucene folder and it’s still failing

Great that you had it backed up! :slight_smile: Which other folders do you have in there besides lucene? Am assuming you also reverted modules in the modules folder.

Folders: activemq-data, chartsearch, formentry, jasperReports, logic, lucene, modules, owa, xforms, person_images

Files: openmrs-runtime.properties, liquibaseUpdateLogs.txt

I have deleted activemq-data, lucene, owa, openmrs-runtime.properties, liquibaseUpdateLogs.txt.

The modules folder is empty.

Still failing

Does this mean you have deleted all folders in .OpenMRS but still failing?

When I remove all content from .OpenMRS it fails, when I delete .OpenMRS it works. I will checkout 2.0.x afresh and look closely at what is happening.

Could there be some hidden folders that go with deleting .OpenMRS? :slight_smile: