问答详情
源自:2-12 商品删除

连不上数据库咋办

java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

at java.net.URLClassLoader.findClass(URLClassLoader.java:381)

at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)

at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:264)

at util.DBHelper.<clinit>(DBHelper.java:18)

java.sql.SQLException: No suitable driver found for jdbc:mysql://127.0.0.1:3306/shopping?useUnicode=true&characterEncoding=UTF-8

at java.sql.DriverManager.getConnection(DriverManager.java:689)

at java.sql.DriverManager.getConnection(DriverManager.java:247)

at util.DBHelper.getConnection(DBHelper.java:30)

at util.DBHelper.main(DBHelper.java:40)


提问者:Juneava 2016-11-23 15:14

个回答

  • johnnystrong
    2016-11-23 19:07:51

    找不到jar包。