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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I'm using Modrinth as a launcher for a forge modpack on 1.20.1, and can't diagnose the issue on the crash log myself. Have tried repairing the Minecraft instillation as well as removing a few mods that have been problematic for me in the past to no avail. Crash log is below, if any further information is necessary let me know. Thank you! https://paste.ee/p/k6xnS
    • Hey folks. I am working on a custom "Mecha" entity (extended from LivingEntity) that the player builds up from blocks that should get modular stats depending on the used blocks. e.g. depending on what will be used for the legs, the entity will have a different jump strength. However, something unexpected is happening when trying to override a few of LivingEntity's functions and using my new own "Mecha" specific fields: instead of their actual instance-specific value, the default value is used (0f for a float, null for an object...) This is especially strange as when executing with the same entity from a point in the code specific to the mecha entity, the correct value is used. Here are some code snippets to better illustrate what I mean: /* The main Mecha class, cut down for brevity */ public class Mecha extends LivingEntity { protected float jumpMultiplier; //somewhere later during the code when spawning the entity, jumpMultiplier is set to something like 1.5f //changing the access to public didn't help @Override //Overridden from LivingEntity, this function is only used in the jumpFromGround() function, used in the aiStep() function, used in the LivingEntity tick() function protected float getJumpPower() { //something is wrong with this function //for some reason I can't correctly access the fields and methods from the instanciated entity when I am in one of those overridden protected functions. this is very annoying LogUtils.getLogger().info(String.valueOf(this.jumpMultiplier))) //will print 0f return this.jumpMultiplier * super.getJumpPower(); } //The code above does not operate properly. Written as is, the entity will not jump, and adding debug logs shows that when executing the code, the value of this.jumpMultiplier is 0f //in contrast, it will be the correct value when done here: @Override public void tick() { super.tick(); //inherited LivingEntity logic //Custom logic LogUtils.getLogger().info(String.valueOf(this.jumpMultiplier))) //will print 1.5f } } My actual code is slightly different, as the jumpMuliplier is stored in another object (so I am calling "this.legModule.getJumpPower()" instead of the float), but even using a simple float exactly like in the code above didn't help. When running my usual code, the object I try to use is found to be null instead, leading to a crash from a nullPointerException. Here is the stacktrace of said crash: The full code can be viewed here. I have found a workaround in the case of jump strength, but have already found the same problem for another parameter I want to do, and I do not understand why the code is behaving as such, and I would very much like to be able to override those methods as intended - they seemed to work just fine like that for vanilla mobs... Any clues as to what may be happening here?
    • Please delete post. Had not noticed the newest edition for 1.20.6 which resolves the issue.
    • https://paste.ee/p/GTgAV Here's my debug log, I'm on 1.18.2 with forge 40.2.4 and I just want to get it to work!! I cant find any mod names in the error part and I would like some help from the pros!! I have 203 mods at the moment.
  • Topics

×
×
  • Create New...

Important Information

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