社区
Java SE
帖子详情
使用JDBC new Driver 出现的问题呢
qq_33608244
2016-07-24 01:54:48
我用的是Myeclipse10
在看别人在创建Driver对象的时候 可以看到Mysql的构造器。但是我创建的时候没有。只有默认的两个
我需要连接的是oralce 我也导入了oralce的JAR包
但是没有相关的构造方法
这个是我的构造方法只有两个
其他人的。有很多个
...全文
278
4
打赏
收藏
使用JDBC new Driver 出现的问题呢
我用的是Myeclipse10 在看别人在创建Driver对象的时候 可以看到Mysql的构造器。但是我创建的时候没有。只有默认的两个 我需要连接的是oralce 我也导入了oralce的JAR包 但是没有相关的构造方法 这个是我的构造方法只有两个 其他人的。有很多个
复制链接
扫一扫
分享
举报
写回复
配置赞助广告
用AI写文章
4 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
angelvyvyan
2016-07-24
打赏
举报
回复
要有一个mysql-connector的jar包
smht2598
2016-07-24
打赏
举报
回复
看看是不是项目未完成编译,"window " -->'show view' -->"problem"。另外看看项目的.classpath文件,看你导入的jar包在不在文件中。 <classpathentry kind="lib" path="WebContent/WEB-INF/lib/aliyun-openservices-1.0.10.jar"/> <classpathentry kind="lib" path="WebContent/WEB-INF/lib/antlr-2.7.7.jar"/> <classpathentry kind="lib" path="WebContent/WEB-INF/lib/aopalliance-1.0.jar"/> <classpathentry kind="lib" path="WebContent/WEB-INF/lib/asm-all-3.1.jar"/> <classpathentry kind="lib" path="WebContent/WEB-INF/lib/bcprov-jdk15on-147.jar"/>
walkuere
2016-07-24
打赏
举报
回复
据我所知,连mysql和连oracle是需要不同的包,这包需要自己下载jar,然后再项目工程的配置环境中引用,然后你的代码前面还要import引入,或者什么usenameSpace什么 mysql好像还要在控制面板里加个odbc 这个网络上肯定有现成的例子,下载下来就可以
dzq584462393
2016-07-24
打赏
举报
回复
试试DriverManager.getConnection()行不行
log4
jdbc
解决sql参数的
问题
同时引发的The
new
driver
class is `com.mysql.cj.
jdbc
.
Driver
‘
log4
jdbc
解决sql参数的
问题
同时引发的The
new
driver
class is `com.mysql.cj.
jdbc
.
Driver
‘
springboot
问题
Loading class `com.mysql.
jdbc
.
Driver
‘. This is deprecated. The
new
driver
class is
今天准备试试之前的springboot项目还好不好使,结果启动了半天,给我报错 Loading class `com.mysql.
jdbc
.
Driver
'. This is deprecated. The
new
driver
class is `com.mysql.cj.
jdbc
.
Driver
'. The
driver
is automatically registered via the SPI and manual loading of the
driver
class is generally u
SpringBoot项目搭建遇到的
问题
-The
new
driver
class is `com.mysql.cj.
jdbc
.
Driver
'
报错信息: Loading class `com.mysql.
jdbc
.
Driver
'. This is deprecated. The
new
driver
class is `com.mysql.cj.
jdbc
.
Driver
'. The
driver
is automatically registered via the SPI and manual loading of the drive...
Loading class `com.mysql.
jdbc
.
Driver
‘. This is deprecated. The
new
driver
class is ...
问题
解决
Loading class com.mysql.
jdbc
.
Driver
'. This is deprecated. The
new
driver
class iscom.mysql.cj.
jdbc
.
Driver
’.
问题
解决 原因 :
使用
了mysql的最新连接驱动 解决:按照官方提示将驱动名字改成com.mysql.cj.
jdbc
.
Driver
即可 #
jdbc
.
driver
=com.mysql.
jdbc
.
Driver
旧版本
jdbc
.
driver
=com.mysql.cj.
jdbc
.
Driver
# m
Loading class `com.mysql.
jdbc
.
Driver
'. The
new
driver
class is `com.mysql.cj.jdb
问题
是因为最新的数据库驱动的原因,用较早的版本就可以了。 <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <scope>runtime</scop...
Java SE
62,620
社区成员
307,251
社区内容
发帖
与我相关
我的任务
Java SE
Java 2 Standard Edition
复制链接
扫一扫
分享
社区描述
Java 2 Standard Edition
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章