Home  >  Forum  >  Spring
Post New Query

Error: No default constructor found


joined on
March 16,2013
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)

joined on
March 18,2013
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









Copyright ©2017 concretepage.com, all rights reserved |Privacy Policy | Contact Us