You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by novotny <no...@gridsphere.org> on 2007/08/27 21:32:13 UTC
how to configure embedded broker and spring
Hi,
I'm trying to follow the FAQ and I have added the following to Spring
config:
<bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean">
<property name="config" value="conf/discovery.xml" />
<property name="start" value="true" />
</bean>
Does this mean everytime I create an ApplicationContext it will start a
broker? I want some way to just configure the broker with the AMQ config
file and in my code so something like
Broker broker = context.getBean("broker");
broker.start();
But after adding the XML above as listed in the FAQ, I get
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'broker' defined in file
[/Users/novotny/pinksheets/presence/conf/spring.xml]: Instantiation of bean
failed; nested exception is java.lang.NoClassDefFoundError
Caused by: java.lang.NoClassDefFoundError
at
org.apache.activemq.xbean.BrokerFactoryBean.class$(BrokerFactoryBean.java:45)
at
org.apache.activemq.xbean.BrokerFactoryBean.<clinit>(BrokerFactoryBean.java:48)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:85)
Any help is greatly appreciated!
--
View this message in context: http://www.nabble.com/how-to-configure-embedded-broker-and-spring-tf4337811s2354.html#a12356134
Sent from the ActiveMQ - User mailing list archive at Nabble.com.