activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Lieber <samuel.lie...@jhuapl.edu>
Subject Beginner problem with ActiveMQ Configuration
Date Fri, 09 Nov 2007 22:35:02 GMT

I am new to ActiveMQ and I need help with initial configuration.  I followed
all the directions and used the default activemq.xml in the distribution.

When I put the activemq.xml in a directory accessible in my classpath (I put
the activemq.xml in WEB-INF/classes):

  <bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean">
    <property name="config"
value="classpath:org/apache/activemq/xbean/activemq.xml" />
  </bean>

I get the following error:
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'broker' defined in ServletContext resource
[/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested
exception is org.springframework.beans.factory.BeanDefinitionStoreException:
Error registering bean with name
'org.apache.activemq.xbean.XBeanBrokerService' defined in class path
resource [org/apache/activemq/xbean/activemq.xml]: Could not resolve
placeholder 'activemq.base'
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException:
Error registering bean with name
'org.apache.activemq.xbean.XBeanBrokerService' defined in class path
resource [org/apache/activemq/xbean/activemq.xml]: Could not resolve
placeholder 'activemq.base'
	at
org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:249)
	at
org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:74)
	at
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:467)
	at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:334)
	at
org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:88)
	at
org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:76)
	at
org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:72)
	at
org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:68)
	at
org.apache.activemq.xbean.BrokerFactoryBean.afterPropertiesSet(BrokerFactoryBean.java:84)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1198)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1167)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)
	at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
	at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
	at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:285)
	at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
	at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:245)
	at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:188)
	at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
	at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)
	at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
	at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
	at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
	at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
	at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
	at org.apache.catalina.core.StandardService.start(StandardService.java:516)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

----

I defined ${activemq.base} in a properties file loaded by my
applicationContext.xml:
  <bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
      <property name="locations">
         <list>
            <value>WEB-INF/conf/webapp.properties</value>
         </list>
      </property>
   </bean>

My webapp.properties:
activemq.base=C:\\devtools\\apache-activemq-4.1.1\

So what did I do wrong?

Thanks,
Sam
-- 
View this message in context: http://www.nabble.com/Beginner-problem-with-ActiveMQ-Configuration-tf4780457s2354.html#a13676370
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message