TradeSystem icon indicating copy to clipboard operation
TradeSystem copied to clipboard

MySQL Database Tables not being created, despite no errors shown in console.

Open Xelarender opened this issue 3 years ago • 0 comments

Describe the bug The dbname.tradelog table isn't being created in the MySQL database. No errors appear in the console on plugin start, and database logging "starts successfully".

[TradeSystem] Enabling TradeSystem v2.1.3
01.08 13:57:16 [Server] INFO __________________________________________________________
01.08 13:57:16 [Server] INFO TradeSystem [2.1.3]
01.08 13:57:16 [Server] INFO Status:
01.08 13:57:16 [Server] INFO MC-Version: 1.19 (R0.1-SNAPSHOT, Paper)
01.08 13:57:16 [Server] INFO > Loading sounds
01.08 13:57:16 [Server] INFO > Loading blacklist
01.08 13:57:16 [Server] INFO ...got 3 blocked item(s)
01.08 13:57:16 [Server] INFO > Loading layouts
01.08 13:57:16 [Server] INFO ...got 5 layout(s)
01.08 13:57:16 [Server] INFO > Queuing database initializing task
01.08 13:57:16 [Server] INFO Finished (143ms)

[TradeSystem] Database logging was started successfully.

However there is an error is given when a trade is initiated, and two times after trade completion: (dbname redacted for privacy)

31.07 19:08:53 [Server] WARN java.sql.SQLSyntaxErrorException: Table '[dbname].tradelog' doesn't exist
31.07 19:08:53 [Server] WARN at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
31.07 19:08:53 [Server] WARN at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
31.07 19:08:53 [Server] WARN at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:916)
31.07 19:08:53 [Server] WARN at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1061)
31.07 19:08:53 [Server] WARN at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1009)
31.07 19:08:53 [Server] WARN at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1320)
31.07 19:08:53 [Server] WARN at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:994)
31.07 19:08:53 [Server] WARN at TradeSystem_v2.1.3 (1).jar//de.codingair.tradesystem.spigot.extras.tradelog.repository.adapters.MysqlTradeLogRepository.log(MysqlTradeLogRepository.java:35)
31.07 19:08:53 [Server] WARN at TradeSystem_v2.1.3 (1).jar//de.codingair.tradesystem.spigot.extras.tradelog.TradeLogService.lambda$log$0(TradeLogService.java:27)
31.07 19:08:53 [Server] WARN at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftTask.run(CraftTask.java:101)
31.07 19:08:53 [Server] WARN at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
31.07 19:08:53 [Server] WARN at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
31.07 19:08:53 [Server] WARN at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
31.07 19:08:53 [Server] WARN at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
31.07 19:08:53 [Server] WARN at java.base/java.lang.Thread.run(Thread.java:833)

Expected behavior Table should be created, and when trades are initiated and completed a log should be made in the table.

Screenshots See above for error logs.

Discord contact: Xelarender#8834

Xelarender avatar Aug 01 '22 14:08 Xelarender