MyWarp

MyWarp

220k Downloads

Import H2 to MariaDB fails

DanHCraft opened this issue ยท 4 comments

commented

Description of the Problem

I working on dev-Server on my local Windows and want to import the warps.h2.db in to the MariaDB-Database.
But I get only errors!

Steps to Reproduce

  1. Have a Server where the warps are stored in a h2.db file, stop the server.
  2. Change the storage type to mysql with following JDBC String:
    jdbc:mysql://localhost/
  3. Start the server and run following command after its done starting:
    mywarp import current jdbc:h2://mywarp:mywarp@./plugins/MyWarp/warps//mywarp

Log Output

[18:08:08 INFO]: io.github.mywarp.mywarp.internal.h2.message.DbException: (Message 90034 not found) [90034-200]
[18:08:08 WARN]: io.github.mywarp.mywarp.internal.h2.message.DbException: (Message 90034 not found) [90034-200]
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.h2.message.DbException.get(DbException.java:194)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.h2.message.TraceSystem.logWritingError(TraceSystem.java:294)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.h2.message.TraceSystem.openWriter(TraceSystem.java:315)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.h2.message.TraceSystem.writeFile(TraceSystem.java:263)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.h2.message.TraceSystem.write(TraceSystem.java:247)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.h2.message.Trace.error(Trace.java:194)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.h2.engine.Database.openDatabase(Database.java:325)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.h2.engine.Database.<init>(Database.java:301)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.h2.engine.Engine.openSession(Engine.java:74)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.h2.engine.Engine.openSession(Engine.java:192)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.h2.engine.Engine.createSessionAndValidate(Engine.java:171)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.h2.engine.Engine.createSession(Engine.java:166)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.h2.engine.Engine.createSession(Engine.java:29)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:340)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:173)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:152)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.h2.Driver.connect(Driver.java:69)
[18:08:08 WARN]:        at java.sql.DriverManager.getConnection(Unknown Source)
[18:08:08 WARN]:        at java.sql.DriverManager.getConnection(Unknown Source)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.bukkit.util.jdbc.SingleConnectionDataSource.initiate(SingleConnectionDataSource.java:163)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.bukkit.util.jdbc.SingleConnectionDataSource.getConnection(SingleConnectionDataSource.java:83)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.warp.storage.WarpStorageBuilder.build(WarpStorageBuilder.java:150)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.command.ImportCommands.current(ImportCommands.java:79)
[18:08:08 WARN]:        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[18:08:08 WARN]:        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[18:08:08 WARN]:        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[18:08:08 WARN]:        at java.lang.reflect.Method.invoke(Unknown Source)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.intake.parametric.MethodCallable.call(MethodCallable.java:66)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.intake.parametric.AbstractParametricCallable$1.call(AbstractParametricCallable.java:209)
[18:08:08 WARN]:        at java.util.concurrent.FutureTask.run(Unknown Source)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.intake.parametric.ParametricBuilder$DirectExecutorService.execute(ParametricBuilder.java:302)
[18:08:08 WARN]:        at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.intake.parametric.ParametricBuilder$DirectExecutorService.submit(ParametricBuilder.java:277)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.intake.parametric.ParametricBuilder$DirectExecutorService.submit(ParametricBuilder.java:253)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.intake.parametric.CommandExecutorWrapper.submit(CommandExecutorWrapper.java:44)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.intake.parametric.AbstractParametricCallable.call(AbstractParametricCallable.java:206)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.intake.dispatcher.SimpleDispatcher.execute(SimpleDispatcher.java:192)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.intake.dispatcher.SimpleDispatcher.call(SimpleDispatcher.java:175)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.intake.dispatcher.SimpleDispatcher.execute(SimpleDispatcher.java:192)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.intake.dispatcher.SimpleDispatcher.call(SimpleDispatcher.java:175)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.intake.dispatcher.SimpleDispatcher.execute(SimpleDispatcher.java:192)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.intake.dispatcher.SimpleDispatcher.call(SimpleDispatcher.java:175)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.command.CommandHandler.callCommand(CommandHandler.java:190)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.bukkit.MyWarpPlugin.onCommand(MyWarpPlugin.java:207)
[18:08:08 WARN]:        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45)
[18:08:08 WARN]:        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159)
[18:08:08 WARN]:        at org.bukkit.craftbukkit.v1_16_R2.CraftServer.dispatchCommand(CraftServer.java:800)
[18:08:08 WARN]:        at org.bukkit.craftbukkit.v1_16_R2.CraftServer.dispatchServerCommand(CraftServer.java:762)
[18:08:08 WARN]:        at net.minecraft.server.v1_16_R2.DedicatedServer.handleCommandQueue(DedicatedServer.java:409)
[18:08:08 WARN]:        at net.minecraft.server.v1_16_R2.DedicatedServer.b(DedicatedServer.java:376)
[18:08:08 WARN]:        at net.minecraft.server.v1_16_R2.MinecraftServer.a(MinecraftServer.java:1211)
[18:08:08 WARN]:        at net.minecraft.server.v1_16_R2.MinecraftServer.w(MinecraftServer.java:999)
[18:08:08 WARN]:        at net.minecraft.server.v1_16_R2.MinecraftServer.lambda$a$0(MinecraftServer.java:177)
[18:08:08 WARN]:        at java.lang.Thread.run(Unknown Source)
[18:08:08 WARN]: Caused by: io.github.mywarp.mywarp.internal.h2.jdbc.JdbcSQLNonTransientException: (Message 90034 not found) [90034-200]
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.h2.message.DbException.getJdbcSQLException(DbException.java:505)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.h2.message.DbException.getJdbcSQLException(DbException.java:429)
[18:08:08 WARN]:        ... 54 more
[18:08:08 WARN]: Caused by: io.github.mywarp.mywarp.internal.h2.message.DbException: (Message 90062 not found) [90062-200]
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.h2.message.DbException.get(DbException.java:205)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.h2.message.DbException.get(DbException.java:181)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.h2.store.fs.FilePathDisk.createDirectory(FilePathDisk.java:290)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.h2.store.fs.FileUtils.createDirectory(FileUtils.java:43)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.h2.store.fs.FileUtils.createDirectories(FileUtils.java:315)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.h2.store.fs.FileUtils.createDirectories(FileUtils.java:314)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.h2.store.fs.FileUtils.createDirectories(FileUtils.java:314)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.h2.store.fs.FileUtils.createDirectories(FileUtils.java:314)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.h2.message.TraceSystem.openWriter(TraceSystem.java:305)
[18:08:08 WARN]:        ... 51 more
[18:08:08 WARN]: Caused by: io.github.mywarp.mywarp.internal.h2.jdbc.JdbcSQLNonTransientException: (Message 90062 not found) [90062-200]
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.h2.message.DbException.getJdbcSQLException(DbException.java:505)
[18:08:08 WARN]:        at io.github.mywarp.mywarp.internal.h2.message.DbException.getJdbcSQLException(DbException.java:429)
[18:08:08 WARN]:        ... 60 more
[18:08:08 INFO]: Could not establish database connection in order to import warps: (Message 90062 not found) [90062-200]

Affected Version

  • MyWarp: 3.1+Travis-b1815.git-77239c4f28
  • Minecraft and Bukkit Implementation: git-Paper-184 (MC: 1.16.2) (Implementing API version 1.16.2-R0.1-SNAPSHOT)

Additional context

I have look up the error: it says that it can not write the trace file.

commented

I vaguely remember that there were some problems using relative paths. Could you try it again and specify the full path in the import command, that is mw import current jdbc:h2://mywarp:mywarp@/full/path/to/server/plugins/MyWarp/warps//mywarp?

commented

How I write the full path on windows???:

  • jdbc:h2://mywarp:mywarp@D:/Minecraft/Server/fcn/plugins/MyWarp/warps//mywarp
  • jdbc:h2://mywarp:mywarp@D://Minecraft/Server/fcn/plugins/MyWarp/warps//mywarp
  • jdbc:h2://mywarp:mywarp@file://D:/Minecraft/Server/fcn/plugins/MyWarp/warps//mywarp
  • jdbc:h2://mywarp:mywarp@/d/Minecraft/Server/fcn/plugins/MyWarp/warps//mywarp
  • jdbc:h2://mywarp:mywarp@D/Minecraft/Server/fcn/plugins/MyWarp/warps//mywarp

As info, all of the above I have tried befor.

commented

Unfortunately I do not have access to a Windows machine at the moment, so I cannot test it myself.

Could you try to move the database-file (warps.h2.db) into your main server directory (D://Minecraft/Server/fcn) and then use the following command: jdbc:h2://mywarp:mywarp@warps//mywarp?

commented

It works now, with:
mywarp import current "jdbc:h2://mywarp:mywarp@D:/Minecraft/Server/Test 1.16.2 Spigot/plugins/MyWarp/warps//mywarp"