activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Piers Geyman <piers.gey...@gta-travel.com>
Subject Re: Example Spring XML doesn't work
Date Mon, 25 Sep 2006 11:05:59 GMT

Hi,

I have the same issue. I updated my activemq jars to use version
4.1-SNAPSHOT (as there does not seem to be a 4.1 release yet) and I still
get the same problem.

I am using: 
* Spring version 2.0-rc3 (jar: spring-2.0-rc3.jar)
* Active MQ 4.1-SNAPSHOT (jars: activeio-core-3.0-SNAPSHOT.jar,
activemq-core-4.1-SNAPSHOT.jar)
* xbean-spring 2.6  (jar: xbean-spring-2.6.jar)

I am running under Tomcat 5.5.17 on Sun JDK version:  1.5.0_07-b03 (on
windows)

I have created an activemq.xml that has a root element of beans with name
space declarations: 

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://people.apache.org/repository/org.apache.activemq/xsds/activemq-core-4.1-incubator-SNAPSHOT.xsd"

And a simple broker configured using amq:broker element as per the sample on
the web site.
I have loaded the activemq.xml into spring using the contextConfigLocation
context-param in the web.xml.

When the web application loads, and spring initializes I get the same error
and stacktrace as below.
Any suggestions? Would this be an xml version issue?

Thanks and regards

Piers


James.Strachan wrote:
> 
> On 9/21/06, C. Benson Manica <ataru@sdf.lonestar.org> wrote:
>> On Thu, Sep 21, 2006 at 04:13:59PM +0100, James Strachan wrote:
>> > On 9/21/06, C. Benson Manica <ataru@sdf.lonestar.org> wrote:
>> > >I am not an XML guru by any stretch, but I have been trying for the
>> > >better part of an hour to come up with a Spring XML file that
>> > >configures ActiveMQ, with no success.  Out of the box, the
>> > >configuration at
>> > >
>> >
>> >http://www.activemq.org/site/how-do-i-embed-a-broker-inside-a-connection.html
>> > >
>> > >gives me
>> > >
>> > >     [java] Exception in thread "main"
>> > >     org.springframework.beans.factory.BeanDef
>> > >initionStoreException: Line 4107 in XML document from class path
>> resource
>> > >[Activ
>> > >eMQ.xml] is invalid; nested exception is
>> org.xml.sax.SAXParseException:
>> > >cos-nona
>> > >mbig: "http://activemq.org/config/1.0":redeliveryPolicy and WC[##any]
>> (or
>> > >elemen
>> > >ts from their substitution group) violate "Unique Particle
>> Attribution".
>> > >During
>> > >validation against this schema, ambiguity would be created for those
>> two
>> > >particl
>> > >es.
>> > >     [java] Caused by: org.xml.sax.SAXParseException: cos-nonambig:
>> > >     "http://acti
>> > >vemq.org/config/1.0":redeliveryPolicy and WC[##any] (or elements from
>> > >their subs
>> > >titution group) violate "Unique Particle Attribution". During
>> validation
>> > >against
>> > > this schema, ambiguity would be created for those two particles.
>> >
>> > So the example on that page does not use any XSDs - so I'm wondering
>> > what your XML actually looks like? Also what is the version of
>> > ActiveMQ / xbean / spring that you are using?
>>
>> Scroll down a little on the page - I am using the Spring 2.0 example
>> XML, which does use XSD's.
> 
> You're XML didn't make it to the Apache mailing list - I guess nabble
> removed it.
> 
> 
>> I'm using Spring 2.0 RC4, ActiveMQ 4.0.1, and xbean-spring-2.6.  Am I
>> missing a jar?
> 
> Unfortuantely 4.0.x doesn't support Spring 2 - I suspect you'll need to
> use 4.1.
> -- 
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 
> 

-- 
View this message in context: http://www.nabble.com/Example-Spring-XML-doesn%27t-work-tf2312387.html#a6484280
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message