zouzg / mybatis-generator-gui

mybatis-generator界面工具,让你生成代码更简单更快捷
6.69k stars 2.53k forks source link

java.lang.ClassNotFoundException: org.sqlite.JDBC 无法进行数据库连接 #129

Open cky-thinker opened 7 years ago

cky-thinker commented 7 years ago

org.sqlite.JDBC已经加载到classpath,但是报这个错误 [ERROR] [10:23:37.080] [JavaFX Application Thread] [] com.zzg.mybatis.generator.controller.MainUIController.loadLeftDBTree:204 --> connect db failed, reason: {} java.lang.ClassNotFoundException: org.sqlite.JDBC at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_131] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_131] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) ~[na:1.8.0_131] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_131] at java.lang.Class.forName0(Native Method) ~[na:1.8.0_131] at java.lang.Class.forName(Class.java:264) ~[na:1.8.0_131] at com.zzg.mybatis.generator.util.ConnectionManager.getConnection(ConnectionManager.java:14) ~[classes/:na] at com.zzg.mybatis.generator.util.ConfigHelper.loadDatabaseConfig(ConfigHelper.java:66) ~[classes/:na] at com.zzg.mybatis.generator.controller.MainUIController.loadLeftDBTree(MainUIController.java:192) [classes/:na] at com.zzg.mybatis.generator.controller.MainUIController.initialize(MainUIController.java:185) [classes/:na] at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2548) [jfxrt.jar:na] at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441) [jfxrt.jar:na] at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2409) [jfxrt.jar:na] at com.zzg.mybatis.generator.MainUI.start(MainUI.java:28) [classes/:na] at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863) [jfxrt.jar:na] at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326) ~[jfxrt.jar:na] at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295) ~[jfxrt.jar:na] at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_131] at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294) ~[jfxrt.jar:na] at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) ~[jfxrt.jar:na] at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) ~[jfxrt.jar:na] at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191) ~[jfxrt.jar:na] at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_131]

hohowt commented 4 years ago

老哥,我这边也出了这个问题,请问你是怎么解决的