java.sql.SQLException: 找不到适合 jbdc:mysql://localhost:3306/loginDB & java.lang.NullPointerException 的驱动程序
java.sql.SQLException: No suitable driver found for jbdc:mysql://localhost:3306/loginDB & java.lang.NullPointerException
我遇到了 Eclipse IDE 无法识别 .jar 文件中的 jdbc 驱动程序的问题。我已经尝试将它放在 WEB-INF/Lib 的构建路径以及构建文件夹中。我已经在我的项目中添加了 Class.forname 来注册驱动程序。
这是我在 mysql 中的 url 数据库:"jbdc:mysql://localhost:3306/loginDB"。
我正在使用 Tomcat v9.0 服务器。
我为 .jar 文件使用 5.1.49 驱动程序版本。
以下 link 将带您到我的 github,我的代码用于我的项目。
https://github.com/shari002/files/tree/master/MyResgistrationProjects
This shows how I'm registering for driver to work.
您的连接字符串中有错字。
jbdc:mysql://localhost:3306/loginDB
应该是jdbc.
我遇到了 Eclipse IDE 无法识别 .jar 文件中的 jdbc 驱动程序的问题。我已经尝试将它放在 WEB-INF/Lib 的构建路径以及构建文件夹中。我已经在我的项目中添加了 Class.forname 来注册驱动程序。
这是我在 mysql 中的 url 数据库:"jbdc:mysql://localhost:3306/loginDB"。 我正在使用 Tomcat v9.0 服务器。 我为 .jar 文件使用 5.1.49 驱动程序版本。
以下 link 将带您到我的 github,我的代码用于我的项目。
https://github.com/shari002/files/tree/master/MyResgistrationProjects
This shows how I'm registering for driver to work.
您的连接字符串中有错字。
jbdc:mysql://localhost:3306/loginDB
应该是jdbc.