V1 Database upgrade failed with ClassCastException: class org.h2.value.ValueLong cannot be cast to class org.h2.value.ValueArray
ffd000 opened this issue ยท 3 comments
Description
I updated LuckPerms and the old database fails to upgrade to V2.
Reproduction Steps
- Plugin loads
- Old sqlite DB is not upgraded and doesn't work
Expected Behaviour
The database should upgrade automatically
Server Details
git-Paper-125 (MC: 1.19.2)
LuckPerms Version
v5.4.102
Logs and Configs
[16:25:16 WARN]: [LuckPerms] [DB Upgrade] Found an old (v1) H2 database file. LuckPerms will now attempt to upgrade it to v2 (this is a one time operation).
[16:25:16 INFO]: [LuckPerms] [DB Upgrade] Stage 1: Exporting the old database to an intermediary file...
[16:25:16 WARN]: [LuckPerms] Something went wrong whilst upgrading the LuckPerms database. Please report this on GitHub.
org.h2.jdbc.JdbcSQLNonTransientException: General error: "java.lang.ClassCastException: class org.h2.value.ValueLong cannot be cast to class org.h2.value.ValueArray (org.h2.value.ValueLong and org.h2.value.ValueArray are in unnamed module of loader me.lucko.luckperms.common.dependencies.classloader.IsolatedClassLoader @53aac7e6)"; SQL statement:
SCRIPT TO 'D:\Bukkit\paper 1.19\plugins\LuckPerms\luckperms-h2-migration.sql' [50000-199]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:502) ~[?:?]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:427) ~[?:?]
at org.h2.message.DbException.get(DbException.java:194) ~[?:?]
at org.h2.message.DbException.convert(DbException.java:347) ~[?:?]
at org.h2.command.Command.executeQuery(Command.java:219) ~[?:?]
at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:227) ~[?:?]
at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:205) ~[?:?]
at me.lucko.luckperms.common.storage.implementation.sql.connection.file.H2ConnectionFactory$MigrateH2ToVersion2.run(H2ConnectionFactory.java:137) ~[?:?]
at me.lucko.luckperms.common.storage.implementation.sql.connection.file.H2ConnectionFactory.init(H2ConnectionFactory.java:68) ~[?:?]
at me.lucko.luckperms.common.storage.implementation.sql.SqlStorage.init(SqlStorage.java:164) ~[?:?]
at me.lucko.luckperms.common.storage.Storage.init(Storage.java:115) ~[?:?]
at me.lucko.luckperms.common.storage.StorageFactory.getInstance(StorageFactory.java:87) ~[?:?]
at me.lucko.luckperms.common.plugin.AbstractLuckPermsPlugin.enable(AbstractLuckPermsPlugin.java:193) ~[?:?]
at me.lucko.luckperms.bukkit.LPBukkitBootstrap.onEnable(LPBukkitBootstrap.java:175) ~[?:?]
at me.lucko.luckperms.bukkit.loader.BukkitLoaderPlugin.onEnable(BukkitLoaderPlugin.java:50) ~[LuckPerms-Bukkit-5.4.102.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:189) ~[paper-1.19.4.jar:git-Paper-550]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[paper-1.19.4.jar:git-Paper-550]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_19_R3.CraftServer.enablePlugin(CraftServer.java:563) ~[paper-1.19.4.jar:git-Paper-550]
at org.bukkit.craftbukkit.v1_19_R3.CraftServer.enablePlugins(CraftServer.java:474) ~[paper-1.19.4.jar:git-Paper-550]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:274) ~[paper-1.19.4.jar:git-Paper-550]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1104) ~[paper-1.19.4.jar:git-Paper-550]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[paper-1.19.4.jar:git-Paper-550]
at java.lang.Thread.run(Thread.java:1589) ~[?:?]
Caused by: java.lang.ClassCastException: class org.h2.value.ValueLong cannot be cast to class org.h2.value.ValueArray (org.h2.value.ValueLong and org.h2.value.ValueArray are in unnamed module of loader me.lucko.luckperms.common.dependencies.classloader.IsolatedClassLoader @53aac7e6)
at org.h2.mvstore.db.MVPrimaryIndex$MVStoreCursor.get(MVPrimaryIndex.java:459) ~[?:?]
at org.h2.command.dml.ScriptCommand.generateInsertValues(ScriptCommand.java:405) ~[?:?]
at org.h2.command.dml.ScriptCommand.query(ScriptCommand.java:299) ~[?:?]
at org.h2.command.CommandContainer.query(CommandContainer.java:145) ~[?:?]
at org.h2.command.Command.executeQuery(Command.java:202) ~[?:?]
Extra Details
No response
Please see comments on the other issues: https://github.com/LuckPerms/LuckPerms/issues?q=Something+went+wrong+whilst+upgrading+the+LuckPerms+database
Please see comments on the other issues: https://github.com/LuckPerms/LuckPerms/issues?q=Something+went+wrong+whilst+upgrading+the+LuckPerms+database
One of those other "issues" is mine and it never got fixed until this day and it was the second post. Since then many more have reported the exact same.... The very first "issue" like this one wasn't resolved either and all the other ones you just mention to go look. look at what?
It mentions he thinks his is corrupted, you never traced that as a cause you just said "Your best bet is the H2 recovery tool - but if it's corrupted then there's not a whole lot I can do to help, sorry" which literally is just you assuming it's a corruption and now assuming mine and all the others are corrupted, but nothing is corrupted. It just doesn't work. We've even made a brand new one with just 5 permissions and that didn't convert. that's corrupt aswell?