
Update Flyway to version 5.x
TheE opened this issue ยท 5 comments
FlyWay 5.x has been released some time ago. However, it removes compatibility for directly upgrading databases using FlyWay 3.x:
Important note for users upgrading from Flyway 3.x: This release no longer supports a schema history table upgrade from Flyway 3.x. You must upgrade to Flyway 4.2.0 first before upgrading to Flyway 5.0.0.
This may be a problem as older versions of MyWarp 3 bundled FlyWay 3. Before updating we should evaluate whether this may be a problem.
Turns out there are some problems with FlyWay 5.2:
[00:33:41 ERROR]: Error occurred while enabling MyWarp v3.0-SNAPSHOT+unknown-b0.git-fc628ee647 (Is it up to date?)
java.lang.ExceptionInInitializerError: null
at io.github.mywarp.mywarp.internal.flyway.core.internal.util.FeatureDetector.isSlf4jAvailable(FeatureDetector.java:96) ~[?:?]
at io.github.mywarp.mywarp.internal.flyway.core.internal.logging.LogCreatorFactory.getLogCreator(LogCreatorFactory.java:39) ~[?:?]
at io.github.mywarp.mywarp.internal.flyway.core.api.logging.LogFactory.getLog(LogFactory.java:78) ~[?:?]
at io.github.mywarp.mywarp.internal.flyway.core.internal.util.FeatureDetector.<clinit>(FeatureDetector.java:25) ~[?:?]
at io.github.mywarp.mywarp.internal.flyway.core.internal.logging.LogCreatorFactory.getLogCreator(LogCreatorFactory.java:35) ~[?:?]
at io.github.mywarp.mywarp.internal.flyway.core.api.logging.LogFactory.getLog(LogFactory.java:78) ~[?:?]
at io.github.mywarp.mywarp.internal.flyway.core.Flyway.<clinit>(Flyway.java:86) ~[?:?]
at io.github.mywarp.mywarp.warp.storage.WarpStorageFactory.createTables(WarpStorageFactory.java:109) ~[?:?]
at io.github.mywarp.mywarp.warp.storage.WarpStorageFactory.createAndInitialize(WarpStorageFactory.java:105) ~[?:?]
at io.github.mywarp.mywarp.MyWarp.initialize(MyWarp.java:110) ~[?:?]
at io.github.mywarp.mywarp.bukkit.MyWarpPlugin.onEnable(MyWarpPlugin.java:114) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:254) ~[craftbukkit-1.13.2.jar:git-Bukkit-5be2ddc]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:332) [craftbukkit-1.13.2.jar:git-Bukkit-5be2ddc]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:402) [craftbukkit-1.13.2.jar:git-Bukkit-5be2ddc]
at org.bukkit.craftbukkit.v1_13_R2.CraftServer.enablePlugin(CraftServer.java:421) [craftbukkit-1.13.2.jar:git-Bukkit-5be2ddc]
at org.bukkit.craftbukkit.v1_13_R2.CraftServer.enablePlugins(CraftServer.java:347) [craftbukkit-1.13.2.jar:git-Bukkit-5be2ddc]
at net.minecraft.server.v1_13_R2.MinecraftServer.l(MinecraftServer.java:570) [craftbukkit-1.13.2.jar:git-Bukkit-5be2ddc]
at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:532) [craftbukkit-1.13.2.jar:git-Bukkit-5be2ddc]
at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:410) [craftbukkit-1.13.2.jar:git-Bukkit-5be2ddc]
at net.minecraft.server.v1_13_R2.DedicatedServer.init(DedicatedServer.java:270) [craftbukkit-1.13.2.jar:git-Bukkit-5be2ddc]
at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:675) [craftbukkit-1.13.2.jar:git-Bukkit-5be2ddc]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]
Caused by: io.github.mywarp.mywarp.internal.flyway.core.api.FlywayException: Unable to instantiate class io.github.mywarp.mywarp.internal.flyway.core.internal.logging.javautil.JavaUtilLogCreator : io.github.mywarp.mywarp.internal.flyway.core.internal.logging.javautil.JavaUtilLogCreator
at io.github.mywarp.mywarp.internal.flyway.core.internal.util.ClassUtils.instantiate(ClassUtils.java:63) ~[?:?]
at io.github.mywarp.mywarp.internal.flyway.core.internal.logging.LogCreatorFactory.getLogCreator(LogCreatorFactory.java:46) ~[?:?]
at io.github.mywarp.mywarp.internal.flyway.core.api.logging.LogFactory.getLog(LogFactory.java:78) ~[?:?]
at io.github.mywarp.mywarp.internal.flyway.core.internal.util.ClassUtils.<clinit>(ClassUtils.java:39) ~[?:?]
... 22 more
Caused by: java.lang.ClassNotFoundException: io.github.mywarp.mywarp.internal.flyway.core.internal.logging.javautil.JavaUtilLogCreator
at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[?:1.8.0_144]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_144]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) ~[?:1.8.0_144]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_144]
at java.lang.Class.forName0(Native Method) ~[?:1.8.0_144]
at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_144]
at io.github.mywarp.mywarp.internal.flyway.core.internal.util.ClassUtils.instantiate(ClassUtils.java:61) ~[?:?]
at io.github.mywarp.mywarp.internal.flyway.core.internal.logging.LogCreatorFactory.getLogCreator(LogCreatorFactory.java:46) ~[?:?]
at io.github.mywarp.mywarp.internal.flyway.core.api.logging.LogFactory.getLog(LogFactory.java:78) ~[?:?]
at io.github.mywarp.mywarp.internal.flyway.core.internal.util.ClassUtils.<clinit>(ClassUtils.java:39) ~[?:?]
... 22 more
Can be fixed by manually suppling our logger to Flyway by calling LogFactory.setLogCreator()
as the auto-dicovery of slf4j fails.
For reference:
Released Version | Bundled FlyWay Version |
---|---|
3.0-beta1 | 3.0 |
3.0-beta2 | 3.2.1 |
3.0-beta3 | 3.2.1 |
3.0-beta4 | 4.1.1 |
as of writing | 4.2.0 |
There are two options:
- Release version 3.0 bundling FlyWay 4.2.0, update afterwards.
- Publish a 'release candidate' build with FlyWay 4.2, then release 3.0 bundling FlyWay 5.0. Urge user of beta builds - so essentially everyone - to update to the RC before using the final build.
The next released version will definitely bundle 4.2.