PDA

View Full Version : Default message store (journal+derby) could not be found in the classpath



andre_fernando
Nov 29th, 2005, 02:23 PM
Hi,

I'm initiating into Spring and ActiveMQ.

I'm trying to persist messages but I've been getting this warning message in my Tomcat startup.

2005-11-29 18:02:31,124 WARN [org.activemq.broker.impl.DefaultBroker] - <Default message store (journal+derby) could not be found in the classpath or property 'activemq.persistenceAdapterFactory' not specified so defaulting to use RAM based message persistence>

I tried to configure my database in activemq.xml file, but I think there's something wrong with my bean in applicationContext.xml:


<bean id="jmsConnectionFactory" class="org.activemq.ActiveMQConnectionFactory">
<property name="brokerURL">
<value>vm://localhost</value>
</property>
<property name="useEmbeddedBroker">
<value>true</value>
</property>
<property name="brokerXmlConfig">
<value>com/salvati/teste/jms/activemq.xml</value>
</property>
</bean>

This is my activemq.xml file:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//ACTIVEMQ//DTD//EN" "http://activemq.org/dtd/activemq.dtd">
<beans>
<!-- ================================================== ================== -->
<!-- ActiveMQ Broker Configuration -->
<!-- ================================================== ================== -->
<broker>
<connector>
<tcpServerTransport uri="tcp://localhost:61616"
backlog="1000"
useAsyncSend="false"
maxOutstandingMessages="50"/>
</connector>
<persistence>
<!-- you can point this to a different datasource -->
<jdbcPersistence dataSourceRef="postgress-ds"/>
</persistence>
</broker>


<bean id="postgress-ds"
class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName">
<value>${jdbc.driverClassName}</value>
</property>
<property name="url">
<value>${jdbc.url}</value>
</property>
<property name="username">
<value>${jdbc.username}</value>
</property>
<property name="password">
<value>${jdbc.password}</value>
</property>
<property name="poolPreparedStatements">
<value>true</value>
</property>
</bean>

</beans>


I'm not sure about the places where I can put my activemq.xml file and about the use of file: and classpath: in brokerXmlConfig parameter. I'd like to put it on my WEB-INF/conf/ directory. Can I do this?

Thanks.

Costin Leau
Nov 30th, 2005, 05:07 AM
when using a deploy application is better to rely on the classpath. In this case you can't use WEB-INF/conf as the classpath inside your packed app is WEB-INF/classes/.

andre_fernando
Dec 2nd, 2005, 06:52 AM
Hi,

I've changed my xml file, but it still don't work. I'm trying out ActiveMQ 3.2 with Spring embedded in Tomcat!!!

Does someone have a applicationContext.xml and a activemq.xml file to show me as an example!?

I've also tried a lot of configurations with brokerXmlConfig and brokerContainerFactory properties of ActiveMQConnectionFactory.

Thanks

jstrachan
Dec 2nd, 2005, 10:04 AM
It looks like you've not got all the correct jars on the classpath in your web app.

http://activemq.org/Getting+Started