geronimo-xbean-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillaume Nodet (JIRA)" <j...@apache.org>
Subject [jira] Commented: (XBEAN-106) Id is required for elements when NOT used as a top-level tag
Date Thu, 26 Jun 2008 09:00:45 GMT

    [ https://issues.apache.org/jira/browse/XBEAN-106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12608346#action_12608346
] 

Guillaume Nodet commented on XBEAN-106:
---------------------------------------

The problem with the property named "property" has just been fixed in XBEAN-107

> Id is required for elements when NOT used as a top-level tag
> ------------------------------------------------------------
>
>                 Key: XBEAN-106
>                 URL: https://issues.apache.org/jira/browse/XBEAN-106
>             Project: XBean
>          Issue Type: Bug
>          Components: spring
>    Affects Versions: 3.4
>         Environment: xbean-spring-3.4.1
> spring-*-2.5.4
>            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="classpath:jndi.properties" />
> 	</property>
> </bean>
> Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configuration problem: Configuration problem: Id is required for element 'properties' when
used as a top-level tag
> at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
> 	at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
> 	at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:72)
> 	at org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:73)
> 	at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)
> 	at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1253)
> 	at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseNestedCustomElement(BeanDefinitionParserDelegate.java:1302)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.apache.xbean.spring.context.v2c.XBeanBeanDefinitionParserDelegate.internalParseNestedCustomElement(XBeanBeanDefinitionParserDelegate.java:90)
> 	at org.apache.xbean.spring.context.v2c.XBeanBeanDefinitionParserDelegate.parsePropertySubElement(XBeanBeanDefinitionParserDelegate.java:47)
> When using org.springframework.context.support.ClassPathXmlApplicationContext or supplying
and id this problem disappeared.
> * * * IRRELEVANT FYI * * *
> I couldn't get ActiveMQ XBean variant to accept properties at all. 
> <amq:connectionFactory>
> 	<property name="properties">
> 		<util:properties id="foobar" location="classpath:jndi.properties" />
> 	</property>
> </amq:connectionFactory>
> It created PropertyValue named 'property' along with properties which naturally failed
due to missing 'property' named property.
> <amq:connectionFactory>
> 	<util:properties id="foobar" location="classpath:jndi.properties" />
> </amq:connectionFactory>
> 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.


Mime
View raw message