Jump to content

[1.7.10] Server - No Class Def Found Error [SOLVED]


Rui

Recommended Posts

Used the tutorial provided by MrCaracal and some snooping around in other mods to figure out proxies. In short: entities went in the common proxy, renderer went in the client proxy. Shocker!

 

-------- SOLVED ---------

 

Yup, can't get my mod to work on a server.

 

 

---- Minecraft Crash Report ----

// Surprise! Haha. Well, this is awkward.

 

Time: 12/11/14 11:37 AM

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(Unknown Source)

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

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

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

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

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

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)

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

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

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

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

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

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.EventSubscriber.handleEvent(EventSubscriber.java:74)

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)

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

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

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

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

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

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

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

at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:117)

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

at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685)

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

at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)

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

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

... 29 more

Caused by: java.lang.NullPointerException

 

 

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

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

 

-- System Details --

Details:

Minecraft Version: 1.7.10

Operating System: Windows 7 (amd64) version 6.1

Java Version: 1.7.0_55, Oracle Corporation

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

Memory: 1926384864 bytes (1837 MB) / 2058878976 bytes (1963 MB) up to 2058878976 bytes (1963 MB)

JVM Flags: 2 total; -Xms2G -Xmx2G

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

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

FML: MCP v9.05 FML v7.10.85.1232 Minecraft Forge 10.13.2.1232 40 mods loaded, 40 mods active

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

FML{7.10.85.1232} [Forge Mod Loader] (forge.jar) Unloaded->Constructed

Forge{10.13.2.1232} [Minecraft Forge] (forge.jar) Unloaded->Constructed

appliedenergistics2-core{rv1-stable-1} [AppliedEnergistics2 Core] (minecraft.jar) Unloaded->Constructed

CodeChickenCore{1.0.4.29} [CodeChicken Core] (minecraft.jar) Unloaded->Constructed

ThaumicTinkerer-preloader{0.1} [Thaumic Tinkerer Core] (minecraft.jar) Unloaded->Constructed

doggytalents{v1.8.2a} [Doggy Talents] ([1.7.10] Doggy Talents - v1.8.2a.zip) Unloaded->Constructed

bspkrsCore{6.15} [bspkrsCore] ([1.7.10]bspkrsCore-universal-6.15.jar) Unloaded->Constructed

Treecapitator{1.7.10} [Treecapitator] ([1.7.10]Treecapitator-universal-2.0.4.jar) Unloaded->Constructed

AppleCore{1.0.1} [AppleCore] (AppleCore-mc1.7.10-1.0.1.jar) Unloaded->Constructed

appliedenergistics2{rv1-stable-1} [Applied Energistics 2] (appliedenergistics2-rv1-stable-1.jar) Unloaded->Constructed

BiomesOPlenty{2.1.0} [biomes O' Plenty] (BiomesOPlenty-1.7.10-2.1.0.1019-universal.jar) Unloaded->Constructed

Baubles{1.0.1.10} [baubles] (Baubles-1.7.10-1.0.1.10.jar) Unloaded->Constructed

Thaumcraft{4.2.1.4} [Thaumcraft] (Thaumcraft-1.7.10-4.2.1.4.jar) Unloaded->Constructed

Botania{r1.3-141} [botania] (Botania r1.3-141.jar) Unloaded->Constructed

BuildCraft|Core{6.1.8} [buildCraft] (buildcraft-6.1.8.jar) Unloaded->Constructed

BuildCraft|Builders{6.1.8} [bC Builders] (buildcraft-6.1.8.jar) Unloaded->Constructed

BuildCraft|Energy{6.1.8} [bC Energy] (buildcraft-6.1.8.jar) Unloaded->Constructed

BuildCraft|Factory{6.1.8} [bC Factory] (buildcraft-6.1.8.jar) Unloaded->Constructed

BuildCraft|Transport{6.1.8} [bC Transport] (buildcraft-6.1.8.jar) Unloaded->Constructed

BuildCraft|Silicon{6.1.8} [bC Silicon] (buildcraft-6.1.8.jar) Unloaded->Constructed

CarpentersBlocks{3.3.3} [Carpenter's Blocks] (Carpenter's Blocks v3.3.3 - MC 1.7.10.jar) Unloaded->Constructed

ChickenChunks{1.3.4.14} [ChickenChunks] (ChickenChunks-1.7.10-1.3.4.14-universal (1).jar) Unloaded->Constructed

clockworkphase{1.7.10_1.0a} [Clockwork Phase] (clockworkphase-1.7.10_1.0a.jar) Unloaded->Constructed

craftguide{1.6.8.1} [CraftGuide] (CraftGuide-1.6.8.1.zip) Unloaded->Constructed

IC2{2.2.654-experimental} [industrialCraft 2] (industrialcraft-2-2.2.654-experimental.jar) Unloaded->Constructed

EMT{2.0.0Alpha4} [Electro-Magic Tools] (ElectroMagicTools-1.7.10-2.0.0Alpha-28.jar) Unloaded->Constructed

eplus{3.0.2-d} [Enchanting Plus] (EnchantingPlus-1.7.10-3.0.2-d.jar) Unloaded->Constructed

EnderStorage{1.4.5.26} [EnderStorage] (EnderStorage-1.7.10-1.4.5.26-universal.jar) Unloaded->Constructed

ExtraUtilities{1.2.0} [Extra Utilities] (extrautilities-1.2.0.jar) Unloaded->Constructed

FastCraft{1.9} [FastCraft] (fastcraft-1.9.jar) Unloaded->Constructed

harvestcraft{1.7.10b} [Pam's HarvestCraft] (Pam's HarvestCraft 1.7.10c.jar) Unloaded->Constructed

HungerOverhaul{1.7.10-beta.2.jenkins30} [Hunger Overhaul] (HungerOverhaul-1.7.10-beta.2.jar) Unloaded->Constructed

LivelyAnimals{0.0001} [Lively Animals] (LivelyAnimals.jar) Unloaded

magicalcrops{1.7.2 - 0.1 ALPHA} [Magical Crops] (magicalcrops-1.7.10_0.1.jar) Unloaded

SpiceOfLife{1.2.2} [The Spice of Life] (SpiceOfLife-mc1.7.10-1.2.2.jar) Unloaded

StorageDrawers{1.2.0} [storage Drawers] (StorageDrawers-1.7.10-1.2.0.jar) Unloaded

thaumicenergistics{0.8.7b} [Thaumic Energistics] (thaumicenergistics-0.8.7b.jar) Unloaded

ThaumicTinkerer{unspecified} [Thaumic Tinkerer] (ThaumicTinkerer-2.5-1.7.10-161.jar) Unloaded

YALSM{2.1.3} [Yet Another Leather Smelting Mod] (yalsm-2.1.3.jar) Unloaded

AE2 Version: stable rv1-stable-1 for Forge 10.13.0.1187

Profiler Position: N/A (disabled)

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

Type: Dedicated Server (map_server.txt)

 

 

I assume it probably has something to do with rendering being client-side only, but I'm not sure how to account for that. I tried using the @ClientSide Only tag as a quick, temporary fix, but that didn't do it either.

 

... inexplicably, it does work on Single player but the back legs don't seem to render. I figured the problems were probably one in the same though.

Link to comment
Share on other sites

You are correct in that this issue is caused by rendering classes being "client-side" only - meaning that the rendering classes don't exist at all on a dedicated server.

 

What you need is a way to ensure that your rendering stuff is only called upon by the Minecraft client. The way this is accomplished is by the use of a proxy class, like Ernio said. You will create two classes with identical method signatures: one that will be loaded for the client, one that will be loaded for the server. If you make your client proxy class inherit from your common proxy class and override the common proxy's methods, you will be able to call methods in your common proxy instance and have them execute one way on the "client" and one way on the "server."

 

This is useful for separating your rendering stuff between "sides". If your rendering stuff is only registered in your client proxy, it will only ever load that stuff on a client. Here's the wiki tutorial on how to write a proxy class -> http://www.minecraftforge.net/wiki/Proxies

 

Attempting to use the @ClientSideOnly or @SideOnly annotations was logical given their names, but not quite what those are meant to be used for. Those annotations simply mean "the following field or method should only exist to the specified side". They can cause problems if one side is expecting that field or method and it is tagged to only "exist" on the other, so they should be used sparingly and only on fields and methods that you know will only be used on one side; one example being IIcon fields and related methods.

Link to comment
Share on other sites

How's that? I overrode the original model in the hashmap for entities, so I'm not sure what more I could do.

 

Edit: Well, that is extremely bizarre. I decided to update my mod to .1240, and once I transferred the files over I could see that the back legs didn't actually have a texture. Which is WEIRD because I DID texture them, and they showed up absolutely fine on eclipse. It's only when I moved folders that that showed up.

 

In any case, problems solved!

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.