org.springframework.beans.factory.BeanCreationException: Error creating bean with name
Problem :
We come across this common exception when using spring and the properties file is not updated for the values defined in the common view interceptor file.
Exception I Encountered Was :
###################################################################################################################
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.handler.MappedInterceptor#1': Cannot create inner bean 'CommonViewInterceptor' of type [com.udp.interceptor.CommonViewInterceptor]while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'CommonViewInterceptor#1': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private java.lang.String com.udp.interceptor.CommonViewInterceptor.UrlSimActivation; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'url.sim.activation'###################################################################################################################
Solution :
This exception was caused when i did not add "url.sim.activation" property to the properties file. Since the Common view interceptor could not find a definite value for "url.sim.activation" in properties i was getting this exception.
Example :
- Just add a property value called "url.sim.activation" and give a relevant URL and restart the server
Similar Exception :
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0'
- Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException
- java.lang.IllegalArgumentException
No comments:
Post a Comment