Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mac m1. can't start the program. No native library is found for os.name=Mac and os.arch=aarch64 #329

Open
leonf-tech opened this issue May 24, 2022 · 2 comments

Comments

@leonf-tech
Copy link

leonf-tech commented May 24, 2022

java 11
mac OS 12.3.1
javafx : 18.0.1

已经手动导入 sqlite3 library
sqlite : v3.7.2

报错信息
[INFO] [14:10:48.684] [JavaFX Application Thread] [] com.zzg.mybatis.generator.util.ConnectionManager.getConnection:20 --> database FilePath :/Users/xxx/FL_Documents/Codes/mybatis-generator-gui-master/./config/sqlite3.db
[ERROR] [14:10:48.700] [JavaFX Application Thread] [] com.zzg.mybatis.generator.controller.MainUIController.loadLeftDBTree:296 --> connect db failed, reason
java.sql.SQLException: Error opening connection
at org.sqlite.core.CoreConnection.open(CoreConnection.java:215)
at org.sqlite.core.CoreConnection.(CoreConnection.java:76)
at org.sqlite.jdbc3.JDBC3Connection.(JDBC3Connection.java:24)
at org.sqlite.jdbc4.JDBC4Connection.(JDBC4Connection.java:23)
at org.sqlite.SQLiteConnection.(SQLiteConnection.java:45)
at org.sqlite.JDBC.createConnection(JDBC.java:114)
at org.sqlite.JDBC.connect(JDBC.java:88)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:677)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:251)
at com.zzg.mybatis.generator.util.ConnectionManager.getConnection(ConnectionManager.java:21)
at com.zzg.mybatis.generator.util.ConfigHelper.loadDatabaseConfig(ConfigHelper.java:68)
at com.zzg.mybatis.generator.controller.MainUIController.loadLeftDBTree(MainUIController.java:284)
at com.zzg.mybatis.generator.controller.MainUIController.initialize(MainUIController.java:213)
at [email protected]/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2655)
at [email protected]/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2548)
at [email protected]/javafx.fxml.FXMLLoader.load(FXMLLoader.java:2516)
at com.zzg.mybatis.generator.MainUI.start(MainUI.java:30)
at [email protected]/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:847)
at [email protected]/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:484)
at [email protected]/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:457)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at [email protected]/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:456)
at [email protected]/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
Caused by: java.lang.Exception: No native library is found for os.name=Mac and os.arch=aarch64
at org.sqlite.SQLiteJDBCLoader.loadSQLiteNativeLibrary(SQLiteJDBCLoader.java:284)
at org.sqlite.SQLiteJDBCLoader.initialize(SQLiteJDBCLoader.java:65)
at org.sqlite.core.NativeDB.load(NativeDB.java:53)
at org.sqlite.core.CoreConnection.open(CoreConnection.java:211)
... 22 common frames omitted

程序错误截图
image

@leonf-tech
Copy link
Author

我删除 pom.xml 里面的 sqlite 依赖。才能让我手动导入的 sqlite3 以来生效。生效以后 就好了
注意:
数据库类型要选择 mysql8

@xuningnh
Copy link

xuningnh commented Jun 7, 2024

我删除 pom.xml 里面的 sqlite 依赖。才能让我手动导入的 sqlite3 以来生效。生效以后 就好了 注意: 数据库类型要选择 mysql8

具体说一下什么手动导入?从中央仓库下载jar包然后导进项目里吗?
我也这么做了,还按上面说的把pom依赖的sqlite-jdbc注释掉还是不生效

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants