Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property

PLSQL可以连接Oracle数据库但使用eclipse时连接不上 遇到标题所示问题时,也在网上找了相关的解决方案,比如以下链接: https://blog.csdn.net/King_818/article/details/53034374 我按照博主的博文逐一配置,发现针对我遇到的这个问题还是不起作用,于是继续寻找其他解决方案。 一、报错信息 首先我这里是通过VPN连接客户那边的数据库,在使用PL/SQL时输入正确的数据库访问地址、用户名和密码可以连接到数据库... 阅读详情

来来来,记录一下阿里云Maven中央仓库的坑,当然最主要还是自身pom.xml设置问题。

昨天项目启动还好好的,为什么今天项目一启动就报错了呢?(线上项目服务器没重启的话也是正常可以访问的,只要一重启线上服务器就会发现线上服务器Maven在编译的时候下载了很多新的jar包,当然,线上服务器maven的settings.xml配置文件和本地机子配置的同样使用的是阿里云的maven仓库)

项目是使用的是springboot框架

本地开发环境Maven远程仓库的settings.xml配置文件使用了国内的阿里云中央仓库地址(为了提高下载引入的Jar包速度,懂的都懂)

	<mirrors>
		<!-- mirror | Specifies a repository mirror site to use instead of a igven
			repository. The repository that | this mirror serves has an ID that matches
			the mirrorOf element of this mirror. IDs are used | for inheritance and direct
			lookup purposes, and must be unique across the set of mirrors. | <mirror>
			<id>mirrorId</id> <mirrorOf>repositoryId</mirrorOf> <name>Human Readable
			Name for this Mirror.</name> <url>http://my.repository.com/repo/path</url>
			</mirror> -->
		<!-- 阿里云仓库 -->
		<mirror>
			<id>alimaven</id>
			<mirrorOf>central</mirrorOf>
			<name>aliyun maven</name>
			<url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
		</mirror>

		<mirror>
			<id>alimaven</id>
			<name>aliyun maven</name>
			<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
			<mirrorOf>central</mirrorOf>
		</mirror>
	</mirrors>

刚好今天人家阿里云Maven中央仓库更新了Mybatis最新的jar包,自己项目中的mybatis包也没有写指定版本,所以就导致阿里云Maven远程仓库更新了Mybatis的引入包,而自己项目的pom也导入了阿里云远程仓库的最新Mybatis包导致项目不兼容而导致启动报错

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2022-11-27 17:03:19,287:ERROR main (SpringApplication.java:771) - Application startup failed
 org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'activitiesExhibitionController': Unsatisfied dependency expressed through field 'servletUtil'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'servletUtil': Unsatisfied dependency expressed through field 'userActiveMapper'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userActiveMapper' defined in file [/Users/mac/IdeaProjects/yiwei/shinemi-realiart/target/classes/com/shinemi/realiart/mapper/UserActiveMapper.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:588) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867) ~[spring-context-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) ~[spring-context-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
	at com.shinemi.realiart.Application.main(Application.java:20) [classes/:?]

一步步排查原因:本地连接服务器mysql数据库   正常、springboot扫描Mapper.xml映射文件  正常、但是报错就是提示我需要sql工厂session属性,我就纳闷了,昨天啥都没动,项目启动还好好的,今天怎么就见鬼了呢

解决方法:

去找到项目中pom.xml的mybatis引入jar

        <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>mybatis-spring-boot-starter</artifactId>
            <version>RELEASE</version>
        </dependency>

看到项目中的mybatis的版本号设置了吗?  <version>RELEASE</version>

mybatis引入的jar包没有设置指定版本号,而是使用RELEASE最新发布的版本,所以当阿里云远程中央仓库发布了RELEASE的mybatis Jar包后,本地启动项目经过Maven编译启动后,自动下载阿里云远程的最新Mybatis的发布版本Jar引入导致项目不兼容

所以我这里要修改Mybatis使用指定版本号的jar包

使用了2.1.1版本的试试

        <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>mybatis-spring-boot-starter</artifactId>
            <version>2.1.1</version>
        </dependency>

设置好指定版本号后,Maven重新导入Jar包,启动项目成功!!!

以后还是尽量设置指定的版本号吧,别用RELEASE最新发布版本的Jar了。

我真的哭死,搞了一天排查原因.....

Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Fa Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: ‘file [C:\Users\82784\IdeaProjects\spring-study\spring-10-mybatis\target\classes\com\fj\dao\UserMapper.xml]’; IllegalArgumen 阅读详情

相关推荐

详细解决redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool

redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool的多种详细的解决方法

念兮为美 1万+

Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property报错

java, springboot, springcloud里的报错,有关于@MapperScan和@ComponentScan的操作,Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property报错

soulwirter的博客 3万+

江科大笔记—OLED调试工具

OLED介绍及调试工具

m0_62005595的博客 654

Invocation of init method failed nested exception is java lang IllegalState

项目出现Invocation of init method failed; nested exception is java.lang.IllegalState 报错可能是你的Controller里面的方法@RequestMapper注解里面的路径出现重复或者xml配置文件sql语句id重复了。不限同一个类里面,可能在两个Controller类里面有相同的路径,xml文件也一样 ...

m0_67265464的博客 2万+

SikuliX实战:5分钟搞定游戏挂机脚本(附防检测思路与Python集成技巧)

本文详细介绍了如何使用SikuliX快速开发游戏挂机脚本,包括环境配置、基础原理、防检测策略及Python集成技巧。通过实战案例展示如何实现自动化任务、高级防检测方案,并结合Python提升脚本性能与智能度,帮助玩家高效完成重复性游戏操作。

weixin_33228769的博客 332

保姆级CVE-2018-17066漏洞复现 DLink命令注入漏洞(更新完结)

之后按照之前复现的方式一样 我们丢到kali中执行binwalk解析。之后为了模拟 可以在kali里安装qemu-mipsel。在bin目录下可以尝试将goahead的环境搭配好。固件官网可以进行下载。

weixin_51339377的博客 878

Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property ‘

记一次踩坑 SpringBoot2.2.5 + mybatis-plus 启动出现异常 org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘adminUserMapper’ defined in file [D:\document\T\T-service-user\target\classes\com\wy\user\mapper\AdminUserMapper.class]: In

图图是只猫 1万+

VASPKIT绘制平面平均电荷差分密度

平面平均密度差(planar-averaged electron density difference)是密度差的衍生。密度差是个三维空间函数,经常通过绘制平面图、等值面图方式图形化考察。虽然这两种图很直观,但平面图会受到截面选取的影响,而等值面图会受到等值面数值(isovalue)选取的影响,因此都有一定任意性,也不容易定量讨论。对于电子转移有比较明确方向的情况,可以绘制平面平均密度差曲线,由此可以清楚地考察垂直于选取的方向上每个截面上的密度差积分值,在定量讨论、对比上比较便利。

weixin_43948934的博客 1万+

Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property '...

在进行 SSI整合时,总是报下边的错误:nested exception is java.lang.IllegalArgumentException: Property 'sqlMapClient' is required 详细的错误信息如下: org.springframework.beans.factory.BeanCreationException: Error creating b...

weixin_30352191的博客 1万+

Ansys CFX Pre 中 RGP 表的高级配置与优化策略

本文深入探讨了Ansys CFX Pre中RGP表的高级配置与优化策略,旨在帮助用户将仿真从“能用”提升至“精准好用”。文章重点解析了如何根据具体仿真场景,科学设定温度压力范围、选择流体类型,并针对相变等复杂工况实施网格加密与分离建表等关键优化技术,以显著提升计算精度与稳定性。

weixin_29216957的博客 1179

156、手机摄像头模组结构拆解:从保护盖到 FPC 连接器的完整装配剖面

本文深入解析手机摄像头模组结构设计要点。作者结合项目经验,指出保护盖密封胶在低温收缩会导致边缘漏光问题,强调结构细节比算法参数更关键。文章逐层拆解模组组件:保护盖厚度需平衡抗冲击与光学性能;镜筒内镜片组装配顺序和公差控制直接影响成像质量;IR滤光片厚度公差±0.02mm会改变红外截止波长;CSP封装需注意金线加固;FPC连接器的信号完整性和机械可靠性设计。最后给出5条实用建议,包括密封胶选型、镜片对位检测等,强调模组结构设计是"一票否决制"的基础工程。(149字)

sundong_81的博客 103

Error creating bean with name ‘xxx‘ defined in javaconfig问题。

作为一个Spring的初学者,检查过文件的配置,全部都是正确的,但是不知道为什么我已启动就是Error creating bean with name 'xxx' defined in javaconfig问题。直接上代码,求大神指点。 这是我的项目结构: 这是我引入的依赖: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" x

weixin_45729947的博客 992

手把手教你学PCIE--基本概念:PCIe 初始化流程概述

硬件上电复位:系统上电时,所有 PCIe 设备都会进行复位。链路训练(Link Training):主机和设备之间通过链路训练状态机(LTSSM)协商链路参数(如速度和宽度)。配置空间访问:主机通过配置空间读写来发现和配置设备。资源分配:主机为设备分配内存映射 I/O 区域(BARs)、中断向量等资源。驱动程序加载和高级配置:操作系统加载设备驱动程序,并进行更高级的配置和状态监控。硬件上电复位:确保所有设备处于已知的良好状态。链路训练:主机和设备通过 LTSSM 协商链路速度和宽度。

MHD0815的博客 1372

MyBatis与Spring MVC结合时,使用DAO注入出现:Invocation of init method failed; nested exception is java.lang.Ille...

错误源自使用了这个例子:http://www.yihaomen.com/article/java/336.htm,如果运行时会出现如下错误: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'sqlSess...

weixin_34150830的博客 628

ROS & ROS2 机器人深度相机激光雷达多传感器标定工具箱

不过,多传感器标定工具箱允许通过编辑 yaml 文件来调整标定目标的参数: <repository>/mutlisensor_calibration/cfg/TargetWithCirclesAndAruco.yaml%YAML:1.0rows: 4cols: 1dt: irows: 4cols: 2dt: frows: 1cols: 12dt: fCAD 模型网格/云通过 GICP 将模型数据与分割点云对齐,用于优化检测到的目标姿态。

2506_90492529的博客 2106

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

Property ‘sqlSessionFactory‘ or ‘sqlSessionTemplate‘ are required

Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are requiredspringboot 无法启动如图一 图二: 主要原因:所以找到启动位置: 把MapperScan改为ComponentScan 后,问题解决,启动正常。

fghag888的博客 471

华为的C语言编程规范.pdf

华为技术有限公司内部技术规范。本规范制定了编写C语言程序的基本原则、规则和建议。从代码的清晰、简洁、可测试、安全、程序效率、可移植各个方面对C语言编程作出了具体指导。

Spring开发日记

7月5日今天主要在慕课网上实现SSH框架的demo,SSH的配置主要使用四个文件,首先需要配置**web.xml:**<?xml version="1.0" encoding="UTF-8"?> <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org

Go for IT 517

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

jdk-8u144-linux-x64.tar.gz.

该资源为搭建Linux系统Java环境用,资源的后缀为tar.gz格式的压缩包

SpringBoot整合MyBatisPlus报错解决方案

在Java企业级开发中,ORM框架是实现数据持久化的关键技术。MyBatis作为主流ORM框架之一,通过与SpringBoot的集成可以大幅提升开发效率。其核心原理是通过SqlSessionFactory创建数据库会话,配合Mapper接口的动态代理实现数据操作。当出现'Property sqlSessionFactory or sqlSessionTemplate are required'报错时,通常意味着自动配置流程中断,需要检查依赖管理、包扫描配置等关键环节。特别是在微服务架构下,正确处理多数据源场

weixin_33851604的博客 412

Invocation of init method failed; nested exception is java.lang.IllegalAccessError: javax/el/Util

遇到个很诡异的问题,困扰了我好几天,项目运行不起来导致我无法开发下去。 问题描述:这是个Spring Boot个人项目,从环境的搭建到开发这一过程还是挺顺利的,其中遇到的问题也都解决了,也做了相应的记录,具体可以翻阅我之前的博客,可能有些问题没有记录下来,望谅解。 突然发现使用springboot内嵌的服务器时,有些麻烦的地方,就是每次更改项目中的java等文件时,都要全量打包,如果要使用增量打包...

qq_39039017的博客 5万+

Invocation of init method failed; nested exception is java.lang.IllegalStateException

项目场景: 提示:这里简述项目相关背景: 例如:项目场景:示例:通过蓝牙芯片(HC-05)与手机 APP 通信,每隔 5s 传输一批传感器数据(不是很大) 问题描述: 提示:这里描述项目中遇到的问题: 例如:数据传输过程中数据不时出现丢失的情况,偶尔会丢失一部分数据 APP 中接收数据代码: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual

爱学习的封某人 7780

Invocation of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous...

controller路径重复问题

qq_44641527的博客 3690

Error creating bean with name 'schedule': Invocation of init method failed; nested exception is java...

这个错误消息表明在创建一个名为 "schedule" 的 bean 时出现了错误,具体是在调用 bean 的初始化方法时发生了空指针异常。 空指针异常是 Java 程序设计中常见的异常,通常表示程序试图在没有初始化或赋值的对象上调用方法或访问属性。在这种情况下,可能是因为在初始化 bean 时,程序试图调用了未初始化的对象的方法或访问未初始化的对象的属性。 解决这个问题的方法是找出空指针异常发生的...

weixin_42608318的博客 1万+
上一篇: springboot 配置LocalDateTime JSON返回时间戳
下一篇: 如何把List中的对象中某个相同属性字段归为一个集合并且使用Map集合存起来
NatChan
博客等级 码龄9年 12粉丝 26原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值