activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tonyc <anthony.crem...@dpworld.com>
Subject org.springframework.beans.factory.BeanCreationException
Date Wed, 02 May 2007 10:53:56 GMT

Hi ,
i am a beginner. i'm trying to get ACTIVEMQ to use MYSQL database for
persistence by creating my own
XML config file. when i try starting ActiveMQ it fails.
have included snippets of my config file and error log.

I think it's not able to find the JDBC class for mysql.  I have inculded the
jar file mysql-connector-java-5.0.4-bin.jar
from mysql connector in the classpath. not sure what is the problem. 

thanks in advance.

tony


myconfig.xml:
========

   <persistenceAdapter>
     <!--   <journaledJDBC journalLogFiles="5"
dataDirectory="${activemq.base}/activemq-data"/>  -->
      <!-- To use a different datasource, use the following syntax : -->
      
      <journaledJDBC journalLogFiles="5" dataDirectory="../activemq-data"
dataSource="#mysql-ds"/>
      
    </persistenceAdapter>

 <bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
    <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
    <property name="url"
value="jdbc:mysql://localhost/activemq?relaxAutoCommit=true"/>
    <property name="username" value="pnomg"/>
    <property name="password" value="pnomg"/>
    <property name="poolPreparedStatements" value="true"/>
  </bean>




activemq error log:
=============

C:\jms2\apache-activemq-4.1.1>bin\activemq xbean:file:./conf/myconfig.xml

Warning: JAVA_HOME environment variable is not set.

ACTIVEMQ_HOME: C:\jms2\apache-activemq-4.1.1\bin\..
ACTIVEMQ_BASE: C:\jms2\apache-activemq-4.1.1\bin\..

 Loading message broker from: xbean:file:./conf/myconfig.xml
INFO  BrokerService                  - ActiveMQ 4.1.1 JMS Message Broker
(localhost) is starting
INFO  BrokerService                  - For help or more information please
see: http://incubator.apache.org/activemq/
ERROR BrokerService                  - Failed to start ActiveMQ JMS Message
Broker. Reason: java.io.IOException: Cannot load JDBC driver class
'com.mysql.jdbc.Driver'
java.io.IOException: Cannot load JDBC driver class 'com.mysql.jdbc.Driver'
	at
org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:43)
	at
org.apache.activemq.store.jdbc.TransactionContext.getConnection(TransactionContext.java:62)
	at
org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.createAdapter(JDBCPersistenceAdapter.java:297)
	at
org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.getAdapter(JDBCPersistenceAdapter.java:251)
	at
org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.start(JDBCPersistenceAdapter.java:152)
	at
org.apache.activemq.store.journal.JournalPersistenceAdapter.start(JournalPersistenceAdapter.java:223)
	at
org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerService.java:1251)
	at
org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:1209)
	at
org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:508)
	at org.apache.activemq.broker.BrokerService.start(BrokerService.java:394)
	at
org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java 
-- 
View this message in context: http://www.nabble.com/org.springframework.beans.factory.BeanCreationException-tf3679885s2354.html#a10283801
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message