You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by ming616 <mi...@gmail.com> on 2006/10/31 03:02:58 UTC

Another problem?

I build activemq4.1 sucessfully, but when i run it, I got another problem?
What's the problem?

[ClassPathXmlApplicationContext] INFO : 1 beans defined in application
context
[org.springframework.context.support.ClassPathXmlApplicationContext;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.SimpleApplicationEventMulticaster@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.BeanDefinitionStoreException: Failed to
load type: broker. Reason: java.lang.ClassNotFoundException: broker; nested
exception is java.lang.ClassNotFoundException: broker
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException:
Failed to load type: broker. Reason: java.lang.ClassNotFoundException:
broker; nested exception is java.lang.ClassNotFoundException: broker
Caused by: java.lang.ClassNotFoundException: broker
	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
	at
org.apache.xbean.spring.context.v2c.XBeanQNameHelper.loadClass(XBeanQNameHelper.java:107)
	at
org.apache.xbean.spring.context.v2c.XBeanQNameHelper.getBeanInfo(XBeanQNameHelper.java:72)
	at
org.apache.xbean.spring.context.v2c.XBeanQNameHelper.coerceNamespaceAwarePropertyValues(XBeanQNameHelper.java:54)
	at
org.apache.xbean.spring.context.v2c.XBeanBeanDefinitionParserDelegate.parseBeanDefinitionElement(XBeanBeanDefinitionParserDelegate.java:63)
	at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseBeanDefinitionElement(BeanDefinitionParserDelegate.java:421)
	at
org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:208)
	at
org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:256)
	at
org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:152)
	at org.apache.xbean.spring.
-- 
View this message in context: http://www.nabble.com/Another-problem--tf2543468.html#a7087005
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: AW: Another problem?

Posted by ming616 <mi...@gmail.com>.
Thank you,James. I sloved this problem with your help. Thank you again! :)

James.Strachan wrote:
> 
> what does your activemq.xml look like? It can't be the one you quote
> as taht doesn't contain a bean named 'default'
> 
> On 10/31/06, ming616 <mi...@gmail.com> wrote:
>>
>> I don't think so. Now it's to be another problem.
>> This is my applicationContext.xml
>>
>> <beans
>>         xmlns="http://www.springframework.org/schema/beans"
>>         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">
>>         <bean
>>                 id="springBrokerId"
>>                 class="org.apache.activemq.xbean.BrokerFactoryBean">
>>                 <property
>>                         name="config"
>>                         value="classpath:activemq.xml" />
>>                 <property
>>                         name="start"
>>                         value="true" />
>>         </bean>
>> </beans>
>>
>> The activemq.xml is the
>> https://svn.apache.org/repos/asf/incubator/activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/xbean/activemq.xml
>> But  the problem is
>> [ClassPathXmlApplicationContext] INFO : Bean factory for application
>> context
>> [org.springframework.context.support.ClassPathXmlApplicationContext;hashCode=24212267]:
>> org.springframework.beans.factory.support.DefaultListableBeanFactory
>> defining beans [springBrokerId]; root of BeanFactory hierarchy
>> [ClassPathXmlApplicationContext] INFO : 1 beans defined in application
>> context
>> [org.springframework.context.support.ClassPathXmlApplicationContext;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.SimpleApplicationEventMulticaster@bb7465]
>> [DefaultListableBeanFactory] INFO : Pre-instantiating singletons in
>> factory
>> [org.springframework.beans.factory.support.DefaultListableBeanFactory
>> defining beans [springBrokerId]; 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 [springBrokerId]; root of BeanFactory hierarchy}
>> Exception in thread "main"
>> org.springframework.beans.factory.BeanCreationException: Error creating
>> bean
>> with name 'springBrokerId' defined in class path resource
>> [applicationContext.xml]: Invocation of init method failed; nested
>> exception
>> is
>> org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
>> 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.BeanDefinitionParsingException:
>> Configuration problem: Bean name 'default' is already used in this file.
>> Offending resource: class path resource [activemq.xml]
>>         at
>> org.springframework.beans.factory.parsing.FailFastProblemReporter.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.BeanDefinitionParserDelegate.checkNameUniqueness(BeanDefinitionParserDelegate.java:452)
>>         at
>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseBeanDefinitionElement(BeanDefinitionParserDelegate.java:418)
>>         at
>> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:208)
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Another-problem--tf2543468.html#a7090983
>> 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/Another-problem--tf2543468.html#a7106388
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: AW: Another problem?

Posted by James Strachan <ja...@gmail.com>.
what does your activemq.xml look like? It can't be the one you quote
as taht doesn't contain a bean named 'default'

On 10/31/06, ming616 <mi...@gmail.com> wrote:
>
> I don't think so. Now it's to be another problem.
> This is my applicationContext.xml
>
> <beans
>         xmlns="http://www.springframework.org/schema/beans"
>         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">
>         <bean
>                 id="springBrokerId"
>                 class="org.apache.activemq.xbean.BrokerFactoryBean">
>                 <property
>                         name="config"
>                         value="classpath:activemq.xml" />
>                 <property
>                         name="start"
>                         value="true" />
>         </bean>
> </beans>
>
> The activemq.xml is the
> https://svn.apache.org/repos/asf/incubator/activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/xbean/activemq.xml
> But  the problem is
> [ClassPathXmlApplicationContext] INFO : Bean factory for application context
> [org.springframework.context.support.ClassPathXmlApplicationContext;hashCode=24212267]:
> org.springframework.beans.factory.support.DefaultListableBeanFactory
> defining beans [springBrokerId]; root of BeanFactory hierarchy
> [ClassPathXmlApplicationContext] INFO : 1 beans defined in application
> context
> [org.springframework.context.support.ClassPathXmlApplicationContext;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.SimpleApplicationEventMulticaster@bb7465]
> [DefaultListableBeanFactory] INFO : Pre-instantiating singletons in factory
> [org.springframework.beans.factory.support.DefaultListableBeanFactory
> defining beans [springBrokerId]; 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 [springBrokerId]; root of BeanFactory hierarchy}
> Exception in thread "main"
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'springBrokerId' defined in class path resource
> [applicationContext.xml]: Invocation of init method failed; nested exception
> is org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
> 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.BeanDefinitionParsingException:
> Configuration problem: Bean name 'default' is already used in this file.
> Offending resource: class path resource [activemq.xml]
>         at
> org.springframework.beans.factory.parsing.FailFastProblemReporter.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.BeanDefinitionParserDelegate.checkNameUniqueness(BeanDefinitionParserDelegate.java:452)
>         at
> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseBeanDefinitionElement(BeanDefinitionParserDelegate.java:418)
>         at
> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:208)
>
>
>
>
> --
> View this message in context: http://www.nabble.com/Another-problem--tf2543468.html#a7090983
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 

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

Re: AW: Another problem?

Posted by ming616 <mi...@gmail.com>.
I don't think so. Now it's to be another problem.
This is my applicationContext.xml

<beans
	xmlns="http://www.springframework.org/schema/beans"
	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">
	<bean
		id="springBrokerId"
		class="org.apache.activemq.xbean.BrokerFactoryBean">
		<property
			name="config"
			value="classpath:activemq.xml" />
		<property
			name="start"
			value="true" />
	</bean>
</beans>

The activemq.xml is the
https://svn.apache.org/repos/asf/incubator/activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/xbean/activemq.xml
But  the problem is 
[ClassPathXmlApplicationContext] INFO : Bean factory for application context
[org.springframework.context.support.ClassPathXmlApplicationContext;hashCode=24212267]:
org.springframework.beans.factory.support.DefaultListableBeanFactory
defining beans [springBrokerId]; root of BeanFactory hierarchy
[ClassPathXmlApplicationContext] INFO : 1 beans defined in application
context
[org.springframework.context.support.ClassPathXmlApplicationContext;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.SimpleApplicationEventMulticaster@bb7465]
[DefaultListableBeanFactory] INFO : Pre-instantiating singletons in factory
[org.springframework.beans.factory.support.DefaultListableBeanFactory
defining beans [springBrokerId]; 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 [springBrokerId]; root of BeanFactory hierarchy}
Exception in thread "main"
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'springBrokerId' defined in class path resource
[applicationContext.xml]: Invocation of init method failed; nested exception
is org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
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.BeanDefinitionParsingException:
Configuration problem: Bean name 'default' is already used in this file.
Offending resource: class path resource [activemq.xml]
	at
org.springframework.beans.factory.parsing.FailFastProblemReporter.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.BeanDefinitionParserDelegate.checkNameUniqueness(BeanDefinitionParserDelegate.java:452)
	at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseBeanDefinitionElement(BeanDefinitionParserDelegate.java:418)
	at
org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:208)




-- 
View this message in context: http://www.nabble.com/Another-problem--tf2543468.html#a7090983
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


AW: Another problem?

Posted by Bernhard Wellhöfer <Be...@gaia-group.com>.
Hello,

Your configuration file applicationContext.xml defines a bean named "broker" which is defined as an instance of the class "broker". The class "broker" does not exists and so the startup fails.

Cheers,

Bernhard

> -----Ursprüngliche Nachricht-----
> Von: ming616 [mailto:ming616@gmail.com] 
> Gesendet: Dienstag, 31. Oktober 2006 03:03
> An: activemq-users@geronimo.apache.org
> Betreff: Another problem?
> 
> 
> I build activemq4.1 sucessfully, but when i run it, I got 
> another problem?
> What's the problem?
> 
> [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.BeanDefinitionStoreException
> : Failed to load type: broker. Reason: 
> java.lang.ClassNotFoundException: broker; nested exception is 
> java.lang.ClassNotFoundException: broker Caused by: 
> org.springframework.beans.factory.BeanDefinitionStoreException:
> Failed to load type: broker. Reason: java.lang.ClassNotFoundException:
> broker; nested exception is java.lang.ClassNotFoundException: 
> broker Caused by: java.lang.ClassNotFoundException: broker
> 	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
> 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> 	at
> org.apache.xbean.spring.context.v2c.XBeanQNameHelper.loadClass
> (XBeanQNameHelper.java:107)
> 	at
> org.apache.xbean.spring.context.v2c.XBeanQNameHelper.getBeanIn
> fo(XBeanQNameHelper.java:72)
> 	at
> org.apache.xbean.spring.context.v2c.XBeanQNameHelper.coerceNam
> espaceAwarePropertyValues(XBeanQNameHelper.java:54)
> 	at
> org.apache.xbean.spring.context.v2c.XBeanBeanDefinitionParserD
> elegate.parseBeanDefinitionElement(XBeanBeanDefinitionParserDe
> legate.java:63)
> 	at
> org.springframework.beans.factory.xml.BeanDefinitionParserDele
> gate.parseBeanDefinitionElement(BeanDefinitionParserDelegate.java:421)
> 	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.
> --
> View this message in context: 
> http://www.nabble.com/Another-problem--tf2543468.html#a7087005
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> 
> 
> 
> 
>