异常详情

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'connectionFactory': Lookup method resolution failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [org.springframework.jms.connection.SingleConnectionFactory] from ClassLoader [ParallelWebappClassLoader

context: ROOT
delegate: false
----------> Parent Classloader:
java.net.URLClassLoader@31206beb
]

Caused by: java.lang.IllegalStateException: Failed to introspect Class [org.springframework.jms.connection.SingleConnectionFactory] from ClassLoader [ParallelWebappClassLoader
context: ROOT
delegate: false
----------> Parent Classloader:
java.net.URLClassLoader@31206beb
]

Caused by: java.lang.ClassNotFoundException: javax.jms.JMSContext

分析

创建connectionFactory失败 → 创建SingleConnectionFactory失败 → 找不到JMSContext类

配置文件中,创建的是CachingConnectionFactory,它是SingleConnectionFactory的子类,而SingleConnectionFactory类中用到了一个叫JMSContext的类,现在最根本的原因就在于找不到这个类。既然以前同样的配置没问题,现在这样的配置找不到某个类,首先怀疑的就是版本问题。果然,以前的项目中用的spring4,那时候的SingleConnectionFactory并不需要JMSContext;而现在用的spring5,添加了关于这个类的返回值。JMSContext类属于javax.jms包,原来用的是1.1版本,更新成2版的即可:

spring整合activeMQ遇到异常:Error creating bean with name 'connectionFactory'的更多相关文章

  1. Spring 异常:Error creating bean with name

    异常信息:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xxx' 我今 ...

  2. Spring Boot 报错:Error creating bean with name 'entityManagerFactory' defined in class path resource

    spring boot 写一个web项目,在使用spring-data-jpa的时候,启动报如下错误: Error starting ApplicationContext. To display th ...

  3. 整合mybatis和spring时 Error creating bean with name 'sqlSessionFactory' defined in class path resource

    今天在整合mybatis和spring的时候出的错 报错如下 Exception in thread "main" org.springframework.beans.factor ...

  4. 开发Spring过程中几个常见异常(二):Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'a' define

    本异常是小编在运行自己另外一篇博文中的例子时遇到的.(附博文:http://www.cnblogs.com/dudududu/p/8482487.html) 完整异常信息: 警告: Exception ...

  5. Java AOP nested exception is java.lang.NoClassDefFoundError: org/aopalliance/aop/Advice || Error creating bean with name 'org.springframework.aop.aspectj.AspectJPointcutAdvisor#0' 两个异常解决办法

    贴出applicationContext.xml <?xml version="1.0" encoding="UTF-8"?> <beans ...

  6. ssh整合报错严重: Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xxx'

    错误描述:eclipse整合ssh的时候 报不能创建名字为xxx的对象 信息: Destroying singletons in org.springframework.beans.factory.s ...

  7. mvn ssm 异常 org.springframework.beans.factory.BeanCreationException:Error creating bean with name 'multipartResolver'

    解决方案: 添加 commons-fileupload-1.2.jar <!-- https://mvnrepository.com/artifact/commons-fileupload/co ...

  8. 错误/异常:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/classes/beans_common.xml]...的解决方法

    1.第一个这种类型的异常 1.1.异常信息:org.springframework.beans.factory.BeanCreationException: Error creating bean w ...

  9. jasypt在springboot项目中遇到异常:Error creating bean with name 'enableEncryptablePropertySourcesPostProcessor' defined in class path resource

    背景 在使用jasypt对spring boot的配置文件中的敏感信息进行加密处理时,使用stater直接启动时,遇到了一个异常 <dependency> <groupId>c ...

随机推荐

  1. python、mysql四-2:多表查询

    一 介绍 本节主题 多表连接查询 复合条件连接查询 子查询 准备表 #建表 create table department( id int, name varchar() ); create tabl ...

  2. centos 7 安装 redis-5.0.5

    [root@localhost ~]# yum -y install gcc make [root@localhost ~]# wget http://download.redis.io/releas ...

  3. python jdbc连接 oracle 数据库

    准备写一个代码生成的小工具自己用,第一步,连接数据库 import jaydebeapi url = 'jdbc:oracle:thin:@192.168.0.13:1521:JGD' user = ...

  4. Systemctl和service、chkconfig命令的关系

      systemctl命令:是一个systemd工具,主要负责控制systemd系统和服务管理器. service命令:可以启动.停止.重新启动和关闭系统服务,还可以显示所有系统服务的当前状态. ch ...

  5. 多线程与UI操作(一)

    C#中禁止跨线程直接访问控件,InvokeRequired是为了解决这个问题而产生的,当一个控件的InvokeRequired属性值为真时,说明有一个创建它以外的线程想访问它. 此时它将会在内部调用n ...

  6. 【SDOI 2014】数表

    题意 https://loj.ac/problem/2193 题解 ​显然就是求 $\sum\limits_{i=1}^{n} \sum\limits_{j=1}^{m} \sigma_1(\gcd{ ...

  7. 【每日一包0008】arr-diff

    [github地址:https://github.com/ABCDdouyae...] arr-diff 多个数组比较,过滤出第一个数组独有的内容 用法:arr-diff(arr1, arr2, ar ...

  8. 最近老是有兄弟问我,Vue双向绑定的原理,以及简单的原生js写出来实现,我就来一个最简单的双向绑定,原生十行代码让你看懂原理

    废话不多说直接看效果图 代码很好理解,但是在看代码之前需要知道Vue双向绑定的原理其实就是基于Object.defineProperty 实现的双向绑定 官方传送门 这里我们用官方的话来说Object ...

  9. mybatis解析和基本运行原理

    Mybatis的运行过程分为两大步: 第1步,读取配置文件缓存到Configuration对象,用于创建SqlSessionFactory: 第2步,SqlSession的执行过程.相对而言,SqlS ...

  10. 暑假集训#2 div1 J 四点直角 J - Space Invader 四点共面+跨立实验

    题意:给你四个点,判断能否先依次通过A,B两点,然后再在某个地方只进行一次直角转弯再一次经过C,D两点: #include <iostream> #include <cstdio&g ...