Closed carreb closed 2 years ago
Hello @carreb ! :wave:
Worth noting that you're using a really old version of the plugin which isn't compatible with Minecraft 1.17. You're likely going to bump into more problems.
I've tried figuring out how to open the database to see all the player data and set it back to normal manually but I can't seem to find where that is stored.
I suggest using DBeaver to explore the data from H2 databases (https://dbeaver.io/). It's an open-source tool and should help you figure out what is going with the data. π
I just sent a payment for the premium resource and I'll try loading the backup with the new version since I'm not too sure which file I need to access in DBeaver, since when I try to open achievements.mv.db in it it gives me a bunch of stuff that I can't interpret. It shows up like this
After loading up the new version I am getting an internal error, here's what the log says.
[19:54:47] [Server thread/INFO]: [AdvancedAchievements] Enabling AdvancedAchievements v8.0.0
[19:54:47] [Server thread/INFO]: [AdvancedAchievements] Backing up and loading configuration files...
[19:54:48] [Server thread/WARN]: [AdvancedAchievements] Overriding configuration: disabling JobsReborn category.
[19:54:48] [Server thread/WARN]: [AdvancedAchievements] Ensure you have placed JobsReborn in your plugins folder or add JobsReborn to the DisabledCategories list in config.yml.
[19:54:48] [Server thread/INFO]: [AdvancedAchievements] Loaded 118 achievements in 17 categories.
[19:54:48] [Server thread/INFO]: [AdvancedAchievements] 38 disabled categories: [DistancePig, Fireworks, DistanceGliding, DistanceMinecart, Breeding, Snowballs, Riptides, ItemPickups, RaidsWon, Crafts, Brewing, JobsReborn, AdvancementsCompleted, ItemDrops, TargetsShot, HoePlowings, DistanceHorse, ItemBreaks, AnvilsUsed, DistanceBoat, Trades, EatenItems, MaxLevel, Fertilising, Taming, PlayerCommands, DistanceFoot, PetMasterGive, Connections, ConsumedPotions, Beds, DistanceLlama, Enchantments, MusicDiscs, EnderPearls, PetMasterReceive, Smelting, Eggs]
[19:54:48] [Server thread/INFO]: [AdvancedAchievements] Registering event listeners...
[19:54:48] [Server thread/INFO]: [AdvancedAchievements] Initialising h2 database...
[19:54:48] [Server thread/ERROR]: [AdvancedAchievements] Error while attempting to retrieve a connection to the database:
com.hm.h2.jdbc.JdbcSQLNonTransientException: (Message HY000 not found) [50000-200]
at com.hm.h2.message.DbException.getJdbcSQLException(DbException.java:505) ~[AdvancedAchievements.jar:?]
at com.hm.h2.message.DbException.getJdbcSQLException(DbException.java:429) ~[AdvancedAchievements.jar:?]
at com.hm.h2.message.DbException.get(DbException.java:194) ~[AdvancedAchievements.jar:?]
at com.hm.h2.message.DbException.convert(DbException.java:347) ~[AdvancedAchievements.jar:?]
at com.hm.h2.engine.Database.openDatabase(Database.java:333) ~[AdvancedAchievements.jar:?]
at com.hm.h2.engine.Database.(Database.java:301) ~[AdvancedAchievements.jar:?]
at com.hm.h2.engine.Engine.openSession(Engine.java:74) ~[AdvancedAchievements.jar:?]
at com.hm.h2.engine.Engine.openSession(Engine.java:192) ~[AdvancedAchievements.jar:?]
at com.hm.h2.engine.Engine.createSessionAndValidate(Engine.java:171) ~[AdvancedAchievements.jar:?]
at com.hm.h2.engine.Engine.createSession(Engine.java:166) ~[AdvancedAchievements.jar:?]
at com.hm.h2.engine.Engine.createSession(Engine.java:29) ~[AdvancedAchievements.jar:?]
at com.hm.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:340) ~[AdvancedAchievements.jar:?]
at com.hm.h2.jdbc.JdbcConnection.(JdbcConnection.java:173) ~[AdvancedAchievements.jar:?]
at com.hm.h2.jdbc.JdbcConnection.(JdbcConnection.java:152) ~[AdvancedAchievements.jar:?]
at com.hm.h2.Driver.connect(Driver.java:69) ~[AdvancedAchievements.jar:?]
at java.sql.DriverManager.getConnection(DriverManager.java:677) ~[java.sql:?]
at java.sql.DriverManager.getConnection(DriverManager.java:251) ~[java.sql:?]
at com.hm.achievement.db.AbstractFileDatabaseManager.createConnection(AbstractFileDatabaseManager.java:63) ~[AdvancedAchievements.jar:?]
at com.hm.achievement.db.AbstractDatabaseManager.getConnection(AbstractDatabaseManager.java:159) ~[AdvancedAchievements.jar:?]
at com.hm.achievement.db.AbstractDatabaseManager.initialise(AbstractDatabaseManager.java:100) ~[AdvancedAchievements.jar:?]
at com.hm.achievement.lifecycle.PluginLoader.loadAdvancedAchievements(PluginLoader.java:132) ~[AdvancedAchievements.jar:?]
at com.hm.achievement.AdvancedAchievements.onEnable(AdvancedAchievements.java:49) ~[AdvancedAchievements.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[patched_1.17.1.jar:git-Paper-214]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[patched_1.17.1.jar:git-Paper-214]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:500) ~[patched_1.17.1.jar:git-Paper-214]
at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugin(CraftServer.java:535) ~[patched_1.17.1.jar:git-Paper-214]
at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugins(CraftServer.java:449) ~[patched_1.17.1.jar:git-Paper-214]
at net.minecraft.server.MinecraftServer.loadWorld(MinecraftServer.java:654) ~[patched_1.17.1.jar:git-Paper-214]
at net.minecraft.server.dedicated.DedicatedServer.init(DedicatedServer.java:306) ~[patched_1.17.1.jar:git-Paper-214]
at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1141) ~[patched_1.17.1.jar:git-Paper-214]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318) ~[patched_1.17.1.jar:git-Paper-214]
at java.lang.Thread.run(Thread.java:831) [?:?]
Caused by: java.lang.IllegalStateException: Unable to read the page at position 98371106314050121 [1.4.200/6]
at com.hm.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:950) ~[AdvancedAchievements.jar:?]
at com.hm.h2.mvstore.MVStore.readPage(MVStore.java:2213) ~[AdvancedAchievements.jar:?]
at com.hm.h2.mvstore.MVMap.readPage(MVMap.java:672) ~[AdvancedAchievements.jar:?]
at com.hm.h2.mvstore.MVMap.readOrCreateRootPage(MVMap.java:688) ~[AdvancedAchievements.jar:?]
at com.hm.h2.mvstore.MVMap.setRootPos(MVMap.java:682) ~[AdvancedAchievements.jar:?]
at com.hm.h2.mvstore.MVStore.openMap(MVStore.java:576) ~[AdvancedAchievements.jar:?]
at com.hm.h2.mvstore.MVStore.openMap(MVStore.java:535) ~[AdvancedAchievements.jar:?]
at com.hm.h2.mvstore.MVStore.openMap(MVStore.java:516) ~[AdvancedAchievements.jar:?]
at com.hm.h2.mvstore.MVStore.removeMap(MVStore.java:2742) ~[AdvancedAchievements.jar:?]
at com.hm.h2.engine.Database.handleUpgradeIssues(Database.java:866) ~[AdvancedAchievements.jar:?]
at com.hm.h2.engine.Database.open(Database.java:742) ~[AdvancedAchievements.jar:?]
at com.hm.h2.engine.Database.openDatabase(Database.java:307) ~[AdvancedAchievements.jar:?]
... 27 more
Caused by: java.lang.IllegalStateException: Unsupported type 17 [1.4.200/3]
at com.hm.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:950) ~[AdvancedAchievements.jar:?]
at com.hm.h2.mvstore.type.ObjectDataType.newType(ObjectDataType.java:165) ~[AdvancedAchievements.jar:?]
at com.hm.h2.mvstore.type.ObjectDataType.read(ObjectDataType.java:229) ~[AdvancedAchievements.jar:?]
at com.hm.h2.mvstore.type.ObjectDataType.read(ObjectDataType.java:114) ~[AdvancedAchievements.jar:?]
at com.hm.h2.mvstore.Page.read(Page.java:605) ~[AdvancedAchievements.jar:?]
at com.hm.h2.mvstore.Page.read(Page.java:239) ~[AdvancedAchievements.jar:?]
at com.hm.h2.mvstore.MVStore.readPage(MVStore.java:2211) ~[AdvancedAchievements.jar:?]
at com.hm.h2.mvstore.MVMap.readPage(MVMap.java:672) ~[AdvancedAchievements.jar:?]
at com.hm.h2.mvstore.MVMap.readOrCreateRootPage(MVMap.java:688) ~[AdvancedAchievements.jar:?]
at com.hm.h2.mvstore.MVMap.setRootPos(MVMap.java:682) ~[AdvancedAchievements.jar:?]
at com.hm.h2.mvstore.MVStore.openMap(MVStore.java:576) ~[AdvancedAchievements.jar:?]
at com.hm.h2.mvstore.MVStore.openMap(MVStore.java:535) ~[AdvancedAchievements.jar:?]
at com.hm.h2.mvstore.MVStore.openMap(MVStore.java:516) ~[AdvancedAchievements.jar:?]
at com.hm.h2.mvstore.MVStore.removeMap(MVStore.java:2742) ~[AdvancedAchievements.jar:?]
at com.hm.h2.engine.Database.handleUpgradeIssues(Database.java:866) ~[AdvancedAchievements.jar:?]
at com.hm.h2.engine.Database.open(Database.java:742) ~[AdvancedAchievements.jar:?]
at com.hm.h2.engine.Database.openDatabase(Database.java:307) ~[AdvancedAchievements.jar:?]
... 27 more
[19:54:48] [Server thread/ERROR]: [AdvancedAchievements] A non recoverable error was encountered while loading the plugin, disabling it:
com.hm.achievement.exception.PluginLoadError: Failed to establish database connection. Please verify your settings in config.yml.
at com.hm.achievement.db.AbstractDatabaseManager.initialise(AbstractDatabaseManager.java:101) ~[AdvancedAchievements.jar:?]
at com.hm.achievement.lifecycle.PluginLoader.loadAdvancedAchievements(PluginLoader.java:132) ~[AdvancedAchievements.jar:?]
at com.hm.achievement.AdvancedAchievements.onEnable(AdvancedAchievements.java:49) ~[AdvancedAchievements.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[patched_1.17.1.jar:git-Paper-214]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[patched_1.17.1.jar:git-Paper-214]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:500) ~[patched_1.17.1.jar:git-Paper-214]
at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugin(CraftServer.java:535) ~[patched_1.17.1.jar:git-Paper-214]
at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugins(CraftServer.java:449) ~[patched_1.17.1.jar:git-Paper-214]
at net.minecraft.server.MinecraftServer.loadWorld(MinecraftServer.java:654) ~[patched_1.17.1.jar:git-Paper-214]
at net.minecraft.server.dedicated.DedicatedServer.init(DedicatedServer.java:306) ~[patched_1.17.1.jar:git-Paper-214]
at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1141) ~[patched_1.17.1.jar:git-Paper-214]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318) ~[patched_1.17.1.jar:git-Paper-214]
at java.lang.Thread.run(Thread.java:831) [?:?]
[19:54:48] [Server thread/INFO]: [AdvancedAchievements] Disabling AdvancedAchievements v8.0.0
[19:54:48] [Server thread/INFO]: [AdvancedAchievements] Remaining requests sent to the database, plugin successfully disabled.
There's a few things that I recognize in the log, which are
Unsupported type 17 [1.4.200/3]
java.lang.IllegalStateException: Unable to read the page at position 98371106314050121 [1.4.200/6]
Those errors also came up when I was trying to view the database in DBeaver
Here are the files that I believe are causing the problems if you need to look through them along with the trace files databases.zip
@PyvesB
@PyvesB
It's only been a few hours, a bit of patience would be appreciated, rather than an eager ping.
@PyvesB
It's only been a few hours, a bit of patience would be appreciated, rather than an eager ping.
Okay, sorry for being a bit impatient.
Here's a fixed database: achievements.mv.zip
However, as it's smaller than the files you shared, I suspect there might be some data loss. I can't tell for sure as the database files were corrupted. There are bug reports open on the H2 repository for the same error message, for example https://github.com/h2database/h2database/issues/2078. H2 can be a bit temperamental, especially when a server crashes or if you try to replace a plugin JAR on a running server.
Thank you very much for your help. Again sorry for being a bit impatient, I pinged because I didn't know if you had seen the message. I'll check to see if there is any major data loss.
No worries, you're welcome!
Okay, all the data is there, but for some reason when I put the database in, whenever you get an achievement it doesnt actually get completed, and whenever you restart the server you are able to get the achievement again. I'm not sure why this is. I was trying to look through the database to see where the playerdata was stored but I couldn't find it. I could see sections such as playername
and other things but I cannot see what is stored under the column.
Attached is an image of what a "completed" (bugged) achievement looks like
This glitch does not occur when the database is not on the server.
I'll check for errors in the log tomorrow and report back if I find anything.
In addition to checking the logs for errors, I'd suggest removing all other plugins and see if the issue happens in isolation. Database driver conflicts can sometimes happen between Minecraft plugins.
Alright, I'm checking logs now and then will see if it happens in isolation
[19:55:32] [Server thread/INFO]: [AdvancedAchievements] Backing up and loading configuration files...
[19:55:32] [Server thread/WARN]: [AdvancedAchievements] Overriding configuration: disabling JobsReborn category.
[19:55:32] [Server thread/WARN]: [AdvancedAchievements] Ensure you have placed JobsReborn in your plugins folder or add JobsReborn to the DisabledCategories list in config.yml.
[19:55:32] [Server thread/INFO]: [AdvancedAchievements] Loaded 129 achievements in 17 categories.
[19:55:32] [Server thread/INFO]: [AdvancedAchievements] 38 disabled categories: [Riptides, DistanceMinecart, Breeding, HoePlowings, Snowballs, Taming, Enchantments, MusicDiscs, DistanceHorse, JobsReborn, AnvilsUsed, DistanceGliding, DistanceBoat, ItemBreaks, Fireworks, Trades, ItemPickups, PetMasterReceive, PlayerCommands, MaxLevel, DistancePig, Crafts, Brewing, ConsumedPotions, Fertilising, Eggs, ItemDrops, DistanceLlama, AdvancementsCompleted, EatenItems, Connections, TargetsShot, EnderPearls, Smelting, DistanceFoot, RaidsWon, Beds, PetMasterGive]
[19:55:32] [Server thread/INFO]: [AdvancedAchievements] Registering event listeners...
[19:55:32] [Server thread/INFO]: [AdvancedAchievements] Initialising h2 database...
[19:55:33] [Server thread/INFO]: [AdvancedAchievements] Setting up command executor and custom tab completers...
[19:55:33] [Server thread/INFO]: [AdvancedAchievements] Launching scheduled tasks...
[19:55:33] [Server thread/INFO]: [AdvancedAchievements] Registering permissions...
[19:55:33] [Thread-28/INFO]: [AdvancedAchievements] Checking for plugin update...
[19:55:33] [Thread-28/WARN]: [AdvancedAchievements] Update available: v8.0.1! Download at https://www.spigotmc.org/resources/83466
That is the only thing I can find from advancedachievements in the log. Checking to see if it works on a server with no other plugins now
The issue persists even with only advancedachievements
If it would be possible for you to show me where I can find a player name or uuid and a value for each specific achievement I will just set everything manually
If it would be possible for you to show me where I can find a player name or uuid and a value for each specific achievement
Achievement reception is stored in the achievements
table, which contains the player UUIDs, achievement Name
parameters, and reception dates.
It's really weird that the H2 database is not persisting any of the data, and no errors are reported. I'd advise trying to switch to SQLite, which is a bit slower but more stable. DBeaver should allow to migrate if you wanted to retain the data.
I will try converting and seeing if it works properly.
As the project is being sunset, I'll go ahead and close this (see #1083 or spigotmc.org for more information). The repository will be archived soon. Hopefully the tips I've provided here will have helped you solve the issue. π
π Advanced Achievements version
6.2.1
π₯ Server version
1.17.1
π° Spigot username
carrreb
πΎ Wiki read
π Existing issues
β Description
Upon updating to 1.17.1, all of my achievements data was reset. I am using the H2 Database and can supply files from before and after updating if needed. The plugin functions fine, but all existing player data was reset. I've tried uploading the backed up versions but they are not being read properly or being erased when uploaded. I've tried figuring out how to open the database to see all the player data and set it back to normal manually but I can't seem to find where that is stored.
If you need to see some of the files, please let me know the names of them and I will send them asap.![image](https://user-images.githubusercontent.com/32069843/138563352-eee2ff92-b64d-4bc9-bd0f-6216236f4531.png)
β Configuration