【错误解决】BeanDefinitionStoreException: Failed to read candidate component class: file [mapper.class文件]; nested exception is java.lang.IllegalArgumentException

问题描述:

  “spring-mybatis整合,使用mapper代理开发,通过MapperScannerConfigurer进行mapper扫描”的练习中,出现异常:

  org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [E:\项目\mybatis_spring\bin\cn\itheima\ssm\mapper\UserMapper.class]; nested exception is java.lang.IllegalArgumentException

问题分析:

  我使用的spring是3.2版本的,而编译器是jdk1.8,根据spring官网的说法,要使用java8,只支持spring 4.X以上版本,而spring的使用最低java要求java5及以上,也就是说spring与编译器版本不匹配

问题解决:

  将项目使用的编译器改为1.7版本:

  选中项目右键->properties

通过MapperScannerConfigurer进行mapper扫描

原文地址:https://www.cnblogs.com/gongren/p/9866246.html

时间: 2024-10-12 04:47:55

【错误解决】BeanDefinitionStoreException: Failed to read candidate component class: file [mapper.class文件]; nested exception is java.lang.IllegalArgumentException的相关文章

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [C:\Users\86181\Desktop\0390\0390\assmchaoshicangku\out\artifacts\assmchaoshic

错误信息: - JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning    - Context initialization failed    org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [E:\gold_wo

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [/Users/lonecloud/tomcat/apache-tomcat-7.0.70 2/webapps/myproject/WEB-INF/classes/cn/lone

解决这个报错的解决办法: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [/Users/lonecloud/tomcat/apache-tomcat-7.0.70 2/webapps/myproject/WEB-INF/classes/cn/lonecloud/dao/Impl/UserDaoImpl.class]; ne

HTTP Status 500 - Request processing failed; nested exception is java.lang.IllegalArgumentException: Control character in cookie value or attribute.

1 HTTP Status 500 - Request processing failed; nested exception is java.lang.IllegalArgumentException: Control character in cookie value or attribute. 2 type Exception report 3 4 message Request processing failed; nested exception is java.lang.Illega

解决nested exception is java.lang.IllegalArgumentException: No converter found for return value of type: class java.util.ArrayList问题

一.背景 最近闲来无事,想自己搭建一套Spring+SpringMVC+Mybatis+Mysql的环境(搭建步骤会在以后博客中给出),结果运行程序时,适用@ResponseBody注解进行返回List<对象>的json数据时出现了:nested exception is java.lang.IllegalArgumentException: No converter found for return value of type: class java.util.ArrayList错误,就细细

异常:Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException

这个异常是出现在注入配置文件中配置好的属性时报错的: Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'my.name' in value "${my.name}" 此时配置文件默认的名称为:application.properties 解决方法: 将配置文件名改为:appli

spring3.2.0与mybatis3.2.7整合出错--Failed to read candidate component class--nested exception is java.lang.IllegalArgumentException

错误信息如下: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [D:\myworkspace\javaweb\20160530-spring_mybatis\bin\com\dzq\ssm\mapper\UserMapper.class]; nested exception is java.lang.IllegalArgu

springmvc遇到问题:org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class:

在运行搭建好的springmvc项目时,出现 org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: 出现这个问题是spring版本与java版本的问题. 需要将spring中的所有的jar包更换. 或者把项目中的java版本改成和jar包适合运行的版本 原文地址:https://www.cnblogs.com/huangcan1688/p/

org.springframework.beans.BeanInstantiationException: Failed to instantiate [demo.Words]: No default constructor found; nested exception is java.lang.NoSuchMethodException: demo.Words.&lt;init&gt;()

org.springframework.beans.BeanInstantiationException: Failed to instantiate [demo.Words]: No default constructor found; nested exception is java.lang.NoSuchMethodException: demo.Words.<init>()或者是: org.springframework.beans.BeanInstantiationException

解决Handler dispatch failed; nested exception is java.lang.NoSuchMethodError

1.操作 项目重新打包后,程序就找不到对应的方法 2.现象(错误信息) Handler dispatch failed; nested exception is java.lang.NoSuchMethodError 3.原因(可能有多种原因,但下面是我这次导致错误的原因) 有2个不同版本的jar同时存在 注:项目的打包都是maven的package,结果发现这种方式不会把同名的另外版本的jar给clean掉,所以之后要先clean再package 4.解决 删除掉老版本的jar 原文地址:ht