Jump to content

NoClassDefFoundError.


snocavotia

Recommended Posts

I've been working so hard for weeks on my mod only to get this error crap, and I cannot understand what is causing it. It seems that maybe bukkit is conflicting with my forge mod but idk how. Please someone... anyone explain this error.

 

P.S. This mod works on the internal server in single player.

 

---- Minecraft Crash Report ----

// Hey, that tickles! Hehehe!

 

Time: 11/19/13 10:54 PM

Description: Exception in server tick loop

 

java.lang.NoClassDefFoundError: net/minecraft/client/entity/EntityClientPlayerMP

at packets.DemoMod.<clinit>(DemoMod.java:24)

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

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

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

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:313)

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:201)

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

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:313)

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:112)

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

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

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

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

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

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

Caused by: java.lang.ClassNotFoundException: net.minecraft.client.entity.EntityClientPlayerMP

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

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

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

... 31 more

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

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

at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:274)

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

... 33 more

 

 

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

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

 

-- System Details --

Details:

Minecraft Version: 1.6.4

Operating System: Windows 7 (amd64) version 6.1

Java Version: 1.7.0_40, Oracle Corporation

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

Memory: 1618054224 bytes (1543 MB) / 2058878976 bytes (1963 MB) up to 2058878976 bytes (1963 MB)

JVM Flags: 2 total; -Xms2048M -Xmx2048M

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

CraftBukkit Information:

  Running:

  Failed to handle CraftCrashReport:

java.lang.NullPointerException

at org.bukkit.Bukkit.getName(Bukkit.java:72)

at org.bukkit.craftbukkit.v1_6_R3.CraftCrashReport.call(CraftCrashReport.java:19)

at net.minecraft.crash.CrashReportCategory.func_71500_a(CrashReportCategory.java:106)

at net.minecraft.crash.CrashReport.func_71504_g(CrashReport.java:58)

at net.minecraft.crash.CrashReport.<init>(CrashReport.java:40)

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

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

 

FML: MCP v8.11 FML v6.4.45.952 Minecraft Forge 9.11.1.952 5 mods loaded, 5 mods active

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

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

Forge{9.11.1.952} [Minecraft Forge] (server.jar) Unloaded->Constructed

pokemart{1.0.1} [pokemart] (packets.zip) Unloaded

pixelmon{2.5.2} [Pixelmon] (Pixelmon 2.5.2.zip) Unloaded

Profiler Position: N/A (disabled)

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

Type: Dedicated Server (map_server.txt)

Link to comment
Share on other sites

Let's look at the vital parts of the error log:

Description: Exception in server tick loop
java.lang.NoClassDefFoundError: net/minecraft/client/entity/EntityClientPlayerMP
at packets.DemoMod.<clinit>(DemoMod.java:24)

 

I see one big problem here, do you see it?

Let me point it out for ya:

Description: Exception in server tick loop

and then:

java.lang.NoClassDefFoundError: net/minecraft/client/entity/EntityClientPlayerMP

 

Your mod is trying to access a CLIENT class on the server side for some reason.

Remember that the server has no client files, it has no concepts of rendering and so on.

And it does not have an EntityClientPlayerMP class as it's a Client only class.

 

Therefore it will crash when trying to find a class which does not exist in the servers code.

 

In case you aren't convinced read the lover parts of the output:

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

 

Now the first thing you must to is to test your mod on a server only modded by forge!

Regular forge not the bukkit/forge crossover. And NO other mods!

If that works then try the bukkit forge thing, and if that works add one and one mod until it crashes.

The problem is with that mod most likely, or your mods interaction with it but I doubt that :)

  • Thanks 1

If you guys dont get it.. then well ya.. try harder...

Link to comment
Share on other sites

Also all of my classes are in one package if i make a package called client and put my client code in it will it change it?

 

No.

 

You need to use a common and client proxy and use that class (which is sided through annotations) to register the tick handler.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

^ What draco said.

Or you can do an if check to see which side you are on and then do it.

 

Using the proxy files are simpler though and as your mod grows so does the amount of things belonging to the client only so having using the proxy is really handy for separating client only code from the rest of the code :)

If you guys dont get it.. then well ya.. try harder...

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.