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

    • WHO CAN HELP ME GET MY BITC0IN BACK WITH MIGHTY HACKER REC0VERY AND HIRE THE BEST HACKER FOR ALL HACKER SERVICES AT MIGHTY HACKER RECOVERY I can't believe the turn of events that led me to reclaiming my lost Bitc0in! A few months ago, I fell victim to a phishing scam and lost a significant amount of money. I was devastated and hopeless, believing I'd never see my money again. After some research, I came across Mighty Hacker Rec0very. Skeptical but desperate, I decided to contact them. I began chatting with one of their hackers and was immediately impressed by their expertise and professionalism. They patiently walked me through the recovery process, reassuring me along the way. They worked diligently on my case for several weeks, using their expertise to locate my lost funds. It was intense, but I felt optimistic for the first time since the scam. The communication was clear, and I received regular updates, which reduced my anxiety. Finally, I received the news that my Bitc0in had been successfully recovered! I couldn't believe it—I was ecstatic! I'm extremely grateful to the hacker who assisted me. Mighty Hacker Rec0very transformed a nightmare into a triumph, and I'm grateful beyond words. If anyone is in a similar situation, I highly recommend contacting them! WH@TS@PP: +1 8  45 6 99 50  44 EM@IL: support @ mightyhackerrecovery . com FB: mighty hacker recovery
    • A friend found this code, but I don't know where. It seems to be very outdated, maybe from 1.12? and so uses TextureManager$loadTexture and TextureManager$deleteTexture which both don't seem to exist anymore. It also uses Minecraft.getMinecraft().mcDataDir.getCanonicalPath() which I replaced with the resource location of my texture .getPath()? Not sure if thats entirely correct. String textureName = "entitytest.png"; File textureFile = null; try { textureFile = new File(Minecraft.getMinecraft().mcDataDir.getCanonicalPath(), textureName); } catch (Exception ex) { } if (textureFile != null && textureFile.exists()) { ResourceLocation MODEL_TEXTURE = Resources.OTHER_TESTMODEL_CUSTOM; TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager(); texturemanager.deleteTexture(MODEL_TEXTURE); Object object = new ThreadDownloadImageData(textureFile, null, MODEL_TEXTURE, new ImageBufferDownload()); texturemanager.loadTexture(MODEL_TEXTURE, (ITextureObject)object); return true; } else { return false; }   Then I've been trying to go through the source code of the reload resource packs from minecraft, to see if I can "cache" some data and simply reload some textures and swap them out, but I can't seem to figure out where exactly its "loading" the texture files and such. Minecraft$reloadResourcePacks(bool) seems to be mainly controlling the loading screen, and using this.resourcePackRepository.reload(); which is PackRepository$reload(), but that function seems to be using this absolute confusion of a line List<String> list = this.selected.stream().map(Pack::getId).collect(ImmutableList.toImmutableList()); and then this.discoverAvailable() and this.rebuildSelected. The rebuild selected seemed promising, but it seems to just be going through each pack and doing this to them? pack.getDefaultPosition().insert(list, pack, Functions.identity(), false); e.g. putting them into a list of packs and returning that into this.selected? Where do the textures actually get baked/loaded/whatever? Any info on how Minecraft reloads resource packs or how the texture manager works would be appreciated!
    • This might be a long shot , but do you remember how you fixed that?
    • Yeah, I'll start with the ones I added last night.  Wasn't crashing until today and wasn't crashing at all yesterday (+past few days since removing Cupboard), so deductive reasoning says it's likeliest to be one of the new ones.  A few horse armor mods and a corn-based add-on to Farmer's Delight, the latter which I hope to keep - I could do without the horse armor mods if necessary.  Let me try a few things and we'll see. 
  • Topics

×
×
  • Create New...

Important Information

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