divios / DailyShop

Spigot plugin. Fully configurable shop with daily offers. NBT & multi-currency support and more!
https://www.spigotmc.org/resources/daily-shop-free-random-items-shop-customizable-items-timer-nbt-support-and-more.86907/
29 stars 15 forks source link

Error occurred whilst executing an SQLite Query. #125

Closed joshuadking closed 2 years ago

joshuadking commented 2 years ago

Recently, I purchased the premium version of DailyShop, I wanted to continue using all my data from the free version, but this SQLite bug stopped me in my tracks. I was running DailyShop Free v3.7E and DailyShop Premium v3.7G. For now, I'm going to have to remake my shop from scratch :/

[04:44:30] [Server thread/INFO]: [DailyShop] Importing database data... [04:44:30] [Server thread/ERROR]: [DailyShop] An error occurred executing an SQLite query: Not a JSON Object: "buy" [04:44:30] [Server thread/WARN]: java.lang.IllegalStateException: Not a JSON Object: "buy" [04:44:30] [Server thread/WARN]: at com.google.gson.JsonElement.getAsJsonObject(JsonElement.java:91) [04:44:30] [Server thread/WARN]: at DailyShop-3.7.jar//io.github.divios.lib.dLib.shop.ShopAccount.fromJson(ShopAccount.java:15) [04:44:30] [Server thread/WARN]: at DailyShop-3.7.jar//io.github.divios.lib.storage.databaseManager.lambda$getShops$2(databaseManager.java:78) [04:44:30] [Server thread/WARN]: at DailyShop-3.7.jar//io.github.divios.core_lib.database.SQLiteConnector.connect(SQLiteConnector.java:56) [04:44:30] [Server thread/WARN]: at DailyShop-3.7.jar//io.github.divios.lib.storage.databaseManager.getShops(databaseManager.java:51) [04:44:30] [Server thread/WARN]: at DailyShop-3.7.jar//io.github.divios.lib.managers.shopsManager.initialise(shopsManager.java:32) [04:44:30] [Server thread/WARN]: at DailyShop-3.7.jar//io.github.divios.lib.managers.shopsManager.(shopsManager.java:26) [04:44:30] [Server thread/WARN]: at DailyShop-3.7.jar//io.github.divios.dailyShop.DailyShop.onEnable(DailyShop.java:67) [04:44:30] [Server thread/WARN]: at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) [04:44:30] [Server thread/WARN]: at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) [04:44:30] [Server thread/WARN]: at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:500) [04:44:30] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugin(CraftServer.java:561) [04:44:30] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugins(CraftServer.java:475) [04:44:30] [Server thread/WARN]: at net.minecraft.server.MinecraftServer.loadWorld(MinecraftServer.java:733) [04:44:30] [Server thread/WARN]: at net.minecraft.server.dedicated.DedicatedServer.init(DedicatedServer.java:317) [04:44:30] [Server thread/WARN]: at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1220) [04:44:30] [Server thread/WARN]: at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) [04:44:30] [Server thread/WARN]: at java.base/java.lang.Thread.run(Thread.java:833) [04:44:30] [Server thread/INFO]: [DailyShop] Imported database data in 52 ms

divios commented 2 years ago

Hi! Yeah... since I haven't updated the free version for quite some time, lots of changes have been made to the database and the free and premium version are not compatible with each other.

I understand this is quite an annoyance, I will try to implement a converter between the two versions

joshuadking commented 2 years ago

Hi! Yeah... since I haven't updated the free version for quite some time, lots of changes have been made to the database and the free and premium version are not compatible with each other.

I understand this is quite an annoyance, I will try to implement a converter between the two versions

Hello! Thanks for reaching out. As a Java programmer, I understand this completely. Luckily it didn't take all that long to remake. Perhaps you could make the free version read/write to the SQLite DB the same way the premium version does? (Also having the option between SQLite and YAML storage would be great as well.)

Thank for your consideration, Josh