Error converting H2 DB to MySQL
afaik4711 opened this issue ยท 12 comments
Hey there.
I'm trying to convert the H2 DB to MySQL. The tables are created right, but the import fails with following error in console:
[11:08:44] [Server thread/ERROR]: Error occurred while enabling Craftconomy3 v3.3-e72ac42-trv178 (Is it up to date?)
java.lang.NullPointerException
at java.util.UUID.fromString(UUID.java:192) ~[?:1.8.0_45]
at com.greatmancode.craftconomy3.converter.H2ToMySQLConverter.run(H2ToMySQLConverter.java:64) ~[?:?]
at com.greatmancode.craftconomy3.Common.convertDatabase(Common.java:412) ~[?:?]
at com.greatmancode.craftconomy3.Common.initialiseDatabase(Common.java:397) ~[?:?]
at com.greatmancode.craftconomy3.Common.onEnable(Common.java:143) ~[?:?]
at com.greatmancode.craftconomy3.tools.interfaces.BukkitLoader.onEnable(BukkitLoader.java:49) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) ~[spigot.jar:git-Spigot-d97e08b-880a532]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:340) [spigot.jar:git-Spigot-d97e08b-880a532]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) [spigot.jar:git-Spigot-d97e08b-880a532]
at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugin(CraftServer.java:357) [spigot.jar:git-Spigot-d97e08b-880a532]
at org.bukkit.craftbukkit.v1_8_R3.CraftServer.enablePlugins(CraftServer.java:317) [spigot.jar:git-Spigot-d97e08b-880a532]
at net.minecraft.server.v1_8_R3.MinecraftServer.s(MinecraftServer.java:414) [spigot.jar:git-Spigot-d97e08b-880a532]
at net.minecraft.server.v1_8_R3.MinecraftServer.k(MinecraftServer.java:378) [spigot.jar:git-Spigot-d97e08b-880a532]
at net.minecraft.server.v1_8_R3.MinecraftServer.a(MinecraftServer.java:333) [spigot.jar:git-Spigot-d97e08b-880a532]
at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:263) [spigot.jar:git-Spigot-d97e08b-880a532]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:524) [spigot.jar:git-Spigot-d97e08b-880a532]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45]
Any idea what this could be?
Thanks in advance.
Same problem, this log:
[00:59:27 INFO]: [Craftconomy3] Enabling Craftconomy3 v3.3-e72ac42-trv178 [00:59:27 INFO]: [Craftconomy3] Starting up! [00:59:27 INFO]: [Craftconomy3] Loading the Configuration [00:59:27 INFO]: [Craftconomy3] Loading listeners. [00:59:28 INFO]: [Craftconomy3] Loading commands [00:59:28 INFO]: [Craftconomy3] Loading the Database Manager [00:59:28 WARN]: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". [00:59:28 WARN]: SLF4J: Defaulting to no-operation (NOP) logger implementation [00:59:28 WARN]: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. [00:59:28 INFO]: [Craftconomy3] Starting database convertion to MySQL. This can take come time. [00:59:28 INFO]: [Craftconomy3] Starting database convertion to MySQL. This can take come time. [00:59:28 INFO]: [Craftconomy3] Getting accounts information [00:59:28 ERROR]: Error occurred while enabling Craftconomy3 v3.3-e72ac42-trv178 (Is it up to date?) java.lang.NullPointerException at java.util.UUID.fromString(UUID.java:192) ~[?:1.8.0_66-internal] at com.greatmancode.craftconomy3.converter.H2ToMySQLConverter.run(H2ToMySQLConverter.java:64) ~[?:?] at com.greatmancode.craftconomy3.Common.convertDatabase(Common.java:412) ~[?:?] at com.greatmancode.craftconomy3.Common.initialiseDatabase(Common.java:397) ~[?:?] at com.greatmancode.craftconomy3.Common.onEnable(Common.java:143) ~[?:?] at com.greatmancode.craftconomy3.tools.interfaces.BukkitLoader.onEnable(BukkitLoader.java:49) ~[?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) ~[craftbukkit_bigcraft.jar:git-Spigot-44c59bf-8f0f4ed] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:340) [craftbukkit_bigcraft.jar:git-Spigot-44c59bf-8f0f4ed] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) [craftbukkit_bigcraft.jar:git-Spigot-44c59bf-8f0f4ed] at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugin(CraftServer.java:356) [craftbukkit_bigcraft.jar:git-Spigot-44c59bf-8f0f4ed] at org.bukkit.craftbukkit.v1_8_R3.CraftServer.enablePlugins(CraftServer.java:316) [craftbukkit_bigcraft.jar:git-Spigot-44c59bf-8f0f4ed] at net.minecraft.server.v1_8_R3.MinecraftServer.s(MinecraftServer.java:418) [craftbukkit_bigcraft.jar:git-Spigot-44c59bf-8f0f4ed] at net.minecraft.server.v1_8_R3.MinecraftServer.k(MinecraftServer.java:382) [craftbukkit_bigcraft.jar:git-Spigot-44c59bf-8f0f4ed] at net.minecraft.server.v1_8_R3.MinecraftServer.a(MinecraftServer.java:337) [craftbukkit_bigcraft.jar:git-Spigot-44c59bf-8f0f4ed] at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:256) [craftbukkit_bigcraft.jar:git-Spigot-44c59bf-8f0f4ed] at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:528) [craftbukkit_bigcraft.jar:git-Spigot-44c59bf-8f0f4ed] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_66-internal]
log in readable format
Oh, never posted an answer here: The problem was a huge amount of broken database-entries mostly from converting to UUIDs in the past. I was unable to show database with common h2-tool but was able to restore entries into sql-commands in a textfile. After a lot of search and replace with Notepad++ and adding 425 UUIDs manually I fixed it by myself. Since then no new inconsistencies appeared so problem solved. Sad story for other people with this kind of error.
Andorokai maybe there is a way to hack the h2 database and convert into a sql query?
i got a different errors, now last dev "work" but it trow a error and don't convert...
http://hastebin.com/suyoninuyo.avrasm
Table "ECO_SKYBLOCK_ACCOUNT" not found;
Corrupt database as in my case. Try fixing it with this tool: http://www.h2database.com/html/quickstart.html#h2_console
If it shows no tables you can test exporting it with build in rescue-tools. Sorry for late reply, forgot you o:-)
is not corrupt, is a prefix issue, by using cc3_ work perfect, if i select other prefix it don't work
mmm i try
use default cc3, stop the converter, then rename the table to new name and in the config, might work ^^
mmm got a different error if i use cc3_
this plugin is a mess, and data are imported from essetnials data years ago, i bet these null values are still here, @greatman please fix this
http://hastebin.com/haposufano.avrasm