Error: No default constructor found




Asked on March 24, 2013
Hi I am getting below error.
I am new to spring, please help me.

Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [some class]: No default constructor found; nested exception is java.lang.NoSuchMethodException:some class.<init>()
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:72)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:990)




Replied on March 24, 2013
If you are using a bean with only setter method then there must be a default constructor. If you have created any other constructor with argument, then also create default constructor.


Write Answer











©2024 concretepage.com | Privacy Policy | Contact Us