You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Adam Lewandowski <ad...@alewando.com> on 2007/03/15 22:13:04 UTC

Spring 2.0 schema support

After working around an issue with the schema resolution (see issue 
AMQ-1016), I'm getting a parse error trying to use the 'amq' namespace.
Here's the pared-down application context definition to illustrate the 
issue, based on the example at 
http://activemq.apache.org/spring-support.html

<beans
  xmlns="http://www.springframework.org/schema/beans"
  xmlns:amq="http://activemq.org/config/1.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd
  http://activemq.org/config/1.0 http://activemq.org/config/activemq.xsd">
  <amq:broker useJmx="false" persistent="false">
    <amq:transportConnectors>
      <amq:transportConnector uri="tcp://localhost:0" />
    </amq:transportConnectors>
  </amq:broker>
</beans>

The error that comes out is:
org.xml.sax.SAXParseException: cvc-complex-type.2.4.b: The content of 
element 'amq:transportConnector' is not complete. One of 
'{"http://activemq.org/config/1.0":broker, 
"http://activemq.org/config/1.0":brokerInfo, 
"http://activemq.org/config/1.0":discoveryAgent, 
"http://activemq.org/config/1.0":messageAuthorizationPolicy, 
"http://activemq.org/config/1.0":server, 
"http://activemq.org/config/1.0":taskRunnerFactory, 
WC[##other:"http://activemq.org/config/1.0"]}' is expected.

Does anyone see anything wrong with the broker definition? Or is this a 
schema issue?

Thanks,
Adam Lewandowski





Re: Spring 2.0 schema support

Posted by Adam Lewandowski <ad...@alewando.com>.
James Strachan wrote:
> The XML looks fine; it looks like the XSD is not using optional
> attributes. Which version are you using?
apache-activemq-4.1-20070315.010452-12.zip , from the snapshot repository.


Re: Spring 2.0 schema support

Posted by James Strachan <ja...@gmail.com>.
On 3/15/07, Adam Lewandowski <ad...@alewando.com> wrote:
> After working around an issue with the schema resolution (see issue
> AMQ-1016), I'm getting a parse error trying to use the 'amq' namespace.
> Here's the pared-down application context definition to illustrate the
> issue, based on the example at
> http://activemq.apache.org/spring-support.html
>
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.org/config/1.0"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
>   http://activemq.org/config/1.0 http://activemq.org/config/activemq.xsd">
>   <amq:broker useJmx="false" persistent="false">
>     <amq:transportConnectors>
>       <amq:transportConnector uri="tcp://localhost:0" />
>     </amq:transportConnectors>
>   </amq:broker>
> </beans>
>
> The error that comes out is:
> org.xml.sax.SAXParseException: cvc-complex-type.2.4.b: The content of
> element 'amq:transportConnector' is not complete. One of
> '{"http://activemq.org/config/1.0":broker,
> "http://activemq.org/config/1.0":brokerInfo,
> "http://activemq.org/config/1.0":discoveryAgent,
> "http://activemq.org/config/1.0":messageAuthorizationPolicy,
> "http://activemq.org/config/1.0":server,
> "http://activemq.org/config/1.0":taskRunnerFactory,
> WC[##other:"http://activemq.org/config/1.0"]}' is expected.
>
> Does anyone see anything wrong with the broker definition? Or is this a
> schema issue?

The XML looks fine; it looks like the XSD is not using optional
attributes. Which version are you using?

-- 

James
-------
http://radio.weblogs.com/0112098/