BenCodez / VotifierPlus

Fork of votifier
14 stars 6 forks source link

Java 11 package javax.xml.bind does not exist #6

Closed Elocrypt closed 3 years ago

Elocrypt commented 4 years ago

Source According to the release-notes, Java 11 removed the Java EE modules:

java.xml.bind (JAXB) - REMOVED

See JEP 320 for more info.

You can fix the issue by using alternate versions of the Java EE technologies. Simply add Maven dependencies that contain the classes you need:

<dependency>
  <groupId>javax.xml.bind</groupId>
  <artifactId>jaxb-api</artifactId>
  <version>2.3.0</version>
</dependency>
<dependency>
  <groupId>com.sun.xml.bind</groupId>
  <artifactId>jaxb-core</artifactId>
  <version>2.3.0</version>
</dependency>
<dependency>
  <groupId>com.sun.xml.bind</groupId>
  <artifactId>jaxb-impl</artifactId>
  <version>2.3.0</version>
</dependency>

Jakarta EE 8 update (Mar 2020)

Instead of using old JAXB modules you can fix the issue by using Jakarta XML Binding from Jakarta EE 8:

<dependency>
  <groupId>jakarta.xml.bind</groupId>
  <artifactId>jakarta.xml.bind-api</artifactId>
  <version>2.3.3</version>
</dependency>

[CONSOLE LOG]

Enabling VotifierPlus v1.0.1
23.04 04:54:05 [Server] WARN Enabled plugin with unregistered PluginClassLoader VotifierPlus v1.0.1
23.04 04:54:05 [Server] ERROR Error occurred while enabling VotifierPlus v1.0.1 (Is it up to date?)
23.04 04:54:05 [Server] INFO java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter
23.04 04:54:05 [Server] INFO at com.vexsoftware.votifier.crypto.RSAIO.load(RSAIO.java:96) ~[?:?]
23.04 04:54:05 [Server] INFO at com.vexsoftware.votifier.VotifierPlus.onPostLoad(VotifierPlus.java:93) ~[?:?]
23.04 04:54:05 [Server] INFO at com.ben12345rocks.VotifierPlus.AdvancedCore.AdvancedCorePlugin.onEnable(AdvancedCorePlugin.java:742) ~[?:?]
23.04 04:54:05 [Server] INFO at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[patched_1.15.2.jar:git-Paper-205]
23.04 04:54:05 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:364) ~[patched_1.15.2.jar:git-Paper-205]
23.04 04:54:05 [Server] INFO at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:483) ~[patched_1.15.2.jar:git-Paper-205]
23.04 04:54:05 [Server] INFO at net.Lenni0451.SpigotPluginManager.utils.PluginUtils.enablePlugin(PluginUtils.java:123) ~[?:?]
23.04 04:54:05 [Server] INFO at net.Lenni0451.SpigotPluginManager.commands.subs.Restart_Sub.execute(Restart_Sub.java:64) ~[?:?]
23.04 04:54:05 [Server] INFO at net.Lenni0451.SpigotPluginManager.commands.PluginManager_Command.lambda$0(PluginManager_Command.java:103) ~[?:?]
23.04 04:54:05 [Server] INFO at net.Lenni0451.SpigotPluginManager.commands.PluginManager_Command.onCommand(PluginManager_Command.java:113) ~[?:?]
23.04 04:54:05 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[patched_1.15.2.jar:git-Paper-205]
23.04 04:54:05 [Server] INFO at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159) ~[patched_1.15.2.jar:git-Paper-205]
23.04 04:54:05 [Server] INFO at org.bukkit.craftbukkit.v1_15_R1.CraftServer.dispatchCommand(CraftServer.java:752) ~[patched_1.15.2.jar:git-Paper-205]
23.04 04:54:05 [Server] INFO at org.bukkit.Bukkit.dispatchCommand(Bukkit.java:704) ~[patched_1.15.2.jar:git-Paper-205]
23.04 04:54:05 [Server] INFO at net.Lenni0451.SpigotPluginManager.commands.subs.Gui_Sub.onInventoryClick(Gui_Sub.java:214) ~[?:?]
23.04 04:54:05 [Server] INFO at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor43.execute(Unknown Source) ~[?:?]
23.04 04:54:05 [Server] INFO at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.15.2.jar:git-Paper-205]
23.04 04:54:05 [Server] INFO at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.15.2.jar:git-Paper-205]
23.04 04:54:05 [Server] INFO at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.15.2.jar:git-Paper-205]
23.04 04:54:05 [Server] INFO at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607) ~[patched_1.15.2.jar:git-Paper-205]
23.04 04:54:05 [Server] INFO at net.minecraft.server.v1_15_R1.PlayerConnection.a(PlayerConnection.java:2333) ~[patched_1.15.2.jar:git-Paper-205]
23.04 04:54:05 [Server] INFO at net.minecraft.server.v1_15_R1.PacketPlayInWindowClick.a(SourceFile:32) ~[patched_1.15.2.jar:git-Paper-205]
23.04 04:54:05 [Server] INFO at net.minecraft.server.v1_15_R1.PacketPlayInWindowClick.a(SourceFile:10) ~[patched_1.15.2.jar:git-Paper-205]
23.04 04:54:05 [Server] INFO at net.minecraft.server.v1_15_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:23) ~[patched_1.15.2.jar:git-Paper-205]
23.04 04:54:05 [Server] INFO at net.minecraft.server.v1_15_R1.TickTask.run(SourceFile:18) ~[patched_1.15.2.jar:git-Paper-205]
23.04 04:54:05 [Server] INFO at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.15.2.jar:git-Paper-205]
23.04 04:54:05 [Server] INFO at net.minecraft.server.v1_15_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.15.2.jar:git-Paper-205]
23.04 04:54:05 [Server] INFO at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.15.2.jar:git-Paper-205]
23.04 04:54:05 [Server] INFO at net.minecraft.server.v1_15_R1.MinecraftServer.ba(MinecraftServer.java:1077) ~[patched_1.15.2.jar:git-Paper-205]
23.04 04:54:05 [Server] INFO at net.minecraft.server.v1_15_R1.MinecraftServer.executeNext(MinecraftServer.java:1070) ~[patched_1.15.2.jar:git-Paper-205]
23.04 04:54:05 [Server] INFO at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeAll(IAsyncTaskHandler.java:95) ~[patched_1.15.2.jar:git-Paper-205]
23.04 04:54:05 [Server] INFO at net.minecraft.server.v1_15_R1.MinecraftServer.a(MinecraftServer.java:1203) ~[patched_1.15.2.jar:git-Paper-205]
23.04 04:54:05 [Server] INFO at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:946) ~[patched_1.15.2.jar:git-Paper-205]
23.04 04:54:05 [Server] INFO at java.lang.Thread.run(Thread.java:834) [?:?]
23.04 04:54:05 [Server] INFO Disabling VotifierPlus v1.0.1
23.04 04:54:05 [Server] INFO Votifier disabled.
BenCodez commented 4 years ago

If you want you can make a pull request. If not I'll get around to this eventually.

cpt22 commented 4 years ago

Please fix this when you have a chance, it completely breaks the plugin when not used on java 8

BenCodez commented 4 years ago

I'll look at it

BenCodez commented 4 years ago

http://ben12345rocks.com/job/VotifierPlus/

How's that?

cpt22 commented 4 years ago

This issue was fixed! However I am having a different issue now, opening new issue ticket.