activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Tully <gary.tu...@gmail.com>
Subject Re: AMQ 5.4.2 schema validation and Spring PropertyPlaceholderConfigurer
Date Fri, 28 Jan 2011 21:11:18 GMT
the only way around this is to change the schema such that the value
is a string rather than a boolean and have a string to boolean
converter.
This reduces the type safety of the schema but does mean that the
property placeholder can work. We have changed most/all of the numeric
values to String for this reason (adding an annotation for the Xbean
schema generator), I guess we can do it for booleans also. Want to
raise a jira issue for this?

In 5.3.0 there was no validation against the schema.

On 28 January 2011 20:53, Joe Niski <joe.niski@nwea.org> wrote:
> i'm working on upgrading from AMQ 5.3.0 to 5.4.2. i'd like to keep schema validation
enabled, so i'm carefully re-ordering the elements in activemq.xml.
>
> Our configuration uses PropertyPlaceholderConfigurer to insert values into activemq.xml.
One of our configured values is of XSD typ "boolean":
>
>        <managementContext>
>            <managementContext createConnector="${enableJmx}" connectorPort="${jmxConnectorPort}"/>
>        </managementContext>
>
>  i'm seeing this error in the console when i run "activemq/bin/activemq-admin start":
>
> ERROR: java.lang.RuntimeException: Failed to execute start task. Reason: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
Line 128 in XML document from class path resource [activemq.xml] is invalid; nested exception
is org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.1: '${enableJmx}' is not a valid
value for 'boolean'.
>
> Other replacement tokens that precede this in the file don't produce errors, but they're
for string or numeric values, not booleans.
>
> Is there any way around this *without* disabling schema validation? i really need to
be able to configure this value outside the xml, and it worked fine in 5.3.0.
>
> thanks in advance,
> Joe
>
> --
>
> Joe Niski
> IS Development |  NWEA
>
> PHONE 503.548.5207  |  FAX 503.639.7873
>
> NWEA.ORG<3D%22http://www.nwea.org/%22>  |  Partnering to Help All Kids Learn
>



-- 
http://blog.garytully.com
http://fusesource.com

Mime
View raw message