PyvesB / advanced-achievements

:fireworks: Popular plugin that adds unique and challenging achievements to Minecraft servers.
https://www.spigotmc.org/resources/83466
GNU General Public License v3.0
199 stars 215 forks source link

Advancedachivments database write error #1006

Closed MG141 closed 3 years ago

MG141 commented 3 years ago

I am experiencing the following error all the time. The database credentials are confirmed ok.

[18:52:20 ERROR]: [AdvancedAchievements] Database write error while batching statistic updates: java.sql.BatchUpdateException: Data truncation: Data too long for column 'item' at row 1 at jdk.internal.reflect.GeneratedConstructorAccessor221.newInstance(Unknown Source) ~[?:?] at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?] at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?] at com.mysql.cj.util.Util.handleNewInstance(Util.java:192) ~[patched_1.16.5.jar:git-Paper-590] at com.mysql.cj.util.Util.getInstance(Util.java:167) ~[patched_1.16.5.jar:git-Paper-590] at com.mysql.cj.util.Util.getInstance(Util.java:174) ~[patched_1.16.5.jar:git-Paper-590] at com.mysql.cj.jdbc.exceptions.SQLError.createBatchUpdateException(SQLError.java:224) ~[patched_1.16.5.jar:git-Paper-590] at com.mysql.cj.jdbc.StatementImpl.executeBatchInternal(StatementImpl.java:891) ~[patched_1.16.5.jar:git-Paper-590] at com.mysql.cj.jdbc.StatementImpl.executeBatch(StatementImpl.java:794) ~[patched_1.16.5.jar:git-Paper-590] at com.hm.achievement.db.AsyncCachedRequestsSender.lambda$sendBatchedRequests$0(AsyncCachedRequestsSender.java:69) ~[?:?] at com.hm.achievement.db.SQLWriteOperation.attemptWrites(SQLWriteOperation.java:45) ~[?:?] at com.hm.achievement.db.AsyncCachedRequestsSender.sendBatchedRequests(AsyncCachedRequestsSender.java:74) ~[?:?] at com.hm.achievement.db.AsyncCachedRequestsSender.run(AsyncCachedRequestsSender.java:45) ~[?:?] at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:100) ~[patched_1.16.5.jar:git-Paper-590] at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) ~[patched_1.16.5.jar:git-Paper-590] at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.16.5.jar:git-Paper-590] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?] at java.lang.Thread.run(Thread.java:834) [?:?] Caused by: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data too long for column 'item' at row 1 at com.mysql.cj.jdbc.StatementImpl.executeUpdateInternal(StatementImpl.java:1333) ~[patched_1.16.5.jar:git-Paper-590] at com.mysql.cj.jdbc.StatementImpl.executeBatchInternal(StatementImpl.java:857) ~[patched_1.16.5.jar:git-Paper-590] ... 11 more

If someone could help me, I woukd be very grateful.

Kind Regards,

Sebastjan Zavrl

PyvesB commented 3 years ago

Hello @MG141 ! 👋🏻

My guess is that you need to increase the value of the TableMaxSizeOfGroupedSubcategories configuration parameter, as one of the subcategory groupings for Crafts achievements is longer than the current value. 😉

MG141 commented 3 years ago

Hhhmmm any idea what the based values are. Will 512 be enough?

PyvesB commented 3 years ago

No clue, as I've not seen your config! Simply count the number of characters in the groupings (e.g. wood|stone -> 10) and select a value of TableMaxSizeOfGroupedSubcategories that is greater or equal to the value of the longest grouping.

PyvesB commented 3 years ago

Assuming the problem was solved thanks to the provided help, closing.