Home  >  Forum  >  Spring
Post New Query

No bean class specified on bean definition



Asked on April 07, 2013
Find the error below and Please help me to resolve it.
Caused by: java.lang.IllegalStateException: No bean class specified on bean definition
at org.springframework.beans.factory.support.AbstractBeanDefinition.getBeanClass(AbstractBeanDefinition.java:381)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:54)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:990)
... 13 more

Thanks



Replied on April 07, 2013
It seems that you have done some mistake while creating bean.
Elaborate how are you creating bean.



Replied on April 07, 2013
Thanks for the reply.
I am new to spring and I am creating  bean in application xml as below

 <bean id="employeeService" factory-bean ="defaultFactory">
    </bean>



Replied on April 07, 2013
You have done wrong here you need to add one more property

 factory-method="somefactorymethod"


Write Answer








©2019 concretepage.com | Privacy Policy | Contact Us