Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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!

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

}

 

  • 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.

You're missing the @Instance and @SidedProxy annotations, not sure if they are required though.

 

Take a look at this tutorial page

  • 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.

  • 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.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.