I am upgrading my spring application from spring version 3.1.0 to 4.1.9 along with hibernate 3 to 4. While upgrading I am getting NullPointerException error at runtime.
Cause of Error:
Error occurs when there is call for beans SpringUtils.getBean(beanName)
.
I upgraded org.springaframework
dependecny and made neccesary code changes as per migration guide. It seems like when getBean() method called, beans are not fully initilzed. When I tried to print DEBUG log, I found out that applicationContext is loading correctly. But gettting null pointer at getBean() method call.
What could be potential cause for this error?
I have changed dependency versions and checked whole spring documentaion for that but didn’t get anything.