2 qq 29329157 qq_29329157 于 2017.01.03 11:02 提问

activeMq与Spring整合

10:58:36,290 DEBUG DefaultListableBeanFactory:242 - Ignoring bean class loading failure for bean 'connectionFactory'
org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.apache.activemq.spring.ActiveMQConnectionFactory] for bean with name 'connectionFactory' defined in class path resource [applicationContext.xml]: problem with class file or dependent class; nested exception is java.lang.UnsupportedClassVersionError: org/apache/activemq/spring/ActiveMQConnectionFactory : Unsupported major.minor version 51.0 (unable to load class org.apache.activemq.spring.ActiveMQConnectionFactory)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1144)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:524)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1177)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:222)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:505)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:362)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5068)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5584)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1260)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:2002)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.UnsupportedClassVersionError: org/apache/activemq/spring/ActiveMQConnectionFactory : Unsupported major.minor version 51.0 (unable to load class org.apache.activemq.spring.ActiveMQConnectionFactory)
at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:3129)
at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:1341)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1827)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1701)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:211)
at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:385)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1138)
... 22 more
10:58:36,319 DEBUG DefaultListableBeanFactory:242 - Ignoring bean class loading failure for bean 'connectionFactory'
org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.apache.activemq.spring.ActiveMQConnectionFactory] for bean with name 'connectionFactory' defined in class path resource [applicationContext.xml]: problem with class file or dependent class; nested exception is java.lang.UnsupportedClassVersionError: org/apache/activemq/spring/ActiveMQConnectionFactory : Unsupported major.minor version 51.0 (unable to load class org.apache.activemq.spring.ActiveMQConnectionFactory)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1144)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:524)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1177)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:222)
at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:563)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:365)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5068)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5584)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1260)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:2002)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.UnsupportedClassVersionError: org/apache/activemq/spring/ActiveMQConnectionFactory : Unsupported major.minor version 51.0 (unable to load class org.apache.activemq.spring.ActiveMQConnectionFactory)
at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:3129)
at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:1341)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1827)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1701)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:211)
at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:385)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1138)
... 22 more

    报错部分以上,然而在我同事的电脑上可以正常运行,请教这是出现了什么问题呢

3个回答

qq_29329157
qq_29329157   2017.01.04 14:46
已采纳

昨天找到了问题所在,JDK1.6版本不支持activemq-all-5.11.1jar,这个包需要用JDK1.7,

caozhy
caozhy   Ds   Rxr 2017.01.03 11:04
qq_29329157
qq_29329157 你指的是我的包有问题吗,包应该是没问题的
一年多之前 回复
sinat_35134348
sinat_35134348   2017.01.03 12:32

提示你使用了一个未导入的接口,就是jar包引入错误

sinat_35134348
sinat_35134348 就几个C币,采纳自己的又不会还给你。。。你这人真小气
一年多之前 回复
qq_29329157
qq_29329157 恩,也可以说是包错了,换个低版本的用JDK1.6的包也是可以的
一年多之前 回复
sinat_35134348
sinat_35134348 刚开始工作?
一年多之前 回复
qq_29329157
qq_29329157 与这个是否有关呢,因为项目是SVN上检出的,jar包应当不会有错才对
一年多之前 回复
qq_29329157
qq_29329157 org/apache/activemq/spring/ActiveMQConnectionFactory : Unsupported major.minor version 51.0
一年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!
其他相关推荐
Spring整合ActiveMQ实现简单的消息队列
Spring整合ActiveMQ实现简单的消息队列 JMS简介 JMS(Java Message Service),Java消息服务。主要用于在生产者和消费者之间进行消息传送,生产者负责生产消息,消费者负责接收处理消息。在实际的业务中,生产者生成消息,发送消息,消息会保存到ActiveMQ队列中,对应的消费者会接收消息,完成特定的业务逻辑。消息的传递模型有两种,一种是点对点,一个生产者对应一个
spring 整合 activemq 配置文件
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springfram
Spring整合activemq
Spring整合activemq。。。。。。。。。。。。。。。。。。。。
ActiveMQ实例
activemq与spring整合,activemq与swing整合 activemq与ajax整合
Spring和ActiveMQ整合的完整实例
Spring和ActiveMQ整合的完整实例
ActiveMQ安装使用与spring整合配置教程
1      ActiveMQ介绍 1.1    什么是ActiveMQ          ActiveMQ是Apache出品,最流行的,能力强劲的开源消息总线。ActiveMQ 是一个完全支持JMS1.1和J2EE 1.4规范的 JMS Provider实现,尽管JMS规范出台已经是很久的事情了,但是JMS在当今的J2EE应用中间仍然扮演着特殊的地位。 主要特点: 1. 多种语言和协议编
Spring整合JMS——基于ActiveMQ实现(附源码)
声明:本文转载地址:http://elim.iteye.com/blog/1893038,如不能转载,请联系博主。 此源码非彼源码,如需下载原文源码,请访问原文链接。 此源码是博主经过改造测试的,可以配合此文章阅读。地址:去下载JMS简介JMS的全称是Java Message Service,即Java消息服务。它主要用于在生产者和消费者之间进行消息传递,生产者负责产生消息,而消费者负责接收消息
activemq使用系列: spring与activemq的整合
我们先从消息生产者这一端开始整合 创建一个maven工程结构如下 我的pom文件如下 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.o
ActiveMQ与Spring的整合
ActiveMQ是遵循jms规范编写的,所以单独使用ActiveMQ时,步骤稍微有点繁琐,但又比较死板。但ActiveMQ可以与spring完美整合,整合后,ActiveMQ的使用就相当方便了。目前企业开发绝大多数用到spring,所以ActiveMQ与Spring的整合过程有必要学习。接下来笔者详细带大家学习ActiveMQ与Spring的整合过程。(笔者建议读者先阅读笔者之前写过文章,了解Ac...
maven-spring-activemq
spring整合activemq单点测试