Error while registering Oracle JDBC Diagnosability MBean.

本文介绍了一位开发者在使用MyBatis框架连接Oracle数据库时遇到的问题及解决方案。问题表现为使用较低版本的ojdbc5.jar驱动时出现异常,通过更换为ojdbc6.jar后问题得到解决。

我在用java直连的时候没有问题,但是配了mybaties后就出现这个异常,百度下是驱动ojdbc5.jar版本太低了

找到oracle的按照目录,jdbc下换了个ojdbc6.jar好了,哈哈

Warning: Error registering driver names: [com.mysql.cj.jdbc.Driver, dm.jdbc.driver.DmDriver] Caused By: java.lang.ClassNotFoundException: dm.jdbc.driver.DmDriver 2025-11-12 21:01:23.879 WARN 21420 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mybatisPlusInterceptor' defined in class path resource [com/sinochem/it/sdm/common/mybatis/config/MybatisPlusConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor]: Factory method 'mybatisPlusInterceptor' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.com.sinochem.it.sdm.common.mybatis.config.MybatisPlusConfig': Invocation of init method failed; nested exception is com.p6spy.engine.spy.P6DriverNotFoundError: Error registering driver names: [com.mysql.cj.jdbc.Driver, dm.jdbc.driver.DmDriver] Caused By: java.lang.ClassNotFoundException: dm.jdbc.driver.DmDriver 2025-11-12 21:01:23.887 WARN 21420 --- [ main] s.c.a.AnnotationConfigApplicationContext : Exception thrown from ApplicationListener handling ContextClosedEvent
最新发布
11-13
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值