Fatal error with forge 2705 & sponge 3206

Just upgraded a server running Forge + Sponge and am now hitting a wall. I’ve disabled all mods except for Sponge (spongeforge-1.12.2-2705-7.1.0-BETA-3206.jar).

I’m running Forge 2705 (forge-1.12.2-14.23.4.2705-universal.jar) and when I execute with the sponge mode as noted above, I get the following crash:

...
[23:26:14] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.server.MinecraftServer}
[23:27:39] [main/ERROR] [LaunchWrapper]: Unable to launch
java.lang.reflect.InvocationTargetException: null
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_171]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_171]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_171]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_171]
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_171]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_171]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_171]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_171]
	at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.run(ServerLaunchWrapper.java:62) [forge-1.12.2-14.23.4.2705-universal.jar:?]
	at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.main(ServerLaunchWrapper.java:31) [forge-1.12.2-14.23.4.2705-universal.jar:?]
Caused by: java.lang.NoClassDefFoundError: org/spongepowered/common/registry/type/statistic/StatisticRegistryModule$Holder
	at org.spongepowered.common.registry.type.statistic.StatisticRegistryModule.getInstance(StatisticRegistryModule.java:50) ~[StatisticRegistryModule.class:1.12.2-2705-7.1.0-BETA-3206]
	at net.minecraft.stats.StatBase.handler$registerStat$zjp000(SourceFile:567) ~[qo.class:?]
	at net.minecraft.stats.StatBase.func_75971_g(SourceFile:46) ~[qo.class:?]
	at net.minecraft.stats.StatBasic.func_75971_g(SourceFile:16) ~[qj.class:?]
	at net.minecraft.stats.StatList.<clinit>(StatList.java:30) ~[qs.class:?]
	at net.minecraft.entity.EntityList$EntityEggInfo.<init>(EntityList.java:450) ~[vi$a.class:?]
	at net.minecraft.entity.EntityList.func_191305_a(EntityList.java:431) ~[vi.class:?]
	at net.minecraft.entity.EntityList.func_151514_a(EntityList.java:360) ~[vi.class:?]
	at net.minecraft.init.Bootstrap.func_151354_b(Bootstrap.java:505) ~[ni.class:?]
	at net.minecraft.server.MinecraftServer.main(MinecraftServer.java:1470) ~[MinecraftServer.class:?]
	... 12 more
Caused by: java.lang.ClassNotFoundException: org.spongepowered.common.registry.type.statistic.StatisticRegistryModule$Holder
	at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) ~[launchwrapper-1.12.jar:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_171]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_171]
	at org.spongepowered.common.registry.type.statistic.StatisticRegistryModule.getInstance(StatisticRegistryModule.java:50) ~[StatisticRegistryModule.class:1.12.2-2705-7.1.0-BETA-3206]
	at net.minecraft.stats.StatBase.handler$registerStat$zjp000(SourceFile:567) ~[qo.class:?]
	at net.minecraft.stats.StatBase.func_75971_g(SourceFile:46) ~[qo.class:?]
	at net.minecraft.stats.StatBasic.func_75971_g(SourceFile:16) ~[qj.class:?]
	at net.minecraft.stats.StatList.<clinit>(StatList.java:30) ~[qs.class:?]
	at net.minecraft.entity.EntityList$EntityEggInfo.<init>(EntityList.java:450) ~[vi$a.class:?]
	at net.minecraft.entity.EntityList.func_191305_a(EntityList.java:431) ~[vi.class:?]
	at net.minecraft.entity.EntityList.func_151514_a(EntityList.java:360) ~[vi.class:?]
	at net.minecraft.init.Bootstrap.func_151354_b(Bootstrap.java:505) ~[ni.class:?]
	at net.minecraft.server.MinecraftServer.main(MinecraftServer.java:1470) ~[MinecraftServer.class:?]
	... 12 more
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
	at java.util.jar.Attributes.clone(Attributes.java:291) ~[?:1.8.0_171]
	at sun.net.www.protocol.jar.URLJarFile.getManifest(URLJarFile.java:155) ~[?:1.8.0_171]
	at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:147) ~[launchwrapper-1.12.jar:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_171]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_171]
	at org.spongepowered.common.registry.type.statistic.StatisticRegistryModule.getInstance(StatisticRegistryModule.java:50) ~[StatisticRegistryModule.class:1.12.2-2705-7.1.0-BETA-3206]
	at net.minecraft.stats.StatBase.handler$registerStat$zjp000(SourceFile:567) ~[qo.class:?]
	at net.minecraft.stats.StatBase.func_75971_g(SourceFile:46) ~[qo.class:?]
	at net.minecraft.stats.StatBasic.func_75971_g(SourceFile:16) ~[qj.class:?]
	at net.minecraft.stats.StatList.<clinit>(StatList.java:30) ~[qs.class:?]
	at net.minecraft.entity.EntityList$EntityEggInfo.<init>(EntityList.java:450) ~[vi$a.class:?]
	at net.minecraft.entity.EntityList.func_191305_a(EntityList.java:431) ~[vi.class:?]
	at net.minecraft.entity.EntityList.func_151514_a(EntityList.java:360) ~[vi.class:?]
	at net.minecraft.init.Bootstrap.func_151354_b(Bootstrap.java:505) ~[ni.class:?]
	at net.minecraft.server.MinecraftServer.main(MinecraftServer.java:1470) ~[MinecraftServer.class:?]
	... 12 more
[23:27:39] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:main:31]: java.lang.reflect.InvocationTargetException
[23:27:39] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:main:31]: 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[23:27:39] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:main:31]: 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[23:27:39] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:main:31]: 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[23:27:39] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:main:31]: 	at java.lang.reflect.Method.invoke(Method.java:498)
[23:27:39] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:main:31]: 	at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.run(ServerLaunchWrapper.java:62)
[23:27:39] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:main:31]: 	at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.main(ServerLaunchWrapper.java:31)
[23:27:39] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:run:67]: Caused by: net.minecraftforge.fml.relauncher.FMLSecurityManager$ExitTrappedException
[23:27:39] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:run:67]: 	at net.minecraftforge.fml.relauncher.FMLSecurityManager.checkPermission(FMLSecurityManager.java:49)
[23:27:39] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:run:67]: 	at java.lang.SecurityManager.checkExit(SecurityManager.java:761)
[23:27:39] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:run:67]: 	at java.lang.Runtime.exit(Runtime.java:107)
[23:27:39] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:run:67]: 	at java.lang.System.exit(System.java:971)
[23:27:39] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:run:67]: 	at net.minecraft.launchwrapper.Launch.launch(Launch.java:138)
[23:27:39] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:run:67]: 	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
[23:27:39] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:run:67]: 	... 6 more

It seems as though there’s some sort of compatibility or config issue from this upgrade. Any idea of what may be going on here?

java.lang.OutOfMemoryError: GC overhead limit exceeded

Try giving the server a little more memory.
How much are you currently giving it?

Basically what it looks like is happening is that certain vital sponge classes cannot be loaded because there is not enough memory to load them to.

Right, I just had the same thought and added another 2 GB to raise it to a total of 4 GB and it passed this point. I’m still getting some strange issues and sluggishness. I could probably give it another 4 GB of memory, but what are some sane startup arguments now at this point?

For example, I used to use:
java -Xmn2G -Xss4M -Xmx2500M -XX:+UseLargePages -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -XX:+UseBiasedLocking -Xincgc -XX:MaxGCPauseMillis=10 -XX:SoftRefLRUPolicyMSPerMB=10000 -XX:+CMSParallelRemarkEnabled -XX:ParallelGCThreads=10 -Djava.net.preferIPv4Stack=true -jar forge-1.12.2-14.23.4.2705-universal.jar nogui

But that has some issues now.

I mean… Personally I believe you should not add any arguments that you don’t understand how they work.

However in your command the only thing that really needs to be tweaked is the Xmx parameter, change that to whatever ram size. Other than that, if you have more memory, you could bump Xss and and Xmn a bit if you wanted.
Xss is the thread stack size. Xmn is the size of the heap for short timespan objects. If you have a mod that is making a lot of classes/objects, increasing that might help.

I really would recommend learning how each parameter actually works though… Every situation is different.

1 Like

I’m a developer and can understand anything you throw at me, but I’m kinda being “lazy” at the moment with this since I’m doing it for my kids and wife who want to play together. (In the middle of a monster project and this is just a low priority in terms of grokage atm, as you can see from my having missed the memory issue prior to posting this… :blush:)

But thanks for the quick tips there. Used to run a couple of mc servers years ago and pulling them back online here for them whilst updating forge + sponge, etc.

So I’ve tweaked it up a bit to this now:

java -Xmn3g -Xss8M -Xms512m -Xmx7g -XX:+UseLargePages -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -XX:+UseBiasedLocking -Xincgc -XX:MaxGCPauseMillis=10 -XX:SoftRefLRUPolicyMSPerMB=10000 -XX:+CMSParallelRemarkEnabled -XX:ParallelGCThreads=10 -Djava.net.preferIPv4Stack=true -jar forge.jar nogui

I guess I need to look at some of the other args as well in that it has some deprecated items and probably some other cruft…