[SOLVED]Error Message After latest Commit

Getting a weird Error message when i try to compile my Plugin…here’s what i get

[DEBUG] C:\Users\Christopher.m2\repository\org\yaml\snakeyaml\1.16\snakeyaml-1.16.jar
[DEBUG] Source roots:
[DEBUG] C:\Users\Christopher\Desktop\ePortfolio\ManyVerse\src\main\java
[DEBUG] Command line options:
[DEBUG] -d C:\Users\Christopher\Desktop\ePortfolio\ManyVerse\target\classes -classpath C:\Users\Christopher\Desktop\ePortfolio\ManyVerse\target\classes;C:\Users\Christopher.m2\repository\org\spongepowered\spongeapi\2.1-SNAPSHOT\spongeapi-2.1-SNAPSHOT.jar;C:\Users\Christopher.m2\repository\ninja\leaping\configurate\configurate-hocon\3.0\configurate-hocon-3.0.jar;C:\Users\Christopher.m2\repository\com\typesafe\config\1.3.0\config-1.3.0.jar;C:\Users\Christopher.m2\repository\ninja\leaping\configurate\configurate-core\3.0\configurate-core-3.0.jar;C:\Users\Christopher.m2\repository\com\flowpowered\flow-math\1.0.1\flow-math-1.0.1.jar;C:\Users\Christopher.m2\repository\org\ow2\asm\asm\5.0.3\asm-5.0.3.jar;C:\Users\Christopher.m2\repository\com\google\code\findbugs\jsr305\1.3.9\jsr305-1.3.9.jar;C:\Users\Christopher.m2\repository\ninja\leaping\configurate\configurate-gson\3.0\configurate-gson-3.0.jar;C:\Users\Christopher.m2\repository\com\google\inject\guice\4.0\guice-4.0.jar;C:\Users\Christopher.m2\repository\javax\inject\javax.inject\1\javax.inject-1.jar;C:\Users\Christopher.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;C:\Users\Christopher.m2\repository\com\google\code\gson\gson\2.2.4\gson-2.2.4.jar;C:\Users\Christopher.m2\repository\com\google\guava\guava\17.0\guava-17.0.jar;C:\Users\Christopher.m2\repository\org\slf4j\slf4j-api\1.7.13\slf4j-api-1.7.13.jar;C:\Users\Christopher.m2\repository\com\flowpowered\flow-noise\1.0.1-SNAPSHOT\flow-noise-1.0.1-SNAPSHOT.jar;C:\Users\Christopher.m2\repository\org\spongepowered\event-gen-core\0.10-SNAPSHOT\event-gen-core-0.10-SNAPSHOT.jar;C:\Users\Christopher.m2\repository\org\apache\commons\commons-lang3\3.3.2\commons-lang3-3.3.2.jar;C:\Users\Christopher.m2\repository\ninja\leaping\configurate\configurate-yaml\3.0\configurate-yaml-3.0.jar;C:\Users\Christopher.m2\repository\org\yaml\snakeyaml\1.16\snakeyaml-1.16.jar; -sourcepath C:\Users\Christopher\Desktop\ePortfolio\ManyVerse\src\main\java; C:\Users\Christopher\Desktop\ePortfolio\ManyVerse\src\main\java\me\Cleardragonf\ManyVerse\portals\Portal.java -g -nowarn -target 1.5 -source 1.5
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 1 source file to C:\Users\Christopher\Desktop\ePortfolio\ManyVerse\target\classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.649 s
[INFO] Finished at: 2015-12-05T19:48:49-06:00
[INFO] Final Memory: 16M/491M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project ManyVerse: Fatal error compiling: tools.jar not found: C:\Program Files\Java\jre1.8.0_65..\lib\tools.jar → [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project ManyVerse: Fatal error compiling
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Fatal error compiling
at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:683)
at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
… 19 more
Caused by: org.codehaus.plexus.compiler.CompilerException: tools.jar not found: C:\Program Files\Java\jre1.8.0_65..\lib\tools.jar
at org.codehaus.plexus.compiler.javac.JavacCompiler.createJavacClass(JavacCompiler.java:987)
at org.codehaus.plexus.compiler.javac.JavacCompiler.getJavacClass(JavacCompiler.java:944)
at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:520)
at org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:167)
at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:678)
… 22 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] MojoExecutionException - Apache Maven - Apache Software Foundation

You’re using the JRE, you need to set your JAVA_HOME environment variable to the JDK path.

1 Like

aaaah can that be done in eclipse or will i need to use cmd?

It’s part of your OS not Eclipse. I see you’re using Windows, here’s how I do it:
Start - Right click ‘Computer’ select Properties. On the left, click ‘Advanced system settings’. In that dialog box, click ‘Environment Variables’. Then under the System variables section add or change the JAVA_HOME entry to your JDK installation, for me it’s C:\Program Files\Java\jdk1.8.0_60

1 Like

OK! i see what was going on :slight_smile: thank you i went ahead and deleted another path that was causing some issues and now it all makes sense and the plugins are now back to building :slight_smile: thanks

so @simon816 quick question…after doing everything i did with my new ManyVerse one i tried the same with my ExplosionGuard…however the server itself brings up this error? any hints please?

  1. Error injecting constructor, java.lang.NullPointerException
    at me.Cleardragonf.ExplosionGuard.ExplosionGuard.(ExplosionGuard.java:28)
    at org.spongepowered.common.guice.SpongePluginGuiceModule.configure(SpongePluginGuiceModule.java:63)
    while locating me.Cleardragonf.ExplosionGuard.ExplosionGuard

1 error
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1025)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1051)
at org.spongepowered.mod.plugin.SpongeModPluginContainer.constructMod(SpongeModPluginContainer.java:96)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at net.minecraftforge.fml.common.LoadController.onPost(LoadController.java:49)
at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:507)
at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:87)
at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:355)
at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:117)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:438)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at me.Cleardragonf.ExplosionGuard.ExplosionGuard.(ExplosionGuard.java:60)
at me.Cleardragonf.ExplosionGuard.ExplosionGuard$$FastClassByGuice$$c19bcdbc.newInstance()
at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:61)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:105)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
… 30 more

A detailed walkthrough of the error, its code path and all known details is as follows:

– System Details –
Details:
Minecraft Version: 1.8
Operating System: Windows 10 (amd64) version 10.0
Java Version: 1.8.0_65, Oracle Corporation
Java VM Version: Java HotSpot™ 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 1253064600 bytes (1195 MB) / 1563426816 bytes (1491 MB) up to 7622623232 bytes (7269 MB)
JVM Flags: 0 total;
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v9.10 FML v8.0.99.99 Minecraft Forge 11.14.4.1577 9 mods loaded, 9 mods active
States: ‘U’ = Unloaded ‘L’ = Loaded ‘C’ = Constructed ‘H’ = Pre-initialized ‘I’ = Initialized ‘J’ = Post-initialized ‘A’ = Available ‘D’ = Disabled ‘E’ = Errored
UC mcp{9.05} [Minecraft Coder Pack] (minecraft.jar)
UC FML{8.0.99.99} [Forge Mod Loader] (forge-1.8-11.14.4.1577-universal.jar)
UC Forge{11.14.4.1577} [Minecraft Forge] (forge-1.8-11.14.4.1577-universal.jar)
UC Sponge{1.8-1577-2.1-DEV-878} [SpongeForge] (minecraft.jar)
UC bspkrsCore{7.01} [bspkrsCore] ([1.8]bspkrsCore-universal-7.01.jar)
UC Treecapitator{1.8} [Treecapitator] ([1.8]Treecapitator-universal-2.0.5.jar)
UC satscapealarmcraft{1.0} [Alarmcraft] (Alarmcraft-Mod-1.8.jar)
UE me.Cleardragonf.ExplosionGuard{Beta.1.0} [ExplosionGuard] (ExplosiongGuard-Beta.1.0.jar)
UC me.Cleardragonf.ManyVerse{0.0.1} [ManyVerse] (ManyVerse-0.0.1-SNAPSHOT.jar)
Loaded coremods (and transformers):
SpongeCoremod (spongeforge-1.8-1577-2.1-DEV-878.jar)
org.spongepowered.mod.asm.transformer.WorldGeneratorTransformer
org.spongepowered.common.launch.transformer.SpongeSuperclassTransformer
Profiler Position: N/A (disabled)
Is Modded: Definitely; Server brand changed to ‘fml,forge,SpongeForge’
Type: Dedicated Server (map_server.txt)

I need to see your code.
All I can tell you at the moment is that there is a null reference at ExplosionGuard.java:28

Yes please and thank you! Link

You’ve imported the wrong Logger (import java.util.logging.Logger;)
It should be import org.slf4j.Logger;

You’ll see in the docs that imports are listed https://docs.spongepowered.org/en/plugin/logging.html

1 Like

ok i see :0 thank you this is quite difficult as I’m fully just now starting to get the hang of plugin Creation…and it’s terrible i’m trying to do so while it’s still fairly new and amazing!!! :smiley: but that’s ok just means once it’s all fully functional and they fix the ghast issue this plugin will work to another level :slight_smile: hahahahahahahaha

uuuuum quick question…i’ve changed the logger and there are no more error showing in myt Eclipse…however it still crashes the server with the

error
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1025)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1051)
at org.spongepowered.mod.plugin.SpongeModPluginContainer.constructMod(SpongeModPluginContainer.java:96)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at net.minecraftforge.fml.common.LoadController.onPost(LoadController.java:49)
at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:507)
at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:87)
at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:355)
at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:117)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:438)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at me.Cleardragonf.ExplosionGuard.ExplosionGuard.(ExplosionGuard.java:60)
at me.Cleardragonf.ExplosionGuard.ExplosionGuard$$FastClassByGuice$$c19bcdbc.newInstance()
at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:61)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:105)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
… 30 more

If you could point out anyreasons this is happening that’s awesome I learn from people explaining things soooo yea :confused:

Ah there was another error with your code.
Lines 61 to 69 (the scheduler bit) needs to be inside a method. You’ve just made it execute when the class initializes because you’ve made it effectively become a field.

Move it into somewhere appropriate for when it should be set up (e.g. in your onInitialization method)

2 Likes

THANK YOU!!! THAT WAS AMAZING THIS I WHY I LOVE SPONGE!!! THE STAFF IS AMAZING :smiley:

4 Likes

Thanks :smile: I try my hardest to make Sponge accessible and enjoyable to use for all skill levels

7 Likes