You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by drvillo <f....@gmail.com> on 2006/12/14 12:19:17 UTC

Xbean not working with activemq-4.1

Hi all

I've read some messages around but I still can figure out if the
configuration at
http://www.activemq.org/site/how-do-i-embed-a-broker-inside-a-connection.html
is supposed to work right away.

I'm using activemq-4.1 xbean-spring-2.7 and spring-2.0 (but tried also
spring-2.0.1).
It's related to 
http://www.nabble.com/spring-2.0-example-xml-Invalid--tf2550482.html#a7108762
and 
http://www.nabble.com/Broken-xbeans-XSD-in-4.1-snapshot-tf2416546.html#a6736085

but the xbean bug http://issues.apache.org/jira/browse/XBEAN-57
is marked as fixed for 2.7, which I use.
Is the whole setup supposed to work? For what I read on the activemq pages
it seems so...

Thanks in advance for any help
Francesco Vivoli
-- 
View this message in context: http://www.nabble.com/Xbean-not-working-with-activemq-4.1-tf2819881.html#a7870648
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Xbean not working with activemq-4.1

Posted by Guillaume Nodet <gn...@gmail.com>.
You could do it that way:

        context = new
ClassPathXmlApplicationContext("org/jencks/amqpool/load-test.xml") {
            protected void
initBeanDefinitionReader(XmlBeanDefinitionReader beanDefinitionReader)
{

beanDefinitionReader.setValidationMode(XmlBeanDefinitionReader.VALIDATION_NONE);
                beanDefinitionReader.setNamespaceAware(true);
            }
        };

The other solution is to use the xbean application contexts which
already do that.

On 12/14/06, drvillo <f....@gmail.com> wrote:
>
> Mmh, ok...
> could you tell me how I can do it?
> googling for it I only found out that it's turned on
> by default but no how to disable it.
> I believe is the spring application context that is responsible for
> it but I can't figure out how at the moment...
>
> Thanks a lot
> Francesco
>
>
> gnodet wrote:
> >
> > I don't think ActiveMQ uses xbean-2.8-SNAPSHOT yet.
> > You should disable xml validation, it would be easier.
> >
> > On 12/14/06, drvillo <f....@gmail.com> wrote:
> >>
> >> Thus if I grab the trunk is it going to be solved?
> >> Which other problems I'm likely to encounter
> >> doing so?
> >> Otherwise do you know how long it will take for
> >> the next release to come out?
> >>
> >> Thanks for the info though!
> >>
> >>
> >>
> >> gnodet wrote:
> >> >
> >> > The XSD generated by xbean are not fully compliant.
> >> > This problem has been fixed in xbean trunk and should
> >> > be solved with the next release of xbean.
> >> >
> >> > On 12/14/06, drvillo <f....@gmail.com> wrote:
> >> >>
> >> >> Hi all
> >> >>
> >> >> I've read some messages around but I still can figure out if the
> >> >> configuration at
> >> >>
> >> http://www.activemq.org/site/how-do-i-embed-a-broker-inside-a-connection.html
> >> >> is supposed to work right away.
> >> >>
> >> >> I'm using activemq-4.1 xbean-spring-2.7 and spring-2.0 (but tried also
> >> >> spring-2.0.1).
> >> >> It's related to
> >> >>
> >> http://www.nabble.com/spring-2.0-example-xml-Invalid--tf2550482.html#a7108762
> >> >> and
> >> >>
> >> http://www.nabble.com/Broken-xbeans-XSD-in-4.1-snapshot-tf2416546.html#a6736085
> >> >>
> >> >> but the xbean bug http://issues.apache.org/jira/browse/XBEAN-57
> >> >> is marked as fixed for 2.7, which I use.
> >> >> Is the whole setup supposed to work? For what I read on the activemq
> >> >> pages
> >> >> it seems so...
> >> >>
> >> >> Thanks in advance for any help
> >> >> Francesco Vivoli
> >> >> --
> >> >> View this message in context:
> >> >>
> >> http://www.nabble.com/Xbean-not-working-with-activemq-4.1-tf2819881.html#a7870648
> >> >> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >> >>
> >> >>
> >> >
> >> >
> >> > --
> >> > Cheers,
> >> > Guillaume Nodet
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Xbean-not-working-with-activemq-4.1-tf2819881.html#a7871546
> >> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> > --
> > Cheers,
> > Guillaume Nodet
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Xbean-not-working-with-activemq-4.1-tf2819881.html#a7875513
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet

Re: Xbean not working with activemq-4.1

Posted by drvillo <f....@gmail.com>.
Mmh, ok...
could you tell me how I can do it?
googling for it I only found out that it's turned on 
by default but no how to disable it.
I believe is the spring application context that is responsible for
it but I can't figure out how at the moment...

Thanks a lot
Francesco


gnodet wrote:
> 
> I don't think ActiveMQ uses xbean-2.8-SNAPSHOT yet.
> You should disable xml validation, it would be easier.
> 
> On 12/14/06, drvillo <f....@gmail.com> wrote:
>>
>> Thus if I grab the trunk is it going to be solved?
>> Which other problems I'm likely to encounter
>> doing so?
>> Otherwise do you know how long it will take for
>> the next release to come out?
>>
>> Thanks for the info though!
>>
>>
>>
>> gnodet wrote:
>> >
>> > The XSD generated by xbean are not fully compliant.
>> > This problem has been fixed in xbean trunk and should
>> > be solved with the next release of xbean.
>> >
>> > On 12/14/06, drvillo <f....@gmail.com> wrote:
>> >>
>> >> Hi all
>> >>
>> >> I've read some messages around but I still can figure out if the
>> >> configuration at
>> >>
>> http://www.activemq.org/site/how-do-i-embed-a-broker-inside-a-connection.html
>> >> is supposed to work right away.
>> >>
>> >> I'm using activemq-4.1 xbean-spring-2.7 and spring-2.0 (but tried also
>> >> spring-2.0.1).
>> >> It's related to
>> >>
>> http://www.nabble.com/spring-2.0-example-xml-Invalid--tf2550482.html#a7108762
>> >> and
>> >>
>> http://www.nabble.com/Broken-xbeans-XSD-in-4.1-snapshot-tf2416546.html#a6736085
>> >>
>> >> but the xbean bug http://issues.apache.org/jira/browse/XBEAN-57
>> >> is marked as fixed for 2.7, which I use.
>> >> Is the whole setup supposed to work? For what I read on the activemq
>> >> pages
>> >> it seems so...
>> >>
>> >> Thanks in advance for any help
>> >> Francesco Vivoli
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Xbean-not-working-with-activemq-4.1-tf2819881.html#a7870648
>> >> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>> > --
>> > Cheers,
>> > Guillaume Nodet
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Xbean-not-working-with-activemq-4.1-tf2819881.html#a7871546
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> 
> 

-- 
View this message in context: http://www.nabble.com/Xbean-not-working-with-activemq-4.1-tf2819881.html#a7875513
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Xbean not working with activemq-4.1

Posted by Guillaume Nodet <gn...@gmail.com>.
I don't think ActiveMQ uses xbean-2.8-SNAPSHOT yet.
You should disable xml validation, it would be easier.

On 12/14/06, drvillo <f....@gmail.com> wrote:
>
> Thus if I grab the trunk is it going to be solved?
> Which other problems I'm likely to encounter
> doing so?
> Otherwise do you know how long it will take for
> the next release to come out?
>
> Thanks for the info though!
>
>
>
> gnodet wrote:
> >
> > The XSD generated by xbean are not fully compliant.
> > This problem has been fixed in xbean trunk and should
> > be solved with the next release of xbean.
> >
> > On 12/14/06, drvillo <f....@gmail.com> wrote:
> >>
> >> Hi all
> >>
> >> I've read some messages around but I still can figure out if the
> >> configuration at
> >> http://www.activemq.org/site/how-do-i-embed-a-broker-inside-a-connection.html
> >> is supposed to work right away.
> >>
> >> I'm using activemq-4.1 xbean-spring-2.7 and spring-2.0 (but tried also
> >> spring-2.0.1).
> >> It's related to
> >> http://www.nabble.com/spring-2.0-example-xml-Invalid--tf2550482.html#a7108762
> >> and
> >> http://www.nabble.com/Broken-xbeans-XSD-in-4.1-snapshot-tf2416546.html#a6736085
> >>
> >> but the xbean bug http://issues.apache.org/jira/browse/XBEAN-57
> >> is marked as fixed for 2.7, which I use.
> >> Is the whole setup supposed to work? For what I read on the activemq
> >> pages
> >> it seems so...
> >>
> >> Thanks in advance for any help
> >> Francesco Vivoli
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Xbean-not-working-with-activemq-4.1-tf2819881.html#a7870648
> >> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> > --
> > Cheers,
> > Guillaume Nodet
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Xbean-not-working-with-activemq-4.1-tf2819881.html#a7871546
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet

Re: Xbean not working with activemq-4.1

Posted by drvillo <f....@gmail.com>.
Thus if I grab the trunk is it going to be solved?
Which other problems I'm likely to encounter 
doing so?
Otherwise do you know how long it will take for 
the next release to come out?

Thanks for the info though!



gnodet wrote:
> 
> The XSD generated by xbean are not fully compliant.
> This problem has been fixed in xbean trunk and should
> be solved with the next release of xbean.
> 
> On 12/14/06, drvillo <f....@gmail.com> wrote:
>>
>> Hi all
>>
>> I've read some messages around but I still can figure out if the
>> configuration at
>> http://www.activemq.org/site/how-do-i-embed-a-broker-inside-a-connection.html
>> is supposed to work right away.
>>
>> I'm using activemq-4.1 xbean-spring-2.7 and spring-2.0 (but tried also
>> spring-2.0.1).
>> It's related to
>> http://www.nabble.com/spring-2.0-example-xml-Invalid--tf2550482.html#a7108762
>> and
>> http://www.nabble.com/Broken-xbeans-XSD-in-4.1-snapshot-tf2416546.html#a6736085
>>
>> but the xbean bug http://issues.apache.org/jira/browse/XBEAN-57
>> is marked as fixed for 2.7, which I use.
>> Is the whole setup supposed to work? For what I read on the activemq
>> pages
>> it seems so...
>>
>> Thanks in advance for any help
>> Francesco Vivoli
>> --
>> View this message in context:
>> http://www.nabble.com/Xbean-not-working-with-activemq-4.1-tf2819881.html#a7870648
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> 
> 

-- 
View this message in context: http://www.nabble.com/Xbean-not-working-with-activemq-4.1-tf2819881.html#a7871546
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Xbean not working with activemq-4.1

Posted by drvillo <f....@gmail.com>.
Hi

do you maybe know why the bug is marked as fixed on jira then?
I think is kind of misleading...


gnodet wrote:
> 
> The XSD generated by xbean are not fully compliant.
> This problem has been fixed in xbean trunk and should
> be solved with the next release of xbean.
> 
> On 12/14/06, drvillo <f....@gmail.com> wrote:
>>
>> Hi all
>>
>> I've read some messages around but I still can figure out if the
>> configuration at
>> http://www.activemq.org/site/how-do-i-embed-a-broker-inside-a-connection.html
>> is supposed to work right away.
>>
>> I'm using activemq-4.1 xbean-spring-2.7 and spring-2.0 (but tried also
>> spring-2.0.1).
>> It's related to
>> http://www.nabble.com/spring-2.0-example-xml-Invalid--tf2550482.html#a7108762
>> and
>> http://www.nabble.com/Broken-xbeans-XSD-in-4.1-snapshot-tf2416546.html#a6736085
>>
>> but the xbean bug http://issues.apache.org/jira/browse/XBEAN-57
>> is marked as fixed for 2.7, which I use.
>> Is the whole setup supposed to work? For what I read on the activemq
>> pages
>> it seems so...
>>
>> Thanks in advance for any help
>> Francesco Vivoli
>> --
>> View this message in context:
>> http://www.nabble.com/Xbean-not-working-with-activemq-4.1-tf2819881.html#a7870648
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> 
> 

-- 
View this message in context: http://www.nabble.com/Xbean-not-working-with-activemq-4.1-tf2819881.html#a7889039
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Xbean not working with activemq-4.1

Posted by Guillaume Nodet <gn...@gmail.com>.
The XSD generated by xbean are not fully compliant.
This problem has been fixed in xbean trunk and should
be solved with the next release of xbean.

On 12/14/06, drvillo <f....@gmail.com> wrote:
>
> Hi all
>
> I've read some messages around but I still can figure out if the
> configuration at
> http://www.activemq.org/site/how-do-i-embed-a-broker-inside-a-connection.html
> is supposed to work right away.
>
> I'm using activemq-4.1 xbean-spring-2.7 and spring-2.0 (but tried also
> spring-2.0.1).
> It's related to
> http://www.nabble.com/spring-2.0-example-xml-Invalid--tf2550482.html#a7108762
> and
> http://www.nabble.com/Broken-xbeans-XSD-in-4.1-snapshot-tf2416546.html#a6736085
>
> but the xbean bug http://issues.apache.org/jira/browse/XBEAN-57
> is marked as fixed for 2.7, which I use.
> Is the whole setup supposed to work? For what I read on the activemq pages
> it seems so...
>
> Thanks in advance for any help
> Francesco Vivoli
> --
> View this message in context: http://www.nabble.com/Xbean-not-working-with-activemq-4.1-tf2819881.html#a7870648
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet

Re: Xbean not working with activemq-4.1

Posted by drvillo <f....@gmail.com>.
Mmh
this time I'm the one confused.
under http://people.apache.org/repository/org.apache.activemq/xsds/
there are only -SNAPSHOT XSDs...

I also tried the activemq-4.2 xsd, because of this:
https://issues.apache.org/activemq/browse/AMQ-1014


but it didn't have any effect.




James.Strachan wrote:
> 
> Try not using the snapshot XSD? FWIW the XSD might be now found on the
> classpath
> 
> On 12/14/06, drvillo <f....@gmail.com> wrote:
>>
>> Thanks for the quick reply:)
>>
>> Upps,
>> sorry I forgot the trace -_-
>>
>> it fails like this:
>>
>> org.springframework.beans.factory.BeanDefinitionStoreException: Line 4307
>> in
>> XML document from class path resource [net/ripe/hstcnt/jms-bare/jms.xml]
>> is
>> invalid; nested exception is org.xml.sax.SAXParseException: cos-nonambig:
>> "http://activemq.org/config/1.0":redeliveryPolicy and WC[##any] (or
>> elements
>> from their substitution group) violate "Unique Particle Attribution".
>> During
>> validation against this schema, ambiguity would be created for those two
>> particles.
>> Caused by: org.xml.sax.SAXParseException: cos-nonambig:
>> "http://activemq.org/config/1.0":redeliveryPolicy and WC[##any] (or
>> elements
>> from their substitution group) violate "Unique Particle Attribution".
>> During
>> validation against this schema, ambiguity would be created for those two
>> particles.
>>         at
>> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
>>         at
>> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:172)
>>         at
>> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:382)
>>         at
>> com.sun.org.apache.xerces.internal.impl.xs.XSConstraints.reportSchemaError(XSConstraints.java:315)
>>         at
>> com.sun.org.apache.xerces.internal.impl.xs.XSConstraints.fullSchemaChecking(XSConstraints.java:463)
>>         at
>> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleEndElement(XMLSchemaValidator.java:2246)
>>         at
>> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.endElement(XMLSchemaValidator.java:814)
>>         at
>> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:719)
>>         at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685)
>>         at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
>>         at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
>>         at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
>>         at
>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
>>         at
>> com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:250)
>>         at
>> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)
>>         at
>> org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:77)
>>         at
>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:405)
>>         at
>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:357)
>>         at
>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
>>         at
>> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:126)
>>         at
>> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142)
>>         at
>> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:168)
>>         at
>> org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
>>         at
>> org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:79)
>>         at
>> org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:94)
>>         at
>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:294)
>>         at
>> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:92)
>>         at
>> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:77)
>>         at
>> net.ripe.hstcnt.SpringTestSupport.createApplicationContext(SpringTestSupport.java:37)
>>         at
>> net.ripe.hstcnt.SpringInjectedACTestSupport.<init>(SpringInjectedACTestSupport.java:12)
>>         at
>> net.ripe.hstcnt.xmltest.XBeanConfigTest$XBeanTestSupport.<init>(XBeanConfigTest.java:25)
>>         at
>> net.ripe.hstcnt.xmltest.XBeanConfigTest$XBeanTestSupport.<init>(XBeanConfigTest.java:25)
>>         at
>> net.ripe.hstcnt.xmltest.XBeanConfigTest.testCreateBroker(XBeanConfigTest.java:20)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>         at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>         at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>         at
>> com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:32)
>>
>>
>> while my xml is like:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <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-2.0.xsd
>> http://activemq.org/config/1.0
>> http://people.apache.org/repository/org.apache.activemq/xsds/activemq-core-4.1-incubator-SNAPSHOT.xsd">
>>     <!--  lets create an embedded ActiveMQ Broker -->
>>
>>     <amq:broker useJmx="false" persistent="false">
>>         <amq:transportConnectors>
>>             <amq:transportConnector uri="tcp://localhost:0"/>
>>         </amq:transportConnectors>
>>     </amq:broker>
>>     <!--  ActiveMQ destinations to use  -->
>>     <amq:queue id="destination"
>> physicalName="org.apache.activemq.spring.Test.spring.embedded"/>
>>     <!--
>>      JMS ConnectionFactory to use, configuring the embedded broker using
>> XML
>>     -->
>>     <amq:connectionFactory id="jmsFactory" brokerURL="vm://localhost"/>
>> ...
>> </beans>
>>
>>
>>
>> A note: I had to change the uri for the spring schema to
>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>> because the one given by the examples (without the -2.0) didn't exist.
>>
>>
>> Francesco
>>
>>
>>
>> James.Strachan wrote:
>> >
>> > Am a bit confused - how exactly doesn't it work?
>> >
>> > On 12/14/06, drvillo <f....@gmail.com> wrote:
>> >>
>> >> Hi all
>> >>
>> >> I've read some messages around but I still can figure out if the
>> >> configuration at
>> >>
>> http://www.activemq.org/site/how-do-i-embed-a-broker-inside-a-connection.html
>> >> is supposed to work right away.
>> >>
>> >> I'm using activemq-4.1 xbean-spring-2.7 and spring-2.0 (but tried also
>> >> spring-2.0.1).
>> >> It's related to
>> >>
>> http://www.nabble.com/spring-2.0-example-xml-Invalid--tf2550482.html#a7108762
>> >> and
>> >>
>> http://www.nabble.com/Broken-xbeans-XSD-in-4.1-snapshot-tf2416546.html#a6736085
>> >>
>> >> but the xbean bug http://issues.apache.org/jira/browse/XBEAN-57
>> >> is marked as fixed for 2.7, which I use.
>> >> Is the whole setup supposed to work? For what I read on the activemq
>> >> pages
>> >> it seems so...
>> >>
>> >> Thanks in advance for any help
>> >> Francesco Vivoli
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Xbean-not-working-with-activemq-4.1-tf2819881.html#a7870648
>> >> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>> > --
>> >
>> > James
>> > -------
>> > http://radio.weblogs.com/0112098/
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Xbean-not-working-with-activemq-4.1-tf2819881.html#a7870761
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 
> 

-- 
View this message in context: http://www.nabble.com/Xbean-not-working-with-activemq-4.1-tf2819881.html#a7870925
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Xbean not working with activemq-4.1

Posted by James Strachan <ja...@gmail.com>.
Try not using the snapshot XSD? FWIW the XSD might be now found on the classpath

On 12/14/06, drvillo <f....@gmail.com> wrote:
>
> Thanks for the quick reply:)
>
> Upps,
> sorry I forgot the trace -_-
>
> it fails like this:
>
> org.springframework.beans.factory.BeanDefinitionStoreException: Line 4307 in
> XML document from class path resource [net/ripe/hstcnt/jms-bare/jms.xml] is
> invalid; nested exception is org.xml.sax.SAXParseException: cos-nonambig:
> "http://activemq.org/config/1.0":redeliveryPolicy and WC[##any] (or elements
> from their substitution group) violate "Unique Particle Attribution". During
> validation against this schema, ambiguity would be created for those two
> particles.
> Caused by: org.xml.sax.SAXParseException: cos-nonambig:
> "http://activemq.org/config/1.0":redeliveryPolicy and WC[##any] (or elements
> from their substitution group) violate "Unique Particle Attribution". During
> validation against this schema, ambiguity would be created for those two
> particles.
>         at
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
>         at
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:172)
>         at
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:382)
>         at
> com.sun.org.apache.xerces.internal.impl.xs.XSConstraints.reportSchemaError(XSConstraints.java:315)
>         at
> com.sun.org.apache.xerces.internal.impl.xs.XSConstraints.fullSchemaChecking(XSConstraints.java:463)
>         at
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleEndElement(XMLSchemaValidator.java:2246)
>         at
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.endElement(XMLSchemaValidator.java:814)
>         at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:719)
>         at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685)
>         at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
>         at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
>         at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
>         at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
>         at
> com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:250)
>         at
> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)
>         at
> org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:77)
>         at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:405)
>         at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:357)
>         at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
>         at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:126)
>         at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142)
>         at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:168)
>         at
> org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
>         at
> org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:79)
>         at
> org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:94)
>         at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:294)
>         at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:92)
>         at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:77)
>         at
> net.ripe.hstcnt.SpringTestSupport.createApplicationContext(SpringTestSupport.java:37)
>         at
> net.ripe.hstcnt.SpringInjectedACTestSupport.<init>(SpringInjectedACTestSupport.java:12)
>         at
> net.ripe.hstcnt.xmltest.XBeanConfigTest$XBeanTestSupport.<init>(XBeanConfigTest.java:25)
>         at
> net.ripe.hstcnt.xmltest.XBeanConfigTest$XBeanTestSupport.<init>(XBeanConfigTest.java:25)
>         at
> net.ripe.hstcnt.xmltest.XBeanConfigTest.testCreateBroker(XBeanConfigTest.java:20)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:32)
>
>
> while my xml is like:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <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-2.0.xsd
> http://activemq.org/config/1.0
> http://people.apache.org/repository/org.apache.activemq/xsds/activemq-core-4.1-incubator-SNAPSHOT.xsd">
>     <!--  lets create an embedded ActiveMQ Broker -->
>
>     <amq:broker useJmx="false" persistent="false">
>         <amq:transportConnectors>
>             <amq:transportConnector uri="tcp://localhost:0"/>
>         </amq:transportConnectors>
>     </amq:broker>
>     <!--  ActiveMQ destinations to use  -->
>     <amq:queue id="destination"
> physicalName="org.apache.activemq.spring.Test.spring.embedded"/>
>     <!--
>      JMS ConnectionFactory to use, configuring the embedded broker using XML
>     -->
>     <amq:connectionFactory id="jmsFactory" brokerURL="vm://localhost"/>
> ...
> </beans>
>
>
>
> A note: I had to change the uri for the spring schema to
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
> because the one given by the examples (without the -2.0) didn't exist.
>
>
> Francesco
>
>
>
> James.Strachan wrote:
> >
> > Am a bit confused - how exactly doesn't it work?
> >
> > On 12/14/06, drvillo <f....@gmail.com> wrote:
> >>
> >> Hi all
> >>
> >> I've read some messages around but I still can figure out if the
> >> configuration at
> >> http://www.activemq.org/site/how-do-i-embed-a-broker-inside-a-connection.html
> >> is supposed to work right away.
> >>
> >> I'm using activemq-4.1 xbean-spring-2.7 and spring-2.0 (but tried also
> >> spring-2.0.1).
> >> It's related to
> >> http://www.nabble.com/spring-2.0-example-xml-Invalid--tf2550482.html#a7108762
> >> and
> >> http://www.nabble.com/Broken-xbeans-XSD-in-4.1-snapshot-tf2416546.html#a6736085
> >>
> >> but the xbean bug http://issues.apache.org/jira/browse/XBEAN-57
> >> is marked as fixed for 2.7, which I use.
> >> Is the whole setup supposed to work? For what I read on the activemq
> >> pages
> >> it seems so...
> >>
> >> Thanks in advance for any help
> >> Francesco Vivoli
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Xbean-not-working-with-activemq-4.1-tf2819881.html#a7870648
> >> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> > --
> >
> > James
> > -------
> > http://radio.weblogs.com/0112098/
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Xbean-not-working-with-activemq-4.1-tf2819881.html#a7870761
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 

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

Re: Xbean not working with activemq-4.1

Posted by drvillo <f....@gmail.com>.
Thanks for the quick reply:)

Upps, 
sorry I forgot the trace -_-

it fails like this:

org.springframework.beans.factory.BeanDefinitionStoreException: Line 4307 in
XML document from class path resource [net/ripe/hstcnt/jms-bare/jms.xml] is
invalid; nested exception is org.xml.sax.SAXParseException: cos-nonambig:
"http://activemq.org/config/1.0":redeliveryPolicy and WC[##any] (or elements
from their substitution group) violate "Unique Particle Attribution". During
validation against this schema, ambiguity would be created for those two
particles.
Caused by: org.xml.sax.SAXParseException: cos-nonambig:
"http://activemq.org/config/1.0":redeliveryPolicy and WC[##any] (or elements
from their substitution group) violate "Unique Particle Attribution". During
validation against this schema, ambiguity would be created for those two
particles.
	at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
	at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:172)
	at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:382)
	at
com.sun.org.apache.xerces.internal.impl.xs.XSConstraints.reportSchemaError(XSConstraints.java:315)
	at
com.sun.org.apache.xerces.internal.impl.xs.XSConstraints.fullSchemaChecking(XSConstraints.java:463)
	at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleEndElement(XMLSchemaValidator.java:2246)
	at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.endElement(XMLSchemaValidator.java:814)
	at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:719)
	at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685)
	at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
	at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
	at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
	at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
	at
com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:250)
	at
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)
	at
org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:77)
	at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:405)
	at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:357)
	at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
	at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:126)
	at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142)
	at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:168)
	at
org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
	at
org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:79)
	at
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:94)
	at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:294)
	at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:92)
	at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:77)
	at
net.ripe.hstcnt.SpringTestSupport.createApplicationContext(SpringTestSupport.java:37)
	at
net.ripe.hstcnt.SpringInjectedACTestSupport.<init>(SpringInjectedACTestSupport.java:12)
	at
net.ripe.hstcnt.xmltest.XBeanConfigTest$XBeanTestSupport.<init>(XBeanConfigTest.java:25)
	at
net.ripe.hstcnt.xmltest.XBeanConfigTest$XBeanTestSupport.<init>(XBeanConfigTest.java:25)
	at
net.ripe.hstcnt.xmltest.XBeanConfigTest.testCreateBroker(XBeanConfigTest.java:20)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:32)


while my xml is like:

<?xml version="1.0" encoding="UTF-8"?>
<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-2.0.xsd   
http://activemq.org/config/1.0
http://people.apache.org/repository/org.apache.activemq/xsds/activemq-core-4.1-incubator-SNAPSHOT.xsd">
    <!--  lets create an embedded ActiveMQ Broker -->

    <amq:broker useJmx="false" persistent="false">
        <amq:transportConnectors>
            <amq:transportConnector uri="tcp://localhost:0"/>
        </amq:transportConnectors>
    </amq:broker>
    <!--  ActiveMQ destinations to use  -->
    <amq:queue id="destination"
physicalName="org.apache.activemq.spring.Test.spring.embedded"/>
    <!--
     JMS ConnectionFactory to use, configuring the embedded broker using XML
    -->
    <amq:connectionFactory id="jmsFactory" brokerURL="vm://localhost"/>
...
</beans>



A note: I had to change the uri for the spring schema to
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
because the one given by the examples (without the -2.0) didn't exist.


Francesco



James.Strachan wrote:
> 
> Am a bit confused - how exactly doesn't it work?
> 
> On 12/14/06, drvillo <f....@gmail.com> wrote:
>>
>> Hi all
>>
>> I've read some messages around but I still can figure out if the
>> configuration at
>> http://www.activemq.org/site/how-do-i-embed-a-broker-inside-a-connection.html
>> is supposed to work right away.
>>
>> I'm using activemq-4.1 xbean-spring-2.7 and spring-2.0 (but tried also
>> spring-2.0.1).
>> It's related to
>> http://www.nabble.com/spring-2.0-example-xml-Invalid--tf2550482.html#a7108762
>> and
>> http://www.nabble.com/Broken-xbeans-XSD-in-4.1-snapshot-tf2416546.html#a6736085
>>
>> but the xbean bug http://issues.apache.org/jira/browse/XBEAN-57
>> is marked as fixed for 2.7, which I use.
>> Is the whole setup supposed to work? For what I read on the activemq
>> pages
>> it seems so...
>>
>> Thanks in advance for any help
>> Francesco Vivoli
>> --
>> View this message in context:
>> http://www.nabble.com/Xbean-not-working-with-activemq-4.1-tf2819881.html#a7870648
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 
> 

-- 
View this message in context: http://www.nabble.com/Xbean-not-working-with-activemq-4.1-tf2819881.html#a7870761
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Xbean not working with activemq-4.1

Posted by James Strachan <ja...@gmail.com>.
Am a bit confused - how exactly doesn't it work?

On 12/14/06, drvillo <f....@gmail.com> wrote:
>
> Hi all
>
> I've read some messages around but I still can figure out if the
> configuration at
> http://www.activemq.org/site/how-do-i-embed-a-broker-inside-a-connection.html
> is supposed to work right away.
>
> I'm using activemq-4.1 xbean-spring-2.7 and spring-2.0 (but tried also
> spring-2.0.1).
> It's related to
> http://www.nabble.com/spring-2.0-example-xml-Invalid--tf2550482.html#a7108762
> and
> http://www.nabble.com/Broken-xbeans-XSD-in-4.1-snapshot-tf2416546.html#a6736085
>
> but the xbean bug http://issues.apache.org/jira/browse/XBEAN-57
> is marked as fixed for 2.7, which I use.
> Is the whole setup supposed to work? For what I read on the activemq pages
> it seems so...
>
> Thanks in advance for any help
> Francesco Vivoli
> --
> View this message in context: http://www.nabble.com/Xbean-not-working-with-activemq-4.1-tf2819881.html#a7870648
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 

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