Home  >  Forum  >  Spring
Post New Query

No bean class specified on bean definition


joined on
April 07,2013
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
joined on
March 16,2013
Replied on April 07,2013

It seems that you have done some mistake while creating bean.
Elaborate how are you creating bean.
joined on
April 07,2013
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>
joined on
March 16,2013
Replied on April 07,2013

You have done wrong here you need to add one more property

 factory-method="somefactorymethod"

Write Answer








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