[SPIGOT-2783] Unknown SQLite Library Created: 17/Nov/16 Updated: 19/Aug/18 Resolved: 17/Nov/16 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | Trig | Assignee: | Unassigned |
Resolution: | Cannot Reproduce | Votes: | 0 |
Labels: | None | ||
Environment: |
java.lang.NoClassDefFoundError: org/sqlite/NativeDB |
Attachments: |
![]() |
Plugin: | SPIGOT |
Description |
All plugins using SQLite seem to be throwing this NoClassDefError. |
Comments |
Comment by Daniel Ennis [ 19/Aug/18 ] |
Incase anyone arrives at this issue again, you can solve this with adding to your startup flags -Dorg.sqlite.tmpdir=tmp and make a directory named "tmp" in your server root. This will make sqlite store them in your servers folder instead under global /tmp. |
Comment by VanDerProtofsky [ 18/Nov/16 ] |
Bumped into this issue on our server; as md_5 says, a conflicting plugin was responsible for this. It turns out that LWC attempts to download and use its own native libs for SQLite, which breaks other plugins attempting to use SQLite. Workarounds:
Edit: I have filed an issue: https://github.com/Hidendra/LWC/issues/953 |
Comment by md_5 [ 17/Nov/16 ] |
Also Intelli your issue is different - that is because your OS is mounting /tmp noexec. The native library provides far better performance and compatibility with actual sqlite. |
Comment by md_5 [ 17/Nov/16 ] |
I found the issue. You are running a conflicting plugin which packages its own SQLite. |
Comment by Intelli [ 17/Nov/16 ] |
Getting a few reports of this on my plugin page. https://www.spigotmc.org/threads/coreprotect.73929/page-16#post-2026175 Unable to replicate the exact error. However, on my CentOS 6 server, if I start it up with the default temp directory, I get this error: [15:44:16 WARN]: Failed to load native library:sqlite-3.14.2.1-1819ef5d-c291-40ef-8d69-45ed96542740-libsqlitejdbc.so. osinfo: Linux/x86_64 [15:44:16 WARN]: java.lang.UnsatisfiedLinkError: /tmp/sqlite-3.14.2.1-1819ef5d-c291-40ef-8d69-45ed96542740-libsqlitejdbc.so: /tmp/sqlite-3.14.2.1-1819ef5d-c291-40ef-8d69-45ed96542740-libsqlitejdbc.so: failed to map segment from shared object: Operation not permitted [15:44:16 ERROR]: Error occurred while enabling CoreProtect v2.13.1 (Is it up to date?) java.lang.UnsatisfiedLinkError: org.sqlite.core.NativeDB._open(Ljava/lang/String;I)V at org.sqlite.core.NativeDB._open(Native Method) ~[spigot-1.11.jar:git-Spigot-d60de0a-17e6e85] at org.sqlite.core.DB.open(DB.java:174) ~[spigot-1.11.jar:git-Spigot-d60de0a-17e6e85] at org.sqlite.core.CoreConnection.open(CoreConnection.java:220) ~[spigot-1.11.jar:git-Spigot-d60de0a-17e6e85] at org.sqlite.core.CoreConnection.<init>(CoreConnection.java:76) ~[spigot-1.11.jar:git-Spigot-d60de0a-17e6e85] at org.sqlite.jdbc3.JDBC3Connection.<init>(JDBC3Connection.java:24) ~[spigot-1.11.jar:git-Spigot-d60de0a-17e6e85] at org.sqlite.jdbc4.JDBC4Connection.<init>(JDBC4Connection.java:24) ~[spigot-1.11.jar:git-Spigot-d60de0a-17e6e85] at org.sqlite.SQLiteConnection.<init>(SQLiteConnection.java:45) ~[spigot-1.11.jar:git-Spigot-d60de0a-17e6e85] at org.sqlite.JDBC.createConnection(JDBC.java:114) ~[spigot-1.11.jar:git-Spigot-d60de0a-17e6e85] at org.sqlite.JDBC.connect(JDBC.java:88) ~[spigot-1.11.jar:git-Spigot-d60de0a-17e6e85] at java.sql.DriverManager.getConnection(DriverManager.java:664) ~[?:1.8.0_111] at java.sql.DriverManager.getConnection(DriverManager.java:270) ~[?:1.8.0_111] at net.coreprotect.database.Database.getConnection(Database.java:107) ~[?:?] at net.coreprotect.Functions.createDatabaseTables(Functions.java:312) ~[?:?] at net.coreprotect.model.Config.loadDatabase(Config.java:788) ~[?:?] at net.coreprotect.model.Config.performInitialization(Config.java:889) ~[?:?] at net.coreprotect.CoreProtect.onEnable(CoreProtect.java:98) ~[?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:271) ~[spigot-1.11.jar:git-Spigot-d60de0a-17e6e85] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:337) [spigot-1.11.jar:git-Spigot-d60de0a-17e6e85] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) [spigot-1.11.jar:git-Spigot-d60de0a-17e6e85] at org.bukkit.craftbukkit.v1_11_R1.CraftServer.enablePlugin(CraftServer.java:373) [spigot-1.11.jar:git-Spigot-d60de0a-17e6e85] at org.bukkit.craftbukkit.v1_11_R1.CraftServer.enablePlugins(CraftServer.java:323) [spigot-1.11.jar:git-Spigot-d60de0a-17e6e85] at net.minecraft.server.v1_11_R1.MinecraftServer.t(MinecraftServer.java:419) [spigot-1.11.jar:git-Spigot-d60de0a-17e6e85] at net.minecraft.server.v1_11_R1.MinecraftServer.l(MinecraftServer.java:380) [spigot-1.11.jar:git-Spigot-d60de0a-17e6e85] at net.minecraft.server.v1_11_R1.MinecraftServer.a(MinecraftServer.java:335) [spigot-1.11.jar:git-Spigot-d60de0a-17e6e85] at net.minecraft.server.v1_11_R1.DedicatedServer.init(DedicatedServer.java:272) [spigot-1.11.jar:git-Spigot-d60de0a-17e6e85] at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:542) [spigot-1.11.jar:git-Spigot-d60de0a-17e6e85] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111] If I manually specify a temp directory (e.g. /plugins/CoreProtect/tmp), it starts up without any errors/warnings. With Spigot 1.10 and earlier, I don't seem to receive the "java.lang.UnsatisfiedLinkError: org.sqlite.core.NativeDB" error. Not sure if that's related at all, but figured I'd give it a quick mention. |
Comment by F_o_F_1092 [ 17/Nov/16 ] |
I'm getting the same error (with all SQLite-Plugins (WG, LWC etc.) My Debian version is 8.6 My java version is 1.8.0_101
*edit* Same on my Windows 10 PC. |
Comment by Trig [ 17/Nov/16 ] |
Not sure what the issue on my end is then, Problem solved by injecting SQLite 3.7 into the 1.11 jar. I'll continue to look into it on my own. |
Comment by md_5 [ 17/Nov/16 ] |
We ran the test server on Debian 8 with multiple plugins using SQLite no issues |
Comment by Trig [ 17/Nov/16 ] |
The issue seems to be with the new version of SQLite packaged in the spigot jar. I just verified it works on Windows, but does not seem to work on Debian 8. |
Comment by md_5 [ 17/Nov/16 ] |
Cannot reproduce with latest worldguard build |
Comment by Trig [ 17/Nov/16 ] |
Can't seem to edit this, but I accidentally placed the stacktrace inside of the environment section. |