LWC
LWC copied to clipboard
[1.11] `java.lang.NoClassDefFoundError: org/sqlite/NativeDB` caused by SQLite driver
If LWC's database.adapter
is set to sqlite
(which it is by default), LWC attempts to download the SQLite native driver and unpacks it into its plugin directory. This driver is then loaded in some fashion.
In Spigot 1.11, Spigot's bundled SQLite driver has been updated to the 3.14 series. This appears to conflict with the SQLite driver that LWC downloads and loads, breaking all other plugins that use SQLite:
-
CraftBook:
java.lang.NoClassDefFoundError: org/sqlite/NativeDB
-
SignShop:
java.lang.NoClassDefFoundError: org/sqlite/NativeDB
-
WorldGuard:
java.lang.NoClassDefFoundError: org/sqlite/NativeDB
-
TicketMaster:
java.lang.NoClassDefFoundError: org/sqlite/NativeDB
Details
- Tested on
CraftBukkit version git-Spigot-16c940b-88eede8 (MC: 1.11) (Implementing API version 1.11-R0.1-SNAPSHOT)
- Tested with LWC build 941
-
Plugins (28): CleanroomGenerator, dynmap, WorldEdit, Titanic, zPermissions, Chairs, WorldBorder, TicketMaster, ProtocolLib, Multiverse-Core, WorldGuard, NoCheatPlus, WoodCutter, Stables, Multiverse-SignPortals, HappyPet, Multiverse-Portals, Vault, Prism, Essentials, PerWorldInventory, LWC, SignShop, VanishNoPacket, SignShopExport, CraftBook, Multiverse-NetherPortals, PurpleIRC
Reproduction
- Prepare a Spigot 1.11 server
- Put LWC, WorldGuard and CraftBook in the plugins folder
- Start the server. Note that WorldGuard and CraftBook fail to load with a
NoClassDefFoundError
exception - Stop the server and remove LWC from the plugins folder
- Start the server. Observe that WorldGuard and CraftBook now load as expected
Workaround
- If LWC's
config.yml
is set to usemysql
as the adapter, try deletingplugins/LWC/lib
- If LWC's
config.yml
is set to usesqlite
as the adapter, you must migrate to and use MySQL instead
Notes
- This issue was reported on Spigot's JIRA as SPIGOT-2783
- Personally, I find it concerning that LWC downloads and executes a native library from a third-party website (http://update.griefcraft.com) by default. I wonder also, why bother attempting to download or package SQLite when Spigot already has it?