Jump to content

Problem with running mod on a server


telinc1

Recommended Posts

Well, I have a nasty problem. From Eclipse and go to Run -> Server the Minecraft Server opens, but it prints out the following error:

 

[sEVERE] Encountered an unexpected exception NoClassDefFoundError

java.lang.NoClassDefFoundError: net/minecraft/src/WorldClient

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

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

at cpw.mods.fml.common.FMLModContainer.parseSimpleFieldAnnotation(FMLModContainer.java:305)

at cpw.mods.fml.common.FMLModContainer.processFieldAnnotations(FMLModContainer.java:255)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

at net.minecraft.src.DedicatedServer.startServer(DedicatedServer.java:49)

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

at net.minecraft.src.ThreadServerApplication.run(ThreadServerApplication.java:17)

Caused by: java.lang.ClassNotFoundException: net.minecraft.src.WorldClient

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

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

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

... 31 more

Caused by: java.lang.NullPointerException

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

... 33 more

 

 

 

And it fails to run. I'm sure it's a problem from my mod, but I have no idea how to fix it. Any help is appriciated, thanks in advance!

 

P.S.: This also happens if I decompile, reobfuscate and put it on a normal server.

Link to comment
Share on other sites

You have a hard reference to a client only class, namely WorldClient, remove that hard reference...

Well, I searched around all files from project Minecraft and the only place I found "WorldClient" was on line 29 at cpw.mods.fml.common.modloader.BaseModProxy:

import net.minecraft.src.WorldClient;

 

Where else could this thing be?

Link to comment
Share on other sites

Its referenced in your mod somewhere. You'll have to find it, we're not gunna dig around your code telepathically for you..

Strange, but right after I ran a global search for the class, the problem fixed itself and then I just needed to play around with ModLoader.addArmor(); to make it work and the server is okay. Or at least the test server only... I will see about the real one. But thanks anyways.

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.