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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Baba  Serege [[+27-73 590 8989]] has experience of 27 years in helping and guiding many people from all over the world. His psychic abilities may help you answer and resolve many unanswered questions. He specialize in helping women and men from all walks of life.. 1) – Bring back lost lover. even if lost for a long time. 2) – My lover is abusing alcohol, partying and cheating on me I urgently need help” 3) – Divorce or court issues. 4) – Is your love falling apart? 5) – Do you want your love to grow stronger? 6) – Is your partner losing interest in you? 7) – Do you want to catch your partner cheating on you? – We help to keep your partner faithful and loyal to you. 9) – We recover love and happiness when relationship breaks down. 10) – Making your partner loves you alone. 11) – We create loyalty and everlasting love between couples. 12) – Get a divorce settlement quickly from your ex-partner. 13) – We create everlasting love between couples. 14) – We help you look for the best suitable partner. 15) – We bring back lost lover even if lost for a long time. 16) – We strengthen bonds in all love relationship and marriages 17) – Are you an herbalist who wants to get more powers? 18) – Buy a house or car of your dream. 19) – Unfinished jobs by other doctors come to me. 20) – I help those seeking employment. 21) – Pensioners free treatment. 22) – Win business tenders and contracts. 23) – Do you need to recover your lost property? 24) – Promotion at work and better pay. 25) – Do you want to be protected from bad spirits and nightmares? 26) – Financial problems. 27) – Why you can’t keep money or lovers? 28) – Why you have a lot of enemies? 29) – Why you are fired regularly on jobs? 30) – Speed up money claim spell, delayed payments, pension and accident funds 31) – I help students pass their exams/interviews. 33) – Removal of bad luck and debts. 34) – Are struggling to sleep because of a spiritual wife or husband. 35- ) Recover stolen property
    • OLXTOTO adalah situs bandar togel online resmi terbesar dan terpercaya di Indonesia. Bergabunglah dengan OLXTOTO dan nikmati pengalaman bermain togel yang aman dan terjamin. Koleksi toto 4D dan togel toto terlengkap di OLXTOTO membuat para member memiliki pilihan taruhan yang lebih banyak. Sebagai situs togel terpercaya, OLXTOTO menjaga keamanan dan kenyamanan para membernya dengan sistem keamanan terbaik dan enkripsi data. Transaksi yang cepat, aman, dan terpercaya merupakan jaminan dari OLXTOTO. Nikmati layanan situs toto terbaik dari OLXTOTO dengan tampilan yang user-friendly dan mudah digunakan. Layanan pelanggan tersedia 24/7 untuk membantu para member. Bergabunglah dengan OLXTOTO sekarang untuk merasakan pengalaman bermain togel yang menyenangkan dan menguntungkan.
    • Baba  Serege [[+27-73 590 8989]] has experience of 27 years in helping and guiding many people from all over the world. His psychic abilities may help you answer and resolve many unanswered questions. He specialize in helping women and men from all walks of life.. 1) – Bring back lost lover. even if lost for a long time. 2) – My lover is abusing alcohol, partying and cheating on me I urgently need help” 3) – Divorce or court issues. 4) – Is your love falling apart? 5) – Do you want your love to grow stronger? 6) – Is your partner losing interest in you? 7) – Do you want to catch your partner cheating on you? – We help to keep your partner faithful and loyal to you. 9) – We recover love and happiness when relationship breaks down. 10) – Making your partner loves you alone. 11) – We create loyalty and everlasting love between couples. 12) – Get a divorce settlement quickly from your ex-partner. 13) – We create everlasting love between couples. 14) – We help you look for the best suitable partner. 15) – We bring back lost lover even if lost for a long time. 16) – We strengthen bonds in all love relationship and marriages 17) – Are you an herbalist who wants to get more powers? 18) – Buy a house or car of your dream. 19) – Unfinished jobs by other doctors come to me. 20) – I help those seeking employment. 21) – Pensioners free treatment. 22) – Win business tenders and contracts. 23) – Do you need to recover your lost property? 24) – Promotion at work and better pay. 25) – Do you want to be protected from bad spirits and nightmares? 26) – Financial problems. 27) – Why you can’t keep money or lovers? 28) – Why you have a lot of enemies? 29) – Why you are fired regularly on jobs? 30) – Speed up money claim spell, delayed payments, pension and accident funds 31) – I help students pass their exams/interviews. 33) – Removal of bad luck and debts. 34) – Are struggling to sleep because of a spiritual wife or husband. 35- ) Recover stolen property
  • Topics

×
×
  • Create New...

Important Information

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