activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bernhard Wellhöfer <Bernhard.Wellhoe...@gaia-group.com>
Subject AW: How to use an embedded broker with spring2.0 and activemq4.1?
Date Tue, 31 Oct 2006 07:31:39 GMT
Hello,

It seems that you define two beans with the name 'default' in your activemq.xml config file.

Cheers,

Bernhard

> -----Ursprüngliche Nachricht-----
> Von: ming616 [mailto:ming616@gmail.com] 
> Gesendet: Dienstag, 31. Oktober 2006 04:40
> An: activemq-users@geronimo.apache.org
> Betreff: How to use an embedded broker with spring2.0 and activemq4.1?
> 
> 
> I got the problem:
> 
> [CollectionFactory] INFO : JDK 1.4+ collections available 
> [XmlBeanDefinitionReader] INFO : Loading XML bean definitions 
> from class path resource [applicationContext.xml] 
> [ClassPathXmlApplicationContext] INFO : Bean factory for 
> application context
> [org.springframework.context.support.ClassPathXmlApplicationCo
> ntext;hashCode=24212267]:
> org.springframework.beans.factory.support.DefaultListableBeanFactory
> defining beans [broker]; root of BeanFactory hierarchy 
> [ClassPathXmlApplicationContext] INFO : 1 beans defined in 
> application context 
> [org.springframework.context.support.ClassPathXmlApplicationCo
> ntext;hashCode=24212267]
> [ClassPathXmlApplicationContext] INFO : Unable to locate 
> MessageSource with name 'messageSource': using default 
> [org.springframework.context.support.DelegatingMessageSource@1006d75]
> [ClassPathXmlApplicationContext] INFO : Unable to locate 
> ApplicationEventMulticaster with name 
> 'applicationEventMulticaster': using default 
> [org.springframework.context.event.SimpleApplicationEventMulti
> caster@bb7465]
> [DefaultListableBeanFactory] INFO : Pre-instantiating 
> singletons in factory 
> [org.springframework.beans.factory.support.DefaultListableBeanFactory
> defining beans [broker]; root of BeanFactory hierarchy] 
> [XBeanXmlBeanDefinitionReader] INFO : Loading XML bean 
> definitions from class path resource [activemq.xml] 
> [DefaultListableBeanFactory] INFO : Destroying singletons in 
> {org.springframework.beans.factory.support.DefaultListableBeanFactory
> defining beans [broker]; root of BeanFactory hierarchy} 
> Exception in thread "main"
> org.springframework.beans.factory.BeanCreationException: 
> Error creating bean with name 'broker' defined in class path 
> resource [applicationContext.xml]:
> Invocation of init method failed; nested exception is
> org.springframework.beans.factory.parsing.BeanDefinitionParsin
> gException:
> Configuration problem: Bean name 'default' is already used in 
> this file.
> Offending resource: class path resource [activemq.xml] Caused by:
> org.springframework.beans.factory.parsing.BeanDefinitionParsin
> gException:
> Configuration problem: Bean name 'default' is already used in 
> this file.
> Offending resource: class path resource [activemq.xml]
> 	at
> org.springframework.beans.factory.parsing.FailFastProblemRepor
> ter.error(FailFastProblemReporter.java:57)
> 	at
> org.springframework.beans.factory.parsing.ReaderContext.error(
> ReaderContext.java:64)
> 	at
> org.springframework.beans.factory.parsing.ReaderContext.error(
> ReaderContext.java:55)
> 	at
> org.springframework.beans.factory.xml.BeanDefinitionParserDele
> gate.checkNameUniqueness(BeanDefinitionParserDelegate.java:452)
> 	at
> org.springframework.beans.factory.xml.BeanDefinitionParserDele
> gate.parseBeanDefinitionElement(BeanDefinitionParserDelegate.java:418)
> 	at
> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.pars
> eBeanFromExtensionElement(XBeanNamespaceHandler.java:208)
> 	at
> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.pars
> eBeanFromExtensionElement(XBeanNamespaceHandler.java:256)
> 	at
> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.pars
> e(XBeanNamespaceHandler.java:152)
> 	at
> org.apache.xbean.spring.context.v2.XBeanNamespaceHandler.parse
> (XBeanNamespaceHandler.java:49)
> 	at
> org.springframework.beans.factory.xml.BeanDefinitionParserDele
> gate.parseCustomElement(BeanDefinitionParserDelegate.java:1147)
> 	at
> org.springframework.beans.factory.xml.BeanDefinitionParserDele
> gate.parseNestedCustomElement(BeanDefinitionParserDelegate.java:1185)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess
> orImpl.java:39)
> 	at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth
> odAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at
> org.apache.xbean.spring.context.v2c.XBeanBeanDefinitionParserD
> elegate.internalParseNestedCustomElement(XBeanBeanDefinitionPa
> rserDelegate.java:94)
> 	at
> org.apache.xbean.spring.context.v2c.XBeanBeanDefinitionParserD
> elegate.parsePropertySubElement(XBeanBeanDefinitionParserDeleg
> ate.java:51)
> 	at
> org.springframework.beans.factory.xml.BeanDefinitionParserDele
> gate.parseListElement(BeanDefinitionParserDelegate.java:935)
> 	at
> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.pars
> eListElement(XBeanNamespaceHandler.java:584)
> 	at
> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.pars
> eNestedPropertyViaIntrospection(XBeanNamespaceHandler.java:577)
> 	at
> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.tryP
> arseNestedPropertyViaIntrospection(XBeanNamespaceHandler.java:546)
> 	at
> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.addN
> estedPropertyElements(XBeanNamespaceHandler.java:515)
> 	at
> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.pars
> eBeanFromExtensionElement(XBeanNamespaceHandler.java:211)
> 	at
> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.pars
> eBeanFromExtensionElement(XBeanNamespaceHandler.java:256)
> 	at
> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.pars
> e(XBeanNamespaceHandler.java:152)
> 	at
> org.apache.xbean.spring.context.v2.XBeanNamespaceHandler.parse
> (XBeanNamespaceHandler.java:49)
> 	
> How i deal with it? Thanks for anyone's help
> --
> View this message in context: 
> http://www.nabble.com/How-to-use-an-embedded-broker-with-sprin
> g2.0-and-activemq4.1--tf2543738.html#a7087775
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> 
> 
> 
> 
> 

Mime
View raw message