activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: problems about database when starting a in-vm broker
Date Wed, 11 Apr 2007 19:35:42 GMT
Could you show the entire logs, with debug enabled maybe. I suspect
the mysql database does not have SQL permissions to create the
ActiveMQ SQL schema (which it tries to create by default on startup)


On 4/10/07, hyqgod <hyqgod@163.com> wrote:
>
> i am planning to use spring to start a in-vm activemq broker in tomcat. But
> when i start the tomcat, i get the error messages below in the log file
> which means that i don't create a table for activemq,
>     nested exception is java.io.IOException: Failed to get last broker
> message id: java.sql.SQLException: Table 'activemq.ACTIVEMQ_ACKS' doesn't
> exist org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'org.apache.activemq.xbean.XBeanBrokerService'
> defined in ServletContext resource [/WEB-INF/activemq.xml]: Invocation of
> init method failed; nested exception is java.io.IOException: Failed to get
> last broker message id: java.sql.SQLException: Table
> 'activemq.ACTIVEMQ_ACKS' doesn't exist
> Caused by: java.io.IOException: Failed to get last broker message id:
> java.sql.SQLException: Table 'activemq.ACTIVEMQ_ACKS' doesn't exist
>         at
> org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:31)
>         at
> org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.getLastMessageBrokerSequenceId(JDBCPersistenceAdapter.java:146)
>         at
> org.apache.activemq.store.journal.JournalPersistenceAdapter.getLastMessageBrokerSequenceId(JournalPersistenceAdapter.java:185)
>         at
> org.apache.activemq.broker.region.DestinationFactoryImpl.getLastMessageBrokerSequenceId(DestinationFactoryImpl.java:148)
>         at
> org.apache.activemq.broker.region.RegionBroker.<init>(RegionBroker.java:109)
>         at
> org.apache.activemq.broker.jmx.ManagedRegionBroker.<init>(ManagedRegionBroker.java:100)
>         at
> org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerService.java:1385)
>         at
> org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:1319)
>         at
> org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:521)
>         at
> org.apache.activemq.broker.BrokerService.getAdminConnectionContext(BrokerService.java:1558)
>         at
> org.apache.activemq.broker.BrokerService.startDestinations(BrokerService.java:1544)
>         at org.apache.activemq.broker.BrokerService.start(BrokerService.java:411)
>         at
> org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:47)
>
> i try to find the answer,but get nothing,so could anyone can help me?
>
> by the way: my activemq broker configuration file's content is :
>
>   <?xml version="1.0" encoding="utf-8"?>
> <beans>
>          <bean
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
>          <broker persistent="true" brokerName="localhost" dataDirectory="data"
> xmlns="http://activemq.org/config/1.0" start="true">
>         <destinations>
>                 <queue physicalName="JSI.QUEUE.TEST" />
>                 <topic physicalName="JSI.TOPIC.TEST" />
>         </destinations>
>         <transportConnectors>
>        <transportConnector name="openwire" uri="tcp://localhost:61616"
> discoveryUri="multicast://default"/>
>        <transportConnector name="ssl"     uri="ssl://localhost:61617"/>
>        <transportConnector name="stomp"   uri="stomp://localhost:61613"/>
>        <transportConnector name="xmpp"    uri="xmpp://localhost:61222"/>
>     </transportConnectors>
>
>     <!-- The store and forward broker networks ActiveMQ will listen to -->
>     <networkConnectors>
>       <!-- by default just auto discover the other brokers -->
>       <networkConnector name="default-nc" uri="multicast://default"/>
>     </networkConnectors>
>
>
>     <!-- Use the following if you wish to configure the journal with JDBC
> -->
>     <persistenceAdapter>
>         <journaledJDBC journalLogFiles="5" dataDirectory="activemq-data"
> dataSource="#mysql-ds"/>
>     </persistenceAdapter>
>
>  </broker>
>
>  <!-- lets create a command agent to respond to message based admin commands
> on the ActiveMQ.Agent topic -->
>   <commandAgent  xmlns="http://activemq.org/config/1.0"/>
>
>   <!-- MySql DataSource Sample Setup -->
>    <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://10.10.3.137/activemq?relaxAutoCommit=true"/>
>     <property name="username" value="activemq"/>
>     <property name="password" value="activemq"/>
>     <property name="poolPreparedStatements" value="true"/>
>   </bean>
> </beans>
>
> --
> View this message in context: http://www.nabble.com/problems-about-database-when-starting-a--in-vm-broker-tf3553097s2354.html#a9920108
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 

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

Mime
View raw message