geronimo-xbean-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tuomas Kiviaho (JIRA)" <>
Subject [jira] Created: (XBEAN-106) Id is required for elements when NOT used as a top-level tag
Date Wed, 18 Jun 2008 07:44:46 GMT
Id is required for elements when NOT used as a top-level tag

                 Key: XBEAN-106
             Project: XBean
          Issue Type: Bug
          Components: spring
    Affects Versions: 3.4
         Environment: xbean-spring-3.4.1
            Reporter: Tuomas Kiviaho

I was using org.apache.xbean.spring.context.ClassPathXmlApplicationContext in my beanRefContext.xml
and noticed weird behaviour with util:properties (and util:map)

<bean class="org.apache.activemq.spring.ActiveMQConnectionFactory">
	<property name="properties">
		<util:properties location="" />

Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration
problem: Configuration problem: Id is required for element 'properties' when used as a top-level
at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(
	at org.springframework.beans.factory.parsing.ReaderContext.error(
	at org.springframework.beans.factory.parsing.ReaderContext.error(
	at org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(
	at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(
	at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(
	at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseNestedCustomElement(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at org.apache.xbean.spring.context.v2c.XBeanBeanDefinitionParserDelegate.internalParseNestedCustomElement(
	at org.apache.xbean.spring.context.v2c.XBeanBeanDefinitionParserDelegate.parsePropertySubElement(

When using or supplying
and id this problem disappeared.

* * * IRRELEVANT FYI * * *

I couldn't get ActiveMQ XBean variant to accept properties at all. 

	<property name="properties">
		<util:properties id="foobar" location="" />

It created PropertyValue named 'property' along with properties which naturally failed due
to missing 'property' named property.

	<util:properties id="foobar" location="" />

It resolved correctly but property type coercion lead to ManagedMap instead of property file.
Here I revered from using ActiveMQ XBean to format used above.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message