java.lang.IllegalStateException: Bean definition does not carry a resolved bean class

Spring JIRA | mike perham | 1 decade ago
  1. 0

    We recently upgraded from 1.1.5 to 1.2.5 and found that an abstract bean definition, which was working, now throws an exception: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'abstractInboxCommand' defined in class path resource [com/webify/jigsaw/inbox/command/inbox-commands.beans.xml]: Instantiation of bean failed; nested exception is java.lang.IllegalStateException: Bean definition does not carry a resolved bean class java.lang.IllegalStateException: Bean definition does not carry a resolved bean class at org.springframework.beans.factory.support.AbstractBeanDefinition.getBeanClass(AbstractBeanDefinition.java:205) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:49) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:453) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:333) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:275) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:318) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:81) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:66) at org.springframework.test.AbstractSpringContextTests.loadContextLocations(AbstractSpringContextTests.java:121) at org.springframework.test.AbstractDependencyInjectionSpringContextTests.loadContextLocations(AbstractDependencyInjectionSpringContextTests.java:161) at org.springframework.test.AbstractSpringContextTests.getContext(AbstractSpringContextTests.java:101) at org.springframework.test.AbstractDependencyInjectionSpringContextTests.setUp(AbstractDependencyInjectionSpringContextTests.java:129) The relevant beans are listed like this: <bean id="abstractInboxCommand"> <property name="inboxMessageDao"> <ref bean="inboxMessageDao"/> </property> <property name="mappingSystem"> <ref bean="inboxMappingSystem"/> </property> </bean> <bean id="createMessagesCommand" parent="abstractInboxCommand" class="com.webify.jigsaw.inbox.command.CreateMessagesCommand"/> <bean id="deleteMessagesCommand" parent="abstractInboxCommand" class="com.webify.jigsaw.inbox.command.DeleteMessagesCommand"/> <bean id="getMessagesCommand" parent="abstractInboxCommand" class="com.webify.jigsaw.inbox.command.GetMessagesCommand"/> I was under the impression that: 1) the 1.2 bean context was fully backwards compatible with 1.1 2) abstract beans can be defined simply by not declaring a class attribute Let me know if I can provide any other information.

    Spring JIRA | 1 decade ago | mike perham
    java.lang.IllegalStateException: Bean definition does not carry a resolved bean class
  2. 0

    We recently upgraded from 1.1.5 to 1.2.5 and found that an abstract bean definition, which was working, now throws an exception: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'abstractInboxCommand' defined in class path resource [com/webify/jigsaw/inbox/command/inbox-commands.beans.xml]: Instantiation of bean failed; nested exception is java.lang.IllegalStateException: Bean definition does not carry a resolved bean class java.lang.IllegalStateException: Bean definition does not carry a resolved bean class at org.springframework.beans.factory.support.AbstractBeanDefinition.getBeanClass(AbstractBeanDefinition.java:205) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:49) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:453) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:333) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:275) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:318) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:81) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:66) at org.springframework.test.AbstractSpringContextTests.loadContextLocations(AbstractSpringContextTests.java:121) at org.springframework.test.AbstractDependencyInjectionSpringContextTests.loadContextLocations(AbstractDependencyInjectionSpringContextTests.java:161) at org.springframework.test.AbstractSpringContextTests.getContext(AbstractSpringContextTests.java:101) at org.springframework.test.AbstractDependencyInjectionSpringContextTests.setUp(AbstractDependencyInjectionSpringContextTests.java:129) The relevant beans are listed like this: <bean id="abstractInboxCommand"> <property name="inboxMessageDao"> <ref bean="inboxMessageDao"/> </property> <property name="mappingSystem"> <ref bean="inboxMappingSystem"/> </property> </bean> <bean id="createMessagesCommand" parent="abstractInboxCommand" class="com.webify.jigsaw.inbox.command.CreateMessagesCommand"/> <bean id="deleteMessagesCommand" parent="abstractInboxCommand" class="com.webify.jigsaw.inbox.command.DeleteMessagesCommand"/> <bean id="getMessagesCommand" parent="abstractInboxCommand" class="com.webify.jigsaw.inbox.command.GetMessagesCommand"/> I was under the impression that: 1) the 1.2 bean context was fully backwards compatible with 1.1 2) abstract beans can be defined simply by not declaring a class attribute Let me know if I can provide any other information.

    Spring JIRA | 1 decade ago | mike perham
    java.lang.IllegalStateException: Bean definition does not carry a resolved bean class
  3. 0

    Tworzenie samodzielnej aplikacji ze Spring Framework i Hibernate w NetBeans IDE 6.9 – Jacek Laskowski - Wiki Amatora Programowania

    jaceklaskowski.pl | 1 year ago
    java.lang.IllegalStateException: Could not load JDBC driver class [org.apache.derby.jdbc.ClientDriver]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [SPR-4006] InitDestroyAnnotationPostProcessor triggers "No bean class specified on bean definition" - Spring JIRA

    spring.io | 11 months ago
    java.lang.IllegalStateException: No bean class specified on bean definition
  6. 0

    [Mifos-developer] Cannot convert value of type [java.lang.String] to required type [org.mifos.accounts.financial.util.helpers.FinancialActionConstants] for property 'actionToDebitAccount[VOLUNTARYDEPOSIT]':

    Google Groups | 6 years ago | Neil Marion dela Cruz
    java.lang.IllegalStateException: Cannot convert value of type [java.lang.String] to required type [org.mifos.accounts.financial.util.helpers.FinancialActionConstants] for property 'actionToDebitAccount[VOLUNTARYDEPOSIT]': no matching editors or conversion strategy found

  1. Nikolay Rybak 1 times, last 6 months ago
  2. Malcshour 1 times, last 7 months ago
  3. Bugger 1 times, last 7 months ago
6 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.IllegalStateException

    Bean definition does not carry a resolved bean class

    at org.springframework.beans.factory.support.AbstractBeanDefinition.getBeanClass()
  2. Spring Beans
    DefaultListableBeanFactory.preInstantiateSingletons
    1. org.springframework.beans.factory.support.AbstractBeanDefinition.getBeanClass(AbstractBeanDefinition.java:205)
    2. org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:49)
    3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:453)
    4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:333)
    5. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
    6. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
    7. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:275)
    7 frames
  3. Spring Context
    ClassPathXmlApplicationContext.<init>
    1. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:318)
    2. org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:81)
    3. org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:66)
    3 frames
  4. Spring TestContext
    AbstractDependencyInjectionSpringContextTests.setUp
    1. org.springframework.test.AbstractSpringContextTests.loadContextLocations(AbstractSpringContextTests.java:121)
    2. org.springframework.test.AbstractDependencyInjectionSpringContextTests.loadContextLocations(AbstractDependencyInjectionSpringContextTests.java:161)
    3. org.springframework.test.AbstractSpringContextTests.getContext(AbstractSpringContextTests.java:101)
    4. org.springframework.test.AbstractDependencyInjectionSpringContextTests.setUp(AbstractDependencyInjectionSpringContextTests.java:129)
    4 frames