Injection of autowired dependencies failed

For a simple module, I get this injection failed error message.After running instance multiple times it works but when system is restarted it again start giving error. Even though bean is defines in moduleapplicationcontext.

Error log - org.springframework.beans.factory.BeanCreationException: Error creating bean w - Pastebin.com

Please help.

Is this Thread helpful?

Nope, I have a working instance of OPENMRS but when I put new module which I have created it gives error.GitHub - vishi-chauhan/hims-loginaudit: Login trail of user in OPENMRS

If possible can you go through the code.

@vishi can you please paste the complete log ?

This is the log 19-Feb-2021 12:18:59.823 INFO [main] org.apache.catalina.startup.VersionLoggerLi - Pastebin.com Issue keeps coming in goes off don’t know why spring is not able to initialize the bean.Sometimes it does and other time gives error.But it’s for sure when running the tomcat server first time gives error.

Do you need to change the rest webservices module?

No, I don’t want to modify Rest module.I am creating new module with openmrs2.3 and rest 2.28.0 but when I deploy new module , ehcache manager gives error bean not found for the service interface.I have implemented the interface and defined the bean in moduleApplicationContext.xml.But after multiple tomcat restart it starts normally and works fine.Once my system(laptop) is restarted it again starts giving ehcache manager error on tomcat startup.

From your log, this looks like a change to the rest webservices module: org.openmrs.module.webservices.rest.web.v1_0.controller.openmrs1_9.SessionController1_9.autologinservice

My bad, logs link is 22-Feb-2021 20:19:04.434 INFO [main] org.apache.catalina.startup.VersionLoggerLi - Pastebin.com

Are all your changes committed?