Posted April 9, 201312 yr Before the 1.5 update I had an error upon trying to launch my mod, and I was unable to fix it. I am getting a different error after the update. Here it is: cpw.mods.fml.common.LoaderException: java.lang.ClassNotFoundException: sonick.common.mod.TestMod at cpw.mods.fml.common.LoadController.transition(LoadController.java:142) at cpw.mods.fml.common.Loader.loadMods(Loader.java:512) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:160) at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:407) at net.minecraft.client.MinecraftAppletImpl.func_71384_a(SourceFile:56) at net.minecraft.client.Minecraft.run(Minecraft.java:729) at java.lang.Thread.run(Thread.java:680) Caused by: java.lang.ClassNotFoundException: sonick.common.mod.TestMod at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:211) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at cpw.mods.fml.common.ModClassLoader.loadClass(ModClassLoader.java:56) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:446) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) 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(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) 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:502) ... 5 more Caused by: java.lang.NullPointerException at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:200) ... 32 more --- END ERROR REPORT e5393c19 ---------- Thanks!
April 9, 201312 yr You might want to give us your code, and it seems like the error is from your class not found. A few questions: 1) Are you sure you installed the mod correctly? 2) Are you sure that package includes the mod? 3) Are you sure that if you are using the in-game 'Eclipse' MC launcher you made sure the class had the right name? 4) Are you sure 'sonick.common.mod.TestMod' is the correct path? [On the top of TestMod.java, you must have] package sonick.common.mod; @Mod(modid = "TestMod", name = "TestMod", version = "v0.1") @NetworkMod(clientSideRequired = true, serverSideRequired = false) public class TestMod { //if you extend or implement add that. //then add stuff here }
April 9, 201312 yr Author Thats is what I have, but here is the code: package sonick.common.mod; import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.Init; import cpw.mods.fml.common.Mod.PostInit; import cpw.mods.fml.common.Mod.PreInit; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; @Mod(modid = "TestMod", name = "Sonick's Test Mod", version = "0.1") @NetworkMod(clientSideRequired = true, serverSideRequired = false) public class TestMod { @PreInit public void preInit(FMLPreInitializationEvent event) { } @Init public void load(FMLInitializationEvent event) { } @PostInit public void postInit(FMLPostInitializationEvent event) { } } Also this is all that I have right now because I didn't want to do anything else if it wouldn't work.
April 11, 201312 yr Author Hey, I still need help so if anyone can help me it would be greatly appreciated.
April 11, 201312 yr You're missing the @Instance and @SidedProxy annotations, not sure if they are required though. Take a look at this tutorial page
April 12, 201312 yr Author I added both @Instance and @SidedProxy, along with the proxy classes, and still got the same error. Is it possible that there is something wrong with my forge, or even my computer? I have been getting a similar error for a few different versions so this is very strange.
April 12, 201312 yr Author Thanks so much, it worked! I have never seen that is how you do it before and now I feel really stupid.
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.