我正在尝试将activemq的版本从5.7升级到5.14.5。 我遵循的步骤如下:
下载了5.14.5的新文件
替换为现有的5.7文件。
修改了自定义配置的Activemq.xml,并将ojdbc14.jar添加到lib文件夹中。修改了conf文件夹中的一些自定义文件。
在日志中我收到以下错误:
2018-03-12 09:26:34,077 | INFO | Using Persistence Adapter: JDBCPersistenceAdapter(org.apache.commons.dbcp2.BasicDataSource@66998e4b) | org.apache.activemq.broker.BrokerService | main 2018-03-12 09:26:34,168 | INFO | JMX consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:2017/jmxrmi | org.apache.activemq.broker.jmx.ManagementContext | JMX connector 2018-03-12 09:26:34,565 | WARN | Exception encountered during context initialization - **cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in class path resource [activemq.xml]: Invocation of init method failed; nested exception is java.lang.AbstractMethodError | org.apache.activemq.xbean.XBeanBrokerFactory$1 | main 2018-03-12 09:26:34,579 | ERROR | Failed to load: class path resource** [activemq.xml], reason: Error creating bean with name 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in class path resource [activemq.xml]: Invocation of init method failed; nested exception is java.lang.AbstractMethodError | org.apache.activemq.xbean.XBeanBrokerFactory | main org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in class path resource [activemq.xml]: Invocation of init method failed; nested exception is java.lang.AbstractMethodError at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1572) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480) at org.apache.xbean.spring.context.ResourceXmlApplicationContext.(ResourceXmlApplicationContext.java:64) at org.apache.xbean.spring.context.ResourceXmlApplicationContext.(ResourceXmlApplicationContext.java:52) at org.apache.activemq.xbean.XBeanBrokerFactory$1.(XBeanBrokerFactory.java:104) at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:104) at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:67) 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.runTask(StartCommand.java:87) at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:63) at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:154) at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:63) at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.activemq.console.Main.runTaskClass(Main.java:262) at org.apache.activemq.console.Main.main(Main.java:115) Caused by: java.lang.AbstractMethodError at org.apache.commons.dbcp2.DelegatingConnection.isValid(DelegatingConnection.java:918) at org.apache.commons.dbcp2.DelegatingConnection.isValid(DelegatingConnection.java:918) at org.apache.commons.dbcp2.PoolableConnection.validate(PoolableConnection.java:283) at org.apache.commons.dbcp2.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:357) at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2307) at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2290) at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:2039) at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1533) at org.apache.activemq.store.jdbc.TransactionContext.lockAndWrapped(TransactionContext.java:70) at org.apache.activemq.store.jdbc.TransactionContext.getConnection(TransactionContext.java:63) at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.loadAdapter(JDBCPersistenceAdapter.java:451) at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.createAdapter(JDBCPersistenceAdapter.java:434) at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.getAdapter(JDBCPersistenceAdapter.java:383) at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.init(JDBCPersistenceAdapter.java:296) at org.apache.activemq.broker.LockableServiceSupport.preStart(LockableServiceSupport.java:89) at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:54) at org.apache.activemq.broker.BrokerService.doStartPersistenceAdapter(BrokerService.java:675) at org.apache.activemq.broker.BrokerService.startPersistenceAdapter(BrokerService.java:659) at org.apache.activemq.broker.BrokerService.start(BrokerService.java:623) at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:73) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1700) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1639) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1568)
ActiveMQ.xml如下:
JwtHelperService
答案 0 :(得分:2)
解决方案是我使用ojdbc14.jar,它没有实现此ActiveMQ版本所需的新JDBC API,因此下载" ojdbc6.jar"支持oracle 11g解决了这个问题。
答案 1 :(得分:1)
你有可能降级吗?
的顺序...
- ActiveMQ 5.14.4发布
- ActiveMQ 5.14.5发布
- ActiveMQ 5.15.0发布
...
- ActiveMQ 5.6.0发布
- ActiveMQ 5.7.0发布