Hidendra / LWC

Lightweight Protection for Chests, Furnaces, Dispensers, and more for the Minecraft server mod Bukkit
Other
167 stars 123 forks source link

[1.11] `java.lang.NoClassDefFoundError: org/sqlite/NativeDB` caused by SQLite driver #953

Open RoyCurtis opened 7 years ago

RoyCurtis commented 7 years ago

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:

Details

Reproduction

  1. Prepare a Spigot 1.11 server
  2. Put LWC, WorldGuard and CraftBook in the plugins folder
  3. Start the server. Note that WorldGuard and CraftBook fail to load with a NoClassDefFoundError exception
  4. Stop the server and remove LWC from the plugins folder
  5. Start the server. Observe that WorldGuard and CraftBook now load as expected

Workaround

Notes

TNTUP commented 7 years ago

Delete the file lib/.../.../libsqlite something.so or edit it and delete everything in and save it so it<ll reach 0 bytes, but you'll see that notice but it can be freely ignored. Restart server and LWC will start.

jordanwilliams1 commented 7 years ago

@TNTUP Doesn't work on paper

RoyCurtis commented 7 years ago

@jordanwilliams1 In your LWC's config.yml, what is adapter under database set to? Are you using mysql or sqlite?

jordanwilliams1 commented 7 years ago

@RoyCurtis sqlite but don't really fancy changing to mysql.

TNTUP commented 7 years ago

@jordanwilliams1 Then you're doing something wrong. LWC works fine on my Paper 1.10.2/1.11 server.

jordanwilliams1 commented 7 years ago

@TNTUP http://pastebin.com/raw/ryuAeHrm

TNTUP commented 7 years ago

Follow my steps, go in /plugins/LWC/lib/native/linux/amd64/ and (don’t delete the .so file!!) edit it, cut ALL strings inside of the file then save! It will save at 0 bytes so the file is « invalid » but! LWC will try to load the integrated sqlite in spigot/paper jars! Though, there will be a Java VM warning because the file is « too short » but safe to ignore on my side, tested locking shulkerboxes, everyting works! ☺

De : jordanwilliams1 [mailto:notifications@github.com] Envoyé : 28 novembre 2016 16:58 À : Hidendra/LWC LWC@noreply.github.com Cc : Yann fluorescent92@hotmail.com; Mention mention@noreply.github.com Objet : Re: [Hidendra/LWC] [1.11] java.lang.NoClassDefFoundError: org/sqlite/NativeDB caused by SQLite driver (#953)

@TNTUPhttps://github.com/TNTUP http://pastebin.com/raw/ryuAeHrm