Jump to content

Server crash


alexschopbarteld

Recommended Posts

Spoiler

        at com.walkingdead.walkingdeadmod.eventhandlers.EffectUtility.senddata(EffectUtility.java:63) ~[EffectUtility.class:?]
        at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_13_EffectUtility_senddata_PlayerLoggedInEvent.invoke(.dynamic) ~[?:?]
        at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?]
        at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:185) [EventBus.class:?]
        at net.minecraftforge.fml.common.FMLCommonHandler.firePlayerLoggedIn(FMLCommonHandler.java:574) [FMLCommonHandler.class:?]
        at net.minecraft.server.management.PlayerList.initializeConnectionToPlayer(PlayerList.java:214) [mt.class:?]
        at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.completeServerSideConnection(NetworkDispatcher.java:262) [NetworkDispatcher.class:?]
        at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.access$100(NetworkDispatcher.java:73) [NetworkDispatcher.class:?]
        at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher$1.func_73660_a(NetworkDispatcher.java:211) [NetworkDispatcher$1.class:?]
        at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:287) [er.class:?]
        at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:180) [mh.class:?]
        at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:743) [MinecraftServer.class:?]
        at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:384) [lh.class:?]
        at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:624) [MinecraftServer.class:?]
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:482) [MinecraftServer.class:?]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_131]
Caused by: java.lang.ClassNotFoundException: net.minecraft.client.Minecraft
        at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) ~[launchwrapper-1.12.jar:?]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_131]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_131]
        ... 16 more
Caused by: net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerException: Exception in class transformer net.minecraftforge.fml.common.asm.transformers.SideTransformer@495fac5f from coremod FMLCorePlugin
        at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:257) ~[craftbukkit.jar:?]
        at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279) ~[launchwrapper-1.12.jar:?]
        at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176) ~[launchwrapper-1.12.jar:?]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_131]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_131]
        ... 16 more
Caused by: java.lang.RuntimeException: Attempted to load class bes for invalid side SERVER
        at net.minecraftforge.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:62) ~[craftbukkit.jar:?]
        at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:253) ~[craftbukkit.jar:?]
        at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279) ~[launchwrapper-1.12.jar:?]
        at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176) ~[launchwrapper-1.12.jar:?]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_131]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_131]
        ... 16 more
[20:43:53] [Server thread/ERROR] [FML]: Index: 2 Listeners:
[20:43:53] [Server thread/ERROR] [FML]: 0: NORMAL
[20:43:53] [Server thread/ERROR] [FML]: 1: ASM: forge playerLogin(Lnet/minecraftforge/fml/common/gameevent/PlayerEvent$PlayerLoggedInEvent;)V
[20:43:53] [Server thread/ERROR] [FML]: 2: ASM: com.walkingdead.walkingdeadmod.eventhandlers.EffectUtility@44bf986d senddata(Lnet/minecraftforge/fml/common/gameevent/PlayerEvent$PlayerLoggedInEvent;)V
[20:43:53] [Server thread/ERROR]: Encountered an unexpected exception
java.lang.NoClassDefFoundError: net/minecraft/client/Minecraft
        at com.walkingdead.walkingdeadmod.eventhandlers.EffectUtility.senddata(EffectUtility.java:63) ~[EffectUtility.class:?]
        at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_13_EffectUtility_senddata_PlayerLoggedInEvent.invoke(.dynamic) ~[?:?]
        at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?]
        at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:185) ~[EventBus.class:?]
        at net.minecraftforge.fml.common.FMLCommonHandler.firePlayerLoggedIn(FMLCommonHandler.java:574) ~[FMLCommonHandler.class:?]
        at net.minecraft.server.management.PlayerList.initializeConnectionToPlayer(PlayerList.java:214) ~[mt.class:?]
        at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.completeServerSideConnection(NetworkDispatcher.java:262) ~[NetworkDispatcher.class:?]
        at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.access$100(NetworkDispatcher.java:73) ~[NetworkDispatcher.class:?]
        at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher$1.func_73660_a(NetworkDispatcher.java:211) ~[NetworkDispatcher$1.class:?]
        at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:287) ~[er.class:?]
        at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:180) ~[mh.class:?]
        at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:743) ~[MinecraftServer.class:?]
        at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:384) ~[lh.class:?]
        at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:624) ~[MinecraftServer.class:?]
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:482) [MinecraftServer.class:?]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_131]
Caused by: java.lang.ClassNotFoundException: net.minecraft.client.Minecraft
        at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) ~[launchwrapper-1.12.jar:?]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_131]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_131]
        ... 16 more
Caused by: net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerException: Exception in class transformer net.minecraftforge.fml.common.asm.transformers.SideTransformer@495fac5f from coremod FMLCorePlugin
        at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:257) ~[craftbukkit.jar:?]
        at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279) ~[launchwrapper-1.12.jar:?]
        at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176) ~[launchwrapper-1.12.jar:?]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_131]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_131]
        ... 16 more
Caused by: java.lang.RuntimeException: Attempted to load class bes for invalid side SERVER
        at net.minecraftforge.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:62) ~[craftbukkit.jar:?]
        at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:253) ~[craftbukkit.jar:?]
        at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279) ~[launchwrapper-1.12.jar:?]
        at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176) ~[launchwrapper-1.12.jar:?]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_131]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_131]
        ... 16 more

While trying to play my mod on a server i got the crash report above, the senddata line is part of my packethandler syncing my capability data from the client to the server.

public class PacketHandler {
	public static final SimpleNetworkWrapper NETWORK = new SimpleNetworkWrapper("superdupercoolawesomenetwork");
	
	
	public PacketHandler() {
	NETWORK.registerMessage(CWaterDataPacketHandler.class, CWaterDataPacket.class, 0, Side.CLIENT);
	}
}

how it is registered,

 

public class CWaterDataPacket implements IMessage{
	
	public CWaterDataPacket() {
		
	}
	EntityPlayer player = WalkingDeadMod.proxy.getClientPlayer();
	int blood = -1;
	int water = -1;
	int bleeding = 0;
	int infected = 0;
	
	public CWaterDataPacket(int water, int blood, int bleeding, int infected) {
	this.water = water;
	this.blood = blood;
	this.bleeding = bleeding;
	this.infected = infected;
	
	}

	@Override
	public void fromBytes(ByteBuf buf) {
		water = buf.readInt();
		blood = buf.readInt();	
		bleeding = buf.readInt();
		infected = buf.readInt();
			
	}

	@Override
	public void toBytes(ByteBuf buf) {
		buf.writeInt(water);
		buf.writeInt(blood);
		buf.writeInt(bleeding);
		buf.writeInt(infected);
	}
	
	public static class CWaterDataPacketHandler implements IMessageHandler<CWaterDataPacket, IMessage>{

	@Override
	public IMessage onMessage(CWaterDataPacket message, MessageContext ctx) {

		Minecraft.getMinecraft().addScheduledTask( () -> {

			EntityPlayer player = WalkingDeadMod.proxy.getClientPlayer();
			if(player != null) {


				WaterData.get((EntityPlayer)player).setBlood(message.blood);
				WaterData.get((EntityPlayer)player).setWater(message.water);
				WaterData.get((EntityPlayer)player).setinfected(message.infected);
				WaterData.get((EntityPlayer)player).setbleeding(message.bleeding);
			}

		});

		return null;

	}
	}
}

the imessage class



How i send it:
        PacketHandler.NETWORK.sendTo(new CWaterDataPacket(
                WaterData.get(event.player).getWater(), 
                WaterData.get(event.player).getBlood(),
                WaterData.get(event.player).getbleeding(),
                WaterData.get(event.player).getinfected()), (EntityPlayerMP)event.player);

Link to comment
Share on other sites

22 hours ago, alexschopbarteld said:

Caused by: java.lang.RuntimeException: Attempted to load class bes for invalid side SERVER

Looks like you're using a client-side class in common code. You need to identify it and then quarantine all references in your client proxy.

 

PS: You built your jar using gradlew build, right?

Edited by jeffryfisher

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.