`

使用ActiveMQ出错.Table 'mq.activemq_acks' doesn't exis

    博客分类:
  • J2EE
阅读更多
2008-08-25 11:44:43,250 [MQ ShutdownHook] INFO  BrokerService                  - ActiveMQ Message Broker (localhost, null) is shutting down
2008-08-25 11:44:43,265 [MQ ShutdownHook] INFO  NetworkConnector               - Network Connector default-nc Stopped
2008-08-25 11:44:43,281 [MQ ShutdownHook] INFO  TransportConnector             - Connector openwire Stopped
2008-08-25 11:44:43,281 [MQ ShutdownHook] INFO  TransportConnector             - Connector ssl Stopped
2008-08-25 11:44:43,281 [MQ ShutdownHook] INFO  TransportConnector             - Connector stomp Stopped
2008-08-25 11:44:43,281 [MQ ShutdownHook] INFO  TransportConnector             - Connector xmpp Stopped
2008-08-25 11:44:43,296 [MQ ShutdownHook] INFO  BrokerService                  - ActiveMQ JMS Message Broker (localhost, null) stopped
2008-08-25 11:47:05,625 [main           ] INFO  BrokerService                  - Using Persistence Adapter: JDBCPersistenceAdaptor(org.apache.commons.dbcp.BasicDataSource@3afb99)
2008-08-25 11:47:05,625 [main           ] INFO  BrokerService                  - ActiveMQ 5.1.0 JMS Message Broker (localhost) is starting
2008-08-25 11:47:05,625 [main           ] INFO  BrokerService                  - For help or more information please see: http://activemq.apache.org/
2008-08-25 11:47:06,046 [main           ] INFO  JDBCPersistenceAdapter         - Database driver recognized: [mysql-ab_jdbc_driver]
2008-08-25 11:47:06,328 [main           ] WARN  DefaultJDBCAdapter             - Could not create JDBC tables; they could already exist. Failure was: CREATE TABLE ACTIVEMQ_ACKS(CONTAINER VARCHAR(250) NOT NULL, SUB_DEST VARCHAR(250), CLIENT_ID VARCHAR(250) NOT NULL, SUB_NAME VARCHAR(250) NOT NULL, SELECTOR VARCHAR(250), LAST_ACKED_ID INTEGER, PRIMARY KEY ( CONTAINER, CLIENT_ID, SUB_NAME)) Message: Specified key was too long; max key length is 1000 bytes SQLState: 42000 Vendor code: 1071
2008-08-25 11:47:06,375 [main           ] INFO  DefaultDatabaseLocker          - Attempting to acquire the exclusive lock to become the Master broker
2008-08-25 11:47:06,390 [main           ] INFO  DefaultDatabaseLocker          - Becoming the master on dataSource: org.apache.commons.dbcp.BasicDataSource@3afb99
2008-08-25 11:47:06,421 [main           ] WARN  JDBCPersistenceAdapter         - Old message cleanup failed due to: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'mq.activemq_acks' doesn't exist
2008-08-25 11:47:06,593 [main           ] ERROR BrokerService                  - Failed to start ActiveMQ JMS Message Broker. Reason: java.io.IOException: Failed to get last broker message id: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'mq.activemq_acks' doesn't exist
java.io.IOException: Failed to get last broker message id: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'mq.activemq_acks' doesn't exist
	at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:33)
	at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.getLastMessageBrokerSequenceId(JDBCPersistenceAdapter.java:148)
	at org.apache.activemq.broker.region.DestinationFactoryImpl.getLastMessageBrokerSequenceId(DestinationFactoryImpl.java:128)
	at org.apache.activemq.broker.region.RegionBroker.<init>(RegionBroker.java:106)
	at org.apache.activemq.broker.jmx.ManagedRegionBroker.<init>(ManagedRegionBroker.java:97)
	at org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerService.java:1595)
	at org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerService.java:1588)
	at org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:1530)
	at org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:540)
	at org.apache.activemq.broker.BrokerService.start(BrokerService.java:444)
	at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:50)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1288)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1257)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:438)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:383)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:353)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:400)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:736)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:369)
	at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:64)
	at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:52)
	at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:96)
	at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:52)
	at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)
	at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
	at org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:111)
	at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:73)
	at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
	at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:129)
	at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
	at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:79)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.activemq.console.Main.runTaskClass(Main.java:222)
	at org.apache.activemq.console.Main.main(Main.java:106)
Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'mq.activemq_acks' doesn't exist
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2941)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1623)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1715)
	at com.mysql.jdbc.Connection.execSQL(Connection.java:3249)
	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1268)
	at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1403)
	at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:91)
	at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:91)
	at org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter.doGetLastMessageBrokerSequenceId(DefaultJDBCAdapter.java:155)
	at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.getLastMessageBrokerSequenceId(JDBCPersistenceAdapter.java:145)
	... 40 more


这个看出是自动创建表出错了.
没有成功创建表activemq_acks.

最后在http://www.java1995.cn/article/495.html中,找到了自动创建三个表的结构信息.
手动创建好三个表,JMS服务才成功运行.!
分享到:
评论

相关推荐

    zis.rar_active MQ_activemq_java activeMQ_java 转发

    在这个"zis.rar_active MQ_activemq_java _activeMQ_java 转发"的压缩包中,我们可以推测其主要内容可能涉及如何使用ActiveMQ在Java环境中实现消息的转发功能。 首先,我们需要理解ActiveMQ的基本概念。ActiveMQ...

    apache-activemq-5.16.5

    3. 根据你的操作系统,运行`bin`目录下的启动脚本,例如在Linux/Unix上是`bin/activemq start`,在Windows上是`bin\activemq.bat start`。 4. 打开浏览器访问`http://localhost:8161/admin`,使用默认凭据(通常为...

    apache-activemq-5.17.3

    在实际使用中,你可能需要根据你的需求修改`conf/activemq.xml`配置文件,设置如网络连接、安全策略、消息队列和主题等参数。同时,通过`bin`目录下的脚本启动和监控ActiveMQ服务,确保其正常运行。 此外,ActiveMQ...

    apache-activemq-5.16.6-bin.zip

    2. **配置**: 修改conf目录下的activemq.xml文件以定制你的消息代理设置。 3. **创建消息生产者和消费者**: 使用JMS API或者支持的其他协议创建应用程序,发送和接收消息。 4. **访问Web Console**: 浏览器中输入`...

    activemq-cpp-library-3.6.0-src.tar.gz_C# ActiveMQ_activemq_activ

    在C#环境中使用ActiveMQ-CPP,通常需要借助.NET Framework的P/Invoke技术或者使用如NMS(.NET Messaging System)这样的包装库。NMS提供了与ActiveMQ-CPP类似的API,使得C#开发者能无缝地与ActiveMQ交互。 6. **C#...

    Spring-ActiveMQ.rar_Spring Activemq_activemq_activemq spring

    &lt;bean id="connectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory"&gt; &lt;property name="brokerURL" value="tcp://localhost:61616" /&gt; &lt;!-- ActiveMQ服务器地址 --&gt; ``` - 创建一个目的地...

    ActiveMQ消息服务器 v5.17.6.zip

    2. **配置**:配置文件默认为conf/activemq.xml,可根据需求调整队列、主题、网络连接等设置。 3. **创建和消费消息**:使用JMS API或者ActiveMQ提供的客户端库,可以创建生产者发送消息,消费者接收消息。 4. **...

    activemq 5.15.15源码包,源码包

    Apache ActiveMQ是业界广泛使用的开源消息中间件,它遵循Java Message Service (JMS) 规范,提供高效、可靠的异步消息传递服务。ActiveMQ 5.15.15是该软件的一个版本,它包含了对之前版本的改进和修复。源码包的分享...

    apache-activemq-5.16.5-bin.tar.gz 下载(5积分)

    ActiveMQ使用AMQP协议集成多平台应用,使用STOMP协议通过websockets在Web应用程序之间交换消息,使用MQTT协议管理物联网设备 ActiviMq消息队列,可解决服务解耦合的动作,缓解了服务并发量很大而造成服务器无法处理...

    test_jms.zip_activemq_activemq案例_jms_jms test

    描述"jms简单的案例,用的activemq,使用jms前请先启动activemq服务器"表明这是一个初级的JMS实践,涉及到使用ActiveMQ作为服务器,而且在运行任何JMS相关的代码之前,需要确保ActiveMQ服务已经启动。 **ActiveMQ与...

    apache-activemq-5.15.12-bin.tar.gz

    4.配置环境变量,配置完环境变量之后在任何地方都可以使用命令 activemq启动 ACTIVEMQ_HOME=/opt/apache-activemq-5.15.12 PATH=/opt/apache-activemq-5.15.12/bin:$PATH export ACTIVEMQ_HOME PATH 5....

    apache-activemq-5.0.0-src.zip_ActiveMQ 源代码_activemq_activemq.src

    Apache ActiveMQ 是一个开源的消息中间件,它是Apache软件基金会下的顶级项目,被广泛应用于企业级分布式应用程序中,用于实现高效、可靠和可扩展的消息传递。这个压缩包`apache-activemq-5.0.0-src.zip`包含了...

    ActiveMQ的activemq.xml详细配置讲解

    **ActiveMQ的activemq.xml配置详解** ActiveMQ是Apache软件基金会开发的一个开源消息代理,它遵循Java消息服务(JMS)规范,提供可靠的消息传递功能。`activemq.xml`是ActiveMQ的核心配置文件,它定义了服务器的...

    ActiveMQ_使用failover模式进行连接切换时,线程断开

    具体来说,是在`org.apache.activemq.transport.failover.FailoverTransport.FailoverTransport()`构造函数中增加一行代码: ```java reconnectTaskFactory.setDaemon(false); ``` 这里的`setDaemon(false)`的作用...

    apache-activemq-5.2.0.zip_activeMq 5.2.0_apache mq

    - conf目录:存放配置文件,如activemq.xml,用于配置broker和各种设置。 - lib目录:包含运行ActiveMQ所需的库文件。 - docs目录:包含API文档和其他技术文档。 - examples目录:包含了一些示例代码,帮助开发者...

    activemq-5.15.15 JDBC持久化mysql8.0+的activemq.xml.pdf

    标题中的“activemq-5.15.15 JDBC持久化mysql8.0+的activemq.xml”指的是Apache ActiveMQ的一个特定版本(5.15.15)配置文件,该配置文件用于实现消息队列的数据持久化,通过JDBC连接MySQL 8.0以上的版本。...

    apache-activemq-5.18.5-bin.zip

    apache-activemq-5.18.5-bin

    message_system_test_report.rar_ActiveMQ java_activemq_httpsqs_me

    本测试报告涉及到多个消息队列服务的安装部署及性能测试,包括ActiveMQ、HTTPSQS、Kestrel和MemcacheQ。下面将对这些知识点进行详细的阐述。 首先,ActiveMQ是Apache软件基金会开发的一款开源消息代理,它是基于...

    activemq安装.pdf

    在G:\apache-activemq-5.2.0\data目录下可以找到activemq.log日志文件,查看日志文件可以了解ActiveMQ的启动过程和错误信息。 日志文件解释 日志文件中记录了ActiveMQ的启动过程和错误信息。例如,日志文件中显示...

Global site tag (gtag.js) - Google Analytics