Jump to content

FML loads @Mod File, promptly declares it can't find it


QuantumLeaf7895

Recommended Posts

Hi All,

I've been working on a mod, and have encountered an aggravating problem.  My mod, written using eclipse 4.2, the 7.x branch of MCP on a Mac OSX 10.6.8 (with the default java SDK and python implementations) refuses to compile properly.  While the mod runs perfectly inside eclipse, compiling, reobfuscating it and loading into a .minecraft folder with the latest version of forge properly installed (I checked by booting minecraft with a different mod loaded -- it worked fine) causes minecraft to crash, throwing a ClassNotFoundException related to the @Mod class -- Even when I remove literally every other class. 

 

The console error log looks like this:

 

9/23/12 10:49:55 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] 2012-09-23 22:49:55 [iNFO] [ForgeModLoader] Forge Mod Loader version 3.0.196.366 for Minecraft client:1.3.2, server:1.3.2 loading

9/23/12 10:49:58 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] 2012-09-23 22:49:58 [iNFO] [sTDOUT] 27 achievements

9/23/12 10:49:58 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] 2012-09-23 22:49:58 [iNFO] [sTDOUT] 195 recipes

9/23/12 10:49:58 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] 2012-09-23 22:49:58 [iNFO] [sTDOUT] Setting user: quantumleaf7895, -1941226498013063396

9/23/12 10:49:59 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] 2012-09-23 22:49:59 [iNFO] [sTDOUT] LWJGL Version: 2.4.2

9/23/12 10:50:00 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] 2012-09-23 22:50:00 [iNFO] [ForgeModLoader] Attempting early MinecraftForge initialization

9/23/12 10:50:00 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] 2012-09-23 22:50:00 [iNFO] [ForgeModLoader] Completed early MinecraftForge initialization

9/23/12 10:50:00 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] 2012-09-23 22:50:00 [iNFO] [ForgeModLoader] Searching /Users/matthew38/Library/Application Support/minecraft/mods for mods

9/23/12 10:50:01 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] 2012-09-23 22:50:01 [iNFO] [ForgeModLoader] Forge Mod Loader has identified 5 mods to load

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] 2012-09-23 22:50:02 [sEVERE] [ForgeModLoader] Fatal errors were detected during the transition from CONSTRUCTING to PREINITIALIZATION. Loading cannot continue

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] 2012-09-23 22:50:02 [sEVERE] [ForgeModLoader]

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] FML [Forge Mod Loader] (coremods) Unloaded->Constructed

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] Forge [Minecraft Forge] (coremods) Unloaded->Constructed

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] GasSystems_v1 [GasSystems-v1] (GasSystems) Unloaded->Errored

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] IC2 [industrialCraft 2] (industrialcraft-2_1.106.jar) Unloaded->Constructed

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] GregTech_Addon [GregTech-Addon] (gregtechmod.zip) Unloaded->Constructed

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] 2012-09-23 22:50:02 [sEVERE] [ForgeModLoader] The following problems were captured during this phase

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] 2012-09-23 22:50:02 [sEVERE] [ForgeModLoader] Caught exception from GasSystems_v1

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] java.lang.ClassNotFoundException: GasSystems.GasSystems_v1

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:125)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at cpw.mods.fml.common.ModClassLoader.loadClass(ModClassLoader.java:57)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at java.lang.Class.forName0(Native Method)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at java.lang.Class.forName(Class.java:247)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:341)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at java.lang.reflect.Method.invoke(Method.java:597)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at com.google.common.eventbus.EventBus.post(EventBus.java:268)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:124)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at java.lang.reflect.Method.invoke(Method.java:597)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at com.google.common.eventbus.EventBus.post(EventBus.java:268)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:81)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at cpw.mods.fml.common.Loader.loadMods(Loader.java:458)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:144)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at net.minecraft.client.Minecraft.a(Minecraft.java:405)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at net.minecraft.client.Minecraft.run(Minecraft.java:737)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at java.lang.Thread.run(Thread.java:680)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] Caused by: java.lang.NullPointerException

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at org.objectweb.asm.ClassReader.<init>(Unknown Source)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at cpw.mods.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:27)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at cpw.mods.fml.relauncher.RelaunchClassLoader.runTransformers(RelaunchClassLoader.java:167)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:118)

9/23/12 10:50:02 PM [0x0-0x34034].com.Mojang Specifications.Minecraft.Minecraft[373] ... 31 more

 

 

The minecraft error log looks like this:

 

 

      Minecraft has crashed!     

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

 

Minecraft has stopped running because it encountered a problem; Failed to start game

This error has been saved to /Users/matthew38/Library/Application Support/minecraft/crash-reports/crash-2012-09-23_22.50.13-client.txt for your convenience. Please include a copy of this file if you report this crash to anyone.

 

 

 

--- BEGIN ERROR REPORT 44ebe440 --------

Generated 9/23/12 10:50 PM

 

- Minecraft Version: 1.3.2

- Operating System: Mac OS X (i386) version 10.6.8

- Java Version: 1.6.0_35, Apple Inc.

- Java VM Version: Java HotSpot Client VM (mixed mode), Apple Inc.

- Memory: 498926704 bytes (475 MB) / 535232512 bytes (510 MB) up to 1070399488 bytes (1020 MB)

- JVM Flags: 3 total; -Xbootclasspath/a:/System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Resources/LauncherSupport.jar -Xms512M -Xmx1024M

- FML: FML v3.0.196.366 Minecraft Forge 4.1.1.251 5 mods loaded, 5 mods active

FML [Forge Mod Loader] (coremods) Unloaded->Constructed

Forge [Minecraft Forge] (coremods) Unloaded->Constructed

GasSystems_v1 [GasSystems-v1] (GasSystems) Unloaded->Errored

IC2 [industrialCraft 2] (industrialcraft-2_1.106.jar) Unloaded->Constructed

GregTech_Addon [GregTech-Addon] (gregtechmod.zip) Unloaded->Constructed

- LWJGL: 2.4.2

- OpenGL: NVIDIA GeForce 320M OpenGL Engine GL version 2.1 NVIDIA-1.6.36, NVIDIA Corporation

- Is Modded: Definitely; 'forge,fml'

- Type: Client

- Texture Pack: Default

- Profiler Position: N/A (disabled)

 

cpw.mods.fml.common.LoaderException: java.lang.ClassNotFoundException: GasSystems.GasSystems_v1

at cpw.mods.fml.common.LoadController.transition(LoadController.java:102)

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

at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:144)

at net.minecraft.client.Minecraft.a(Minecraft.java:405)

at net.minecraft.client.Minecraft.run(Minecraft.java:737)

at java.lang.Thread.run(Thread.java:680)

Caused by: java.lang.ClassNotFoundException: GasSystems.GasSystems_v1

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

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

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

at java.lang.Class.forName(Class.java:247)

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

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

... 4 more

Caused by: java.lang.NullPointerException

at org.objectweb.asm.ClassReader.<init>(Unknown Source)

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

at cpw.mods.fml.relauncher.RelaunchClassLoader.runTransformers(RelaunchClassLoader.java:167)

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

... 31 more

--- END ERROR REPORT b08b16ee ----------

 

 

 

And GasSystems_v1 looks like this:

 

 

package GasSystems;

 

import net.minecraft.src.Item;

import cpw.mods.fml.common.Mod;

import cpw.mods.fml.common.Mod.Init;

import cpw.mods.fml.common.event.FMLInitializationEvent;

import cpw.mods.fml.common.network.NetworkMod;

import cpw.mods.fml.common.registry.LanguageRegistry;

 

 

@Mod(modid = "GasSystems_v1", name="GasSystems-v1", version="1")

@NetworkMod(clientSideRequired = true, serverSideRequired = false)

public class GasSystems_v1 {

public static Item testItem;

 

 

@Init

public void load(FMLInitializationEvent event){

 

testItem = new GasSystems.common.TestItem(2222);

 

LanguageRegistry.addName(testItem,"Test Item");

}

}

 

 

What am I doing wrong?

 

Incidentally, I (vaguely) remember a similar bug -- back in the 1.2.5 era, I would get a similar error thrown when the folder containing my mod had a different name from the mod_ class.

Link to comment
Share on other sites

Its straight forward, you're not packaging your mod correctly.

Post a full list of everything in your mod exactly how its structured, then compare that to what java is looking for, you'll find a issue.

 

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

Its straight forward, you're not packaging your mod correctly.

Post a full list of everything in your mod exactly how its structured, then compare that to what java is looking for, you'll find a issue.

 

In MCP, the GasSystems package is located inside the common folder, containing the @Mod file and the GasSystems.common package which contains the TestItem file. . .

 

I'm still quite a bit inexperienced with java -- how would I found out what package java is looking for?  The error log only lists the package declared in the @Mod file, not where it's looking for that package.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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