Jump to content

Mod crashing server with ClassDefNotFound


WillDaBeast509

Recommended Posts

I'm trying to get my mod to work on servers, but its generating NoClassDefFound errors. Here's the report my coding partner gets:

 

stop----MinecraftCrashReport----

// I bet Cylons wouldn't have this problem.

 

Time: 6/21/13 1:17 PM

Description: Exception in server tick loop

 

java.lang.NoClassDefFoundError: net/minecraft/client/multiplayer/WorldClient

at java.lang.Class.getDeclaredConstructors0(Native Method)

at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)

at java.lang.Class.getConstructor0(Unknown Source)

at java.lang.Class.newInstance0(Unknown Source)

at java.lang.Class.newInstance(Unknown Source)

at cpw.mods.fml.common.network.NetworkModHandler.tryCreatingPacketHandler(NetworkModHandler.java:188)

at cpw.mods.fml.common.network.NetworkModHandler.<init>(NetworkModHandler.java:126)

at cpw.mods.fml.common.network.FMLNetworkHandler.registerNetworkMod(FMLNetworkHandler.java:261)

at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:465)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)

at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)

at com.google.common.eventbus.EventBus.post(EventBus.java:267)

at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:165)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)

at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)

at com.google.common.eventbus.EventBus.post(EventBus.java:267)

at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:98)

at cpw.mods.fml.common.Loader.loadMods(Loader.java:503)

at cpw.mods.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:85)

at cpw.mods.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:350)

at net.minecraft.server.dedicated.DedicatedServer.startServer(DedicatedServer.java:69)

at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:430)

at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)

Caused by: java.lang.ClassNotFoundException: net.minecraft.client.multiplayer.WorldClient

at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:238)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

... 35 more

Caused by: java.lang.RuntimeException: Attempted to load class net/minecraft/client/multiplayer/WorldClient for invalid side SERVER

at cpw.mods.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:50)

at cpw.mods.fml.relauncher.RelaunchClassLoader.runTransformers(RelaunchClassLoader.java:352)

at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:225)

... 37 more

 

 

A detailed walkthrough of the error, its code path and all known details is as follows:

---------------------------------------------------------------------------------------

 

-- System Details --

Details:

Minecraft Version: 1.5.2

Operating System: Windows 7 (x86) version 6.1

Java Version: 1.7.0_21, Oracle Corporation

Java VM Version: Java HotSpot™ Client VM (mixed mode), Oracle Corporation

Memory: 1039881640 bytes (991 MB) / 1060372480 bytes (1011 MB) up to 1060372480 bytes (1011 MB)

JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M

AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

Suspicious classes: FML and Forge are installed

IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0

FML: MCP v7.51 FML v5.2.2.684 Minecraft Forge 7.8.0.684 4 mods loaded, 4 mods active

mcp{7.44} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed

FML{5.2.2.684} [Forge Mod Loader] (coremods) Unloaded->Constructed

Forge{7.8.0.684} [Minecraft Forge] (coremods) Unloaded->Constructed

Flintlock_Guns{1.6_1} [Flintlock Guns Mod] (bin) Unloaded

Profiler Position: N/A (disabled)

Is Modded: Definitely; Server brand changed to 'fml,forge'

Type: Dedicated Server (map_server.txt)

 

And the one I get from running MCP's startserver.bat:

 

---- Minecraft Crash Report ----

// Don't be sad, have a hug! <3

 

Time: 6/21/13 8:07 PM

Description: Exception in server tick loop

 

java.lang.NoClassDefFoundError: net/minecraft/client/renderer/entity/Render

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:264)

at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:425)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:601)

at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)

at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)

at com.google.common.eventbus.EventBus.post(EventBus.java:267)

at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:192)

at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:172)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:601)

at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)

at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)

at com.google.common.eventbus.EventBus.post(EventBus.java:267)

at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:103)

at cpw.mods.fml.common.Loader.loadMods(Loader.java:504)

at cpw.mods.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:85)

at cpw.mods.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:350)

at net.minecraft.server.dedicated.DedicatedServer.startServer(DedicatedServer.java:69)

at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:431)

at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)

Caused by: java.lang.ClassNotFoundException: net.minecraft.client.renderer.entity.Render

at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:238)

at java.lang.ClassLoader.loadClass(ClassLoader.java:423)

at java.lang.ClassLoader.loadClass(ClassLoader.java:356)

... 30 more

Caused by: java.lang.RuntimeException: Attempted to load class net/minecraft/client/renderer/entity/Render for invalid side SERVER

at cpw.mods.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:50)

at cpw.mods.fml.relauncher.RelaunchClassLoader.runTransformers(RelaunchClassLoader.java:352)

at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:225)

... 32 more

 

 

A detailed walkthrough of the error, its code path and all known details is as follows:

---------------------------------------------------------------------------------------

 

-- System Details --

Details:

Minecraft Version: 1.5.2

Operating System: Windows 7 (amd64) version 6.1

Java Version: 1.7.0_06, Oracle Corporation

Java VM Version: Java HotSpot™ 64-Bit Server VM (mixed mode), Oracle Corporation

Memory: 1028989976 bytes (981 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB)

JVM Flags: 3 total; -Xincgc -Xms1024M -Xmx1024M

AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

Suspicious classes: FML and Forge are installed

IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0

FML: MCP v7.51 FML v5.2.23.736 Minecraft Forge 7.8.0.736 4 mods loaded, 4 mods active

mcp{7.51} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed

FML{5.2.23.736} [Forge Mod Loader] (coremods) Unloaded->Constructed

Forge{7.8.0.736} [Minecraft Forge] (coremods) Unloaded->Constructed

Flintlock_Guns{1.6_1} [Flintlock Guns Mod] (minecraft) Unloaded

Profiler Position: N/A (disabled)

Is Modded: Definitely; Server brand changed to 'fml,forge'

Type: Dedicated Server (map_server.txt)

 

 

If you need to see any code just ask, I haven't posted any yet because I have no clue what part of it to post. I assume somewhere in my mod is referencing WorldClient or Render, but I haven't found any occurrences of either. What's going on and how do we fix it? Thanks.

Link to comment
Share on other sites

Those annotations are not invalid. They are there for this exact reason.

You have a hard reference to client side classes in your mod.

You need to stop doing that.

You may not be referencing those classes directly but you may have subclasses of them referenced.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

My client proxy references net.minecraft.client.renderer.entity.RenderSnowball, a subclass of Render. This is the only reference to it in my mod, so I assume my proxy setup might be wrong. I'll post and see if anyone can help it.

 

CommonProxy

package com.willdabeast509.flintlocks.proxy;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;

import com.willdabeast509.flintlocks.cannon.ContainerCannon;
import com.willdabeast509.flintlocks.cannon.GuiCannon;
import com.willdabeast509.flintlocks.cannon.TileEntityCannon;

import cpw.mods.fml.common.network.IGuiHandler;

public class CommonProxy
{
public void registerRenderers()
{

}
}

 

ClientProxy

package com.willdabeast509.flintlocks.proxy;

import net.minecraft.client.renderer.entity.RenderSnowball;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;

import com.willdabeast509.flintlocks.mod_flintlocks;
import com.willdabeast509.flintlocks.cannon.GuiCannon;
import com.willdabeast509.flintlocks.cannon.TileEntityCannon;
import com.willdabeast509.flintlocks.entities.EntityCannonball;
import com.willdabeast509.flintlocks.entities.EntityDummy;
import com.willdabeast509.flintlocks.entities.EntityGrapeshot;
import com.willdabeast509.flintlocks.entities.EntityHandCannonball;
import com.willdabeast509.flintlocks.entities.EntityHeatshot;

import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

@SideOnly(Side.CLIENT)
public class ClientProxy extends CommonProxy
{
@Override
public void registerRenderers()
{
	RenderingRegistry.registerEntityRenderingHandler(EntityCannonball.class, new RenderSnowball(mod_flintlocks.Cannonball));
	RenderingRegistry.registerEntityRenderingHandler(EntityHandCannonball.class, new RenderSnowball(mod_flintlocks.Cannonball));
	RenderingRegistry.registerEntityRenderingHandler(EntityHeatshot.class, new RenderSnowball(mod_flintlocks.Heatshot));
	RenderingRegistry.registerEntityRenderingHandler(EntityGrapeshot.class, new RenderSnowball(mod_flintlocks.grape));
	RenderingRegistry.registerEntityRenderingHandler(EntityDummy.class, new RenderSnowball(mod_flintlocks.dummyrender));
}
}

 

mod_flintlocks, the sections pertaining to the proxies

@Mod(modid = "Flintlock_Guns", name = "Flintlock Guns Mod", version = "1.6_1")
@NetworkMod(clientSideRequired = true, serverSideRequired = false, channels={"test","guibuttons","requestgui","playfuse","playex"},packetHandler = PacketHandler.class)

public class mod_flintlocks
{
        @SidedProxy(clientSide="com.willdabeast509.flintlocks.proxy.ClientProxy", serverSide="com.willdabeast509.flintlocks.proxy.CommonProxy")
public static CommonProxy proxy;

        @Init
public void load(FMLInitializationEvent e)
{
                proxy.registerRenderers();
         }
}

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.

Announcements



×
×
  • Create New...

Important Information

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