ChestShop-authors / ChestShopNotifier

Bukkit plugin that allows your players to see who bought or sold what while they were offline.
https://www.spigotmc.org/resources/chestshopnotifier.30313/
10 stars 8 forks source link

Database loaded but no entries #55

Closed Gamesolic closed 2 years ago

Gamesolic commented 2 years ago

Hello, i have a problem with the notifications/entries in the Databse. A table in MySQL was created but there are no entries and i cant view the shop history with /csn history. Thus Shop owners wont get notifications after they log in again.

Gamesolic commented 2 years ago

2021-11-17 08_58_40-NVIDIA GeForce Overlay

Phoenix616 commented 2 years ago

Well information to that is only added when a transaction is made so at the start there will of course be none. (Unless you mean that you actually did a transaction, if so please provide your log, config, version and some more information about the shop itself)

Gamesolic commented 2 years ago

Okay so there is something wrong. I already did a transaction btw, sorry if that was´nt clear. The Minecraft Version is 1.17.1. Here is the log:

[20:46:16 INFO]: UUID of player xxxxxxxxx is xxxxxxxxxxxxxxxxxxxxxxxx [20:46:17 INFO]: [ChestShopNotifier] User joined. Checking for updates... [20:46:17 INFO]: xxxxxx joined the game [20:46:17 INFO]: xxxxxx[/xxxxxxxxxxxxx] logged in with entity id 5186 at ([world]-411.40127203284237, 68.0, -294.0487500483652) [20:46:22 WARN]: [com.wfector.lib.hikari.pool.PoolBase] HikariPool-2 - Failed to validate connection com.mysql.cj.jdbc.ConnectionImpl@55a6e3bb (No operations allowed after connection closed.). Possibly consider using a shorter maxLifetime value. [20:46:22 WARN]: [com.wfector.lib.hikari.pool.PoolBase] HikariPool-2 - Failed to validate connection com.mysql.cj.jdbc.ConnectionImpl@b88d433 (No operations allowed after connection closed.). Possibly consider using a shorter maxLifetime value. [20:46:22 WARN]: [com.wfector.lib.hikari.pool.PoolBase] HikariPool-2 - Failed to validate connection com.mysql.cj.jdbc.ConnectionImpl@5c723f3a (No operations allowed after connection closed.). Possibly consider using a shorter maxLifetime value. [20:46:22 WARN]: [com.wfector.lib.hikari.pool.PoolBase] HikariPool-2 - Failed to validate connection com.mysql.cj.jdbc.ConnectionImpl@3e2ba434 (No operations allowed after connection closed.). Possibly consider using a shorter maxLifetime value. [20:46:22 WARN]: [com.wfector.lib.hikari.pool.PoolBase] HikariPool-2 - Failed to validate connection com.mysql.cj.jdbc.ConnectionImpl@7dad36d0 (No operations allowed after connection closed.). Possibly consider using a shorter maxLifetime value. [20:46:22 WARN]: [com.wfector.lib.hikari.pool.PoolBase] HikariPool-2 - Failed to validate connection com.mysql.cj.jdbc.ConnectionImpl@30c95c1a (No operations allowed after connection closed.). Possibly consider using a shorter maxLifetime value. [20:46:22 WARN]: [com.wfector.lib.hikari.pool.PoolBase] HikariPool-2 - Failed to validate connection com.mysql.cj.jdbc.ConnectionImpl@7d0f3ed6 (No operations allowed after connection closed.). Possibly consider using a shorter maxLifetime value. [20:46:22 WARN]: [com.wfector.lib.hikari.pool.PoolBase] HikariPool-2 - Failed to validate connection com.mysql.cj.jdbc.ConnectionImpl@1e663f47 (No operations allowed after connection closed.). Possibly consider using a shorter maxLifetime value. [20:46:22 WARN]: [com.wfector.lib.hikari.pool.PoolBase] HikariPool-2 - Failed to validate connection com.mysql.cj.jdbc.ConnectionImpl@a6991ed (No operations allowed after connection closed.). Possibly consider using a shorter maxLifetime value. [20:46:22 INFO]: [ChestShopNotifier] Found rows: 0 [20:46:22 INFO]: [ChestShopNotifier] Done. [20:49:47 ERROR]: Could not pass event TransactionEvent to ChestShopNotifier v1.3.3 (build 51) java.lang.NoClassDefFoundError: com/Acrobot/ChestShop/Utils/ItemUtil at com.wfector.notifier.ChestShopNotifier.onChestShopTransaction(ChestShopNotifier.java:245) ~[?:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor256.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.17.1.jar:git-Paper-84] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.17.1.jar:git-Paper-84] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.17.1.jar:git-Paper-84] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:624) ~[patched_1.17.1.jar:git-Paper-84] at com.Acrobot.ChestShop.Listeners.Player.PlayerInteract.onInteract(PlayerInteract.java:153) ~[?:?] at com.destroystokyo.paper.event.executor.StaticMethodHandleEventExecutor.execute(StaticMethodHandleEventExecutor.java:38) ~[patched_1.17.1.jar:git-Paper-84] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.17.1.jar:git-Paper-84] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.17.1.jar:git-Paper-84] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:624) ~[patched_1.17.1.jar:git-Paper-84] at org.bukkit.craftbukkit.v1_17_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:538) ~[patched_1.17.1.jar:git-Paper-84] at org.bukkit.craftbukkit.v1_17_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:501) ~[patched_1.17.1.jar:git-Paper-84] at org.bukkit.craftbukkit.v1_17_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:496) ~[patched_1.17.1.jar:git-Paper-84] at net.minecraft.server.level.ServerPlayerGameMode.handleBlockBreakAction(ServerPlayerGameMode.java:200) ~[?:?] at net.minecraft.server.network.ServerGamePacketListenerImpl.handlePlayerAction(ServerGamePacketListenerImpl.java:1657) ~[?:?] at net.minecraft.network.protocol.game.ServerboundPlayerActionPacket.handle(ServerboundPlayerActionPacket.java:34) ~[?:?] at net.minecraft.network.protocol.game.ServerboundPlayerActionPacket.handle(ServerboundPlayerActionPacket.java:8) ~[?:?] at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$1(PacketUtils.java:36) ~[?:?] at net.minecraft.server.TickTask.run(TickTask.java:18) ~[patched_1.17.1.jar:git-Paper-84] at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:149) ~[?:?] at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:23) ~[?:?] at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1348) ~[patched_1.17.1.jar:git-Paper-84] at net.minecraft.server.MinecraftServer.shouldRun(MinecraftServer.java:190) ~[patched_1.17.1.jar:git-Paper-84] at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:122) ~[?:?] at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1327) ~[patched_1.17.1.jar:git-Paper-84] at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1320) ~[patched_1.17.1.jar:git-Paper-84] at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:132) ~[?:?] at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1281) ~[patched_1.17.1.jar:git-Paper-84] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1192) ~[patched_1.17.1.jar:git-Paper-84] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:316) ~[patched_1.17.1.jar:git-Paper-84] at java.lang.Thread.run(Thread.java:831) [?:?] [20:49:47 INFO]: [ChestShop] xxxxxx sold 64 Cobblestone for 1.00 to Admin Shop at [world] 199, 63, -36 [20:50:18 INFO]: xxxxxx issued server command: /csaccess [20:50:19 ERROR]: Could not pass event TransactionEvent to ChestShopNotifier v1.3.3 (build 51) java.lang.NoClassDefFoundError: com/Acrobot/ChestShop/Utils/ItemUtil at com.wfector.notifier.ChestShopNotifier.onChestShopTransaction(ChestShopNotifier.java:245) ~[?:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor256.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.17.1.jar:git-Paper-84] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.17.1.jar:git-Paper-84] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.17.1.jar:git-Paper-84] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:624) ~[patched_1.17.1.jar:git-Paper-84] at com.Acrobot.ChestShop.Listeners.Player.PlayerInteract.onInteract(PlayerInteract.java:153) ~[?:?] at com.destroystokyo.paper.event.executor.StaticMethodHandleEventExecutor.execute(StaticMethodHandleEventExecutor.java:38) ~[patched_1.17.1.jar:git-Paper-84] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.17.1.jar:git-Paper-84] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.17.1.jar:git-Paper-84] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:624) ~[patched_1.17.1.jar:git-Paper-84] at org.bukkit.craftbukkit.v1_17_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:538) ~[patched_1.17.1.jar:git-Paper-84] at net.minecraft.server.level.ServerPlayerGameMode.useItemOn(ServerPlayerGameMode.java:509) ~[?:?] at net.minecraft.server.network.ServerGamePacketListenerImpl.handleUseItemOn(ServerGamePacketListenerImpl.java:1723) ~[?:?] at net.minecraft.network.protocol.game.ServerboundUseItemOnPacket.handle(ServerboundUseItemOnPacket.java:33) ~[?:?] at net.minecraft.network.protocol.game.ServerboundUseItemOnPacket.handle(ServerboundUseItemOnPacket.java:9) ~[?:?] at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$1(PacketUtils.java:36) ~[?:?] at net.minecraft.server.TickTask.run(TickTask.java:18) ~[patched_1.17.1.jar:git-Paper-84] at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:149) ~[?:?] at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:23) ~[?:?] at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1348) ~[patched_1.17.1.jar:git-Paper-84] at net.minecraft.server.MinecraftServer.shouldRun(MinecraftServer.java:190) ~[patched_1.17.1.jar:git-Paper-84] at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:122) ~[?:?] at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1327) ~[patched_1.17.1.jar:git-Paper-84] at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1320) ~[patched_1.17.1.jar:git-Paper-84] at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:132) ~[?:?] at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1281) ~[patched_1.17.1.jar:git-Paper-84] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1192) ~[patched_1.17.1.jar:git-Paper-84] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:316) ~[patched_1.17.1.jar:git-Paper-84] at java.lang.Thread.run(Thread.java:831) [?:?] [20:50:19 INFO]: [ChestShop] xxxxxx bought 1 Potion#5 for 1.00 from xxxxxx at [world] 118, 63, 5

And here is the config:

Chest Shop Notifier

Config file for 1.3.3

logging: admin-shop: true

notifications: notify-on-user-join: true delay-seconds: 5

history: max-rows: 10 query-limit: 10000

debugging: verbose: true

database:

Possible types: SQLite and MySQL

type: mysql dbname: 'xxxxxxxxx'

MySQL specific settings

host: 'xxxxxxxxx' port: 3306 username: 'xxxxxxxx' password: 'xxxxxxx' ssl: false

clean-on-startup: enabled: false parameters: "--older-than 30 --all"

messages: sales: "&c You made &f{sales} sales&c since you last checked." history-cmd: "&c To see them, type &f/csn history&c." history-caption: "&dChestShop Notifier // &7Latest Commissions" history-empty: "&cNothing to show." history-bought: "&a+ &9{player} &7bought &a{count}x&9{item} &f{timeago}&7 ago &a(+{money})" history-bought-read: "&a+ &7{player} &8bought &a{count}x&7{item} &7{timeago}&8 ago &a(+{money})" history-sold: "&c- &9{player} &7sold you &c{count}x&9{item} &f{timeago}&7 ago &c(-{money})" history-sold-read: "&c- &7{player} &8sold you &c{count}x&7{item} &7{timeago}&8 ago &c(-{money})" history-footer-page: "&c- Page &f{current}&c/&f{pages}&6 - &7/csn history " history-footer-clear: "&f- &cTo remove all old entries, type /csn clear" history-clear: "&cHistory cleared! New sales will continue to be recorded." history-marked-read: "&cUnread entries marked read!" history-others-not-allowed: "&cYou are not allowed to check the history of {username}"

new translations

reload-cmd: "&dChestShop Notifier // &7Reloading, please wait..." reload-success: "&aReloaded!" reload-database-success: "&aDatabase connected!" reload-database-fail: "&cDatabase failed to connect!" user-not-found: "&cThe user '{player}' was not found." page-not-found: "&e{page} &cis not a valid page number input for /csn history !" page-not-found-other: "&e{page} &cis not a valid page number input for /csn history !" database-error: "&cInvalid database connection. Please edit config and /csn reload." database-error-oncommand: "&cDatabase error while executing this command!" database-cleaned: "&cCleaned database from {amount} entries!" database-uploaded: "&cBatch executed!" database-convert: "&cAttempting to convert database..." database-convert-fail: "&cError while trying to convert! Maybe you don't have a 'csn' table?" database-converted: "&cDatabase converted!" unrecognized-command: "&cCommand not recognized. Type /csn help for help." missing-arguments: "&cMissing parameter arguments: {usage}" invalid-number: "&c{typo} is not a valid number input for {usage}!" invalid-username: "&c{typo} is not a valid username/uuid input for {usage}!" missing-permission: "&cYou don't have the permission {permission}!" help: header: "&dChestShop Notifier // &7Commands" help: "&7 /csn &dhelp &f- Plugin usage & commands" history: "&7 /csn &dhistory []&f- View sales" clear: "&7 /csn &dclear &f- Remove read sales" history-others: "&7 /csn &dhistory []&f- View sales of another account" clear-others: "&7 /csn &dclear &f- Remove read sales of another account" cleandatabase: "&7 /csn &ccleandatabase &f- Remove database entries. Parameters:" cleandatabase-older-than: "&c --older-than, -o &f- Removes entries older than " cleandatabase-user: "&c --user, -user <username/uuid> &f- Removes entries from a single user only" cleandatabase-read-only: "&c --read-only, -r &f- Removes only read entries, default behaviour" cleandatabase-all: "&c --all, -a &f- Removes all entries" upload: "&7 /csn &cupload &f- Force update databases" convert: "&7 /csn &cconvert &f- Convert database to UUIDs" reload: "&7 /csn &creload &f- Reload configuration"

Phoenix616 commented 2 years ago

You are running an outdated version of ChestShop (as well as Paper). Please update them and see if the error persists.

Gamesolic commented 2 years ago

Tank you very much for your help, that fixed the problem. This plugin is just great, have a good day mate!