org.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name '' defined in resource loaded through InputStream: Unnamed bean definition specifies neither 'class' nor 'parent' - can't generate name

Spring JIRA | Steven Devijver | 1 decade ago
  1. 0

    Anonymous inner beans that do not have class and parent attributes fail to load: <bean class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean" id="orderService"> <property name="transactionManager"> <ref bean="transactionManager"/> </property> <property name="target"> <bean autowire="byType" factory-bean="OrderServiceClass" factory-method="getInstance"/> </property> <property name="transactionAttributes"> <props> <prop key="*">PROPAGATION_REQUIRED</prop> </props> </property> </bean> The exception is: org.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name '' defined in resource loaded through InputStream: Unnamed bean definition specifies neither 'class' nor 'parent' - can't generate name at org.springframework.beans.factory.support.BeanDefinitionReaderUtils.generateBeanName(BeanDefinitionReaderUtils.java:102) at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement(DefaultXmlBeanDefinitionParser.java:331) at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parsePropertySubElement(DefaultXmlBeanDefinitionParser.java:660) at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parsePropertyValue(DefaultXmlBeanDefinitionParser.java:650) at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parsePropertyElement(DefaultXmlBeanDefinitionParser.java:593) at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parsePropertyElements(DefaultXmlBeanDefinitionParser.java:492) at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement(DefaultXmlBeanDefinitionParser.java:360) at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement(DefaultXmlBeanDefinitionParser.java:328) at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitions(DefaultXmlBeanDefinitionParser.java:265) at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions(DefaultXmlBeanDefinitionParser.java:185) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:238) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:155) ...

    Spring JIRA | 1 decade ago | Steven Devijver
    org.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name '' defined in resource loaded through InputStream: Unnamed bean definition specifies neither 'class' nor 'parent' - can't generate name
  2. 0

    Anonymous inner beans that do not have class and parent attributes fail to load: <bean class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean" id="orderService"> <property name="transactionManager"> <ref bean="transactionManager"/> </property> <property name="target"> <bean autowire="byType" factory-bean="OrderServiceClass" factory-method="getInstance"/> </property> <property name="transactionAttributes"> <props> <prop key="*">PROPAGATION_REQUIRED</prop> </props> </property> </bean> The exception is: org.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name '' defined in resource loaded through InputStream: Unnamed bean definition specifies neither 'class' nor 'parent' - can't generate name at org.springframework.beans.factory.support.BeanDefinitionReaderUtils.generateBeanName(BeanDefinitionReaderUtils.java:102) at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement(DefaultXmlBeanDefinitionParser.java:331) at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parsePropertySubElement(DefaultXmlBeanDefinitionParser.java:660) at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parsePropertyValue(DefaultXmlBeanDefinitionParser.java:650) at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parsePropertyElement(DefaultXmlBeanDefinitionParser.java:593) at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parsePropertyElements(DefaultXmlBeanDefinitionParser.java:492) at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement(DefaultXmlBeanDefinitionParser.java:360) at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement(DefaultXmlBeanDefinitionParser.java:328) at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitions(DefaultXmlBeanDefinitionParser.java:265) at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions(DefaultXmlBeanDefinitionParser.java:185) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:238) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:155) ...

    Spring JIRA | 1 decade ago | Steven Devijver
    org.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name '' defined in resource loaded through InputStream: Unnamed bean definition specifies neither 'class' nor 'parent' - can't generate name
  3. 0

    How to access Spring context from a depending project?

    Stack Overflow | 3 years ago | Edmond
    org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [context.xml]; nested exception is java.io.FileNotFoundException: class path resource [context.xml] cannot be opened because it does not exist
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    JBoss 4.2 load javax.xml.parsers.DocumentBuilderFactory from xmlparserv2.jar?

    Stack Overflow | 3 years ago | Viv
    org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/classes/conf/applicationContext.xml]; nested exception is java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory
  6. 0

    Grails deployment to Glassfish and slf4j

    Stack Overflow | 4 years ago | tsure
    org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is **java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V**

    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. org.springframework.beans.factory.BeanDefinitionStoreException

      Error registering bean with name '' defined in resource loaded through InputStream: Unnamed bean definition specifies neither 'class' nor 'parent' - can't generate name

      at org.springframework.beans.factory.support.BeanDefinitionReaderUtils.generateBeanName()
    2. Spring Beans
      XmlBeanDefinitionReader.loadBeanDefinitions
      1. org.springframework.beans.factory.support.BeanDefinitionReaderUtils.generateBeanName(BeanDefinitionReaderUtils.java:102)
      2. org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement(DefaultXmlBeanDefinitionParser.java:331)
      3. org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parsePropertySubElement(DefaultXmlBeanDefinitionParser.java:660)
      4. org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parsePropertyValue(DefaultXmlBeanDefinitionParser.java:650)
      5. org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parsePropertyElement(DefaultXmlBeanDefinitionParser.java:593)
      6. org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parsePropertyElements(DefaultXmlBeanDefinitionParser.java:492)
      7. org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement(DefaultXmlBeanDefinitionParser.java:360)
      8. org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement(DefaultXmlBeanDefinitionParser.java:328)
      9. org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitions(DefaultXmlBeanDefinitionParser.java:265)
      10. org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions(DefaultXmlBeanDefinitionParser.java:185)
      11. org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:238)
      12. org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:155)
      12 frames