funkemunky / Atlas

The most compact, accurate, and featureful Bukkit plugin API.
109 stars 22 forks source link

NoClassDefFoundError #44

Open TalXVI opened 2 years ago

TalXVI commented 2 years ago

Since Atlas 1.12.0, the server throws this error when a player joins any server not running Minecraft version 1.19.

lost connection: Internal Exception: java.lang.NoClassDefFoundError: Could not initialize class cc.funkemunky.api.tinyprotocol.packet.types.WrappedGameProfile

Gyztor commented 2 years ago

can second this

[05:58:07 INFO]: [GyztorMizirath|/[iphere]:60110] <-> ServerConnector [lobby] has connected
[05:58:07 INFO]: [GyztorMizirath] disconnected with: Kicked whilst connecting to lobby: Internal Exception: java.lang.NoClassDefFoundError: Could not initialize class cc.funkemunky.api.tinyprotocol.packet.types.WrappedGameProfile
Gyztor commented 2 years ago

This kicks at the backend server layer not the bungee layer though i wouldnt be surpised if that was also apart of the problem too

Hikari0964 commented 2 years ago

i have this problem too XD

Gyztor commented 2 years ago

can confirm as of commit 538e8df29b85b3a715706d53635616d3e6713f6b it still exists

Sybsuper commented 2 years ago

After running the server in debug mode I get the following stack trace:

[09:06:27 WARN]: java.lang.ExceptionInInitializerError
[09:06:27 WARN]:        at cc.funkemunky.api.tinyprotocol.packet.login.WrappedPacketLoginInStart.process(WrappedPacketLoginInStart.java:30)
[09:06:27 WARN]:        at cc.funkemunky.api.tinyprotocol.api.NMSObject.<init>(NMSObject.java:44)
[09:06:27 WARN]:        at cc.funkemunky.api.tinyprotocol.packet.login.WrappedPacketLoginInStart.<init>(WrappedPacketLoginInStart.java:24)
[09:06:27 WARN]:        at cc.funkemunky.api.tinyprotocol.api.packets.channelhandler.TinyProtocol1_8$PacketInterceptor.channelRead(TinyProtocol1_8.java:536)
[09:06:27 WARN]:        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
[09:06:27 WARN]:        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
[09:06:27 WARN]:        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:168)
[09:06:27 WARN]:        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
[09:06:27 WARN]:        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
[09:06:27 WARN]:        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:163)
[09:06:27 WARN]:        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
[09:06:27 WARN]:        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
[09:06:27 WARN]:        at com.comphenix.protocol.injector.netty.ChannelInjector$2.channelRead(ChannelInjector.java:292)
[09:06:27 WARN]:        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
[09:06:27 WARN]:        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
[09:06:27 WARN]:        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:163)
[09:06:27 WARN]:        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
[09:06:27 WARN]:        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
[09:06:27 WARN]:        at net.minecraft.server.v1_8_R3.LegacyPingHandler.channelRead(SourceFile:94)
[09:06:27 WARN]:        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
[09:06:27 WARN]:        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
[09:06:27 WARN]:        at io.netty.handler.timeout.ReadTimeoutHandler.channelRead(ReadTimeoutHandler.java:150)
[09:06:27 WARN]:        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
[09:06:27 WARN]:        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
[09:06:27 WARN]:        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787)
[09:06:27 WARN]:        at io.netty.channel.epoll.EpollSocketChannel$EpollSocketUnsafe.epollInReady(EpollSocketChannel.java:722)
[09:06:27 WARN]:        at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:326)
[09:06:27 WARN]:        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:264)
[09:06:27 WARN]:        at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
[09:06:27 WARN]:        at java.lang.Thread.run(Thread.java:748)
[09:06:27 WARN]: Caused by: java.lang.IllegalArgumentException: Cannot find com.mojang.authlib.PropertyMap
[09:06:27 WARN]:        at cc.funkemunky.api.tinyprotocol.reflection.Reflection.getCanonicalClass(Reflection.java:407)
[09:06:27 WARN]:        at cc.funkemunky.api.tinyprotocol.reflection.Reflection.getClass(Reflection.java:374)
[09:06:27 WARN]:        at cc.funkemunky.api.tinyprotocol.packet.types.WrappedGameProfile.<clinit>(WrappedGameProfile.java:29)
[09:06:27 WARN]:        ... 30 more
[09:06:27 WARN]: Caused by: java.lang.ClassNotFoundException: com.mojang.authlib.PropertyMap
[09:06:27 WARN]:        at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
[09:06:27 WARN]:        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:101)
[09:06:27 WARN]:        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:86)
[09:06:27 WARN]:        at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
[09:06:27 WARN]:        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
[09:06:27 WARN]:        at java.lang.Class.forName0(Native Method)
[09:06:27 WARN]:        at java.lang.Class.forName(Class.java:264)
[09:06:27 WARN]:        at cc.funkemunky.api.tinyprotocol.reflection.Reflection.getCanonicalClass(Reflection.java:405)
[09:06:27 WARN]:        ... 32 more

Now I must say I don't have much experience with MC authlib nor reflections, but I am pretty sure instead of com.mojang.authlib.PropertyMap the PropertyMap class is located in com.mojang.authlib.properties.PropertyMap (I could be completely wrong, if so sorry, but I think the error is caused by this change: https://github.com/funkemunky/Atlas/commit/a505cc2be798bd85676e784162a42f3ec56fe566#diff-2acdbda2c236d564e0a0d27dd83501b3bd077a0e2128bc91286926159d925d0c)

assada commented 2 years ago

Same issue

nuym commented 2 years ago

same question

Sybsuper commented 2 years ago

Seems like the issue is fixed in this repo, just not in the latest release jar. After cloning the repo and building the jar locally it worked as it is supposed to.

mitchngwen commented 2 years ago

Since this is closed I assume it's fixed but you forgot to tell us?