activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Fernandez <>
Subject Re: Trouble configuring attribute for LDAPAuthorizationMap
Date Fri, 25 Jul 2008 15:27:28 GMT

I am no Spring guru, but it appears to me that MessageFormat is treated as a
complex type and thus needs a custom property editor?

Anyway, I think you can work around the problem as follows

  <!-- Allows us to use system properties as variables in this configuration
file -->
  <!-- <broker brokerName="broker0" xmlns="">
  <broker brokerName="broker0" xmlns="">     
    <jaasAuthenticationPlugin configuration="LdapConfiguration"/>          
	  <bean xmlns=""
		  <property name="queueSearchMatchingFormat"
  <bean xmlns="" 
    id="myQSearchMatchingFormat" class="java.text.MessageFormat">


fredrick255 wrote:
> I'm trying to set the queueSearchMessageFormat and
> topicSearchMessageFormat but when I have these properties I get a spring
> error to the tune of:
> Caused by: org.springframework.beans.TypeMismatchException: Failed to
> convert property value of type [java.lang.String] to required type
> [java.text.MessageFormat] for property 'queueSearchMatchingFormat'; nested
> exception is java.lang.IllegalArgumentException: Cannot convert value of
> type [java.lang.String] to requiredtype [java.text.MessageFormat] for
> property 'queueSearchMatchingFormat': no matching editors or conversion
> strategy found
> I do not understand where MessageFormat is coming from. I do not see this
> anywhere in the activemq-core.xsd. It is used in the LDAPAuthorizationMap
> class but judging from the constructor this conversion is not a problem as
> the MessageFormat member variables are initialized with strings.
>  topicSearchMatchingFormat = new
> MessageFormat("uid={0},ou=topics,ou=destinations,o=ActiveMQ,dc=example,dc=com");
>         queueSearchMatchingFormat = new
> MessageFormat("uid={0},ou=queues,ou=destinations,o=ActiveMQ,dc=example,dc=com");
> If I run the broker without the SeachMessageFormat I can see authorization
> failing due to the fact it is searching in these default locations.
> I thought it was odd that the messageFormat properties are defined as both
> a <spring:bean/> element and an attribute in the XSD for
> LDAPAuthorizationMap. I tried removing the element definition and pointing
> to the modified XSD in the xsi:schemaLocation but I still received the
> same error.
> Any ideas?
> Thanks,
> Fredrick

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message