Unknown source in Stacktrace Java Eclipse

I have a very unpleasant problem: when exporting a jar file from my source code to eclipse, I do not get any information in stacktrace about the source and line number in which the error occurs. I checked the compiler options in ecplise for the project and all the options in the section file generation. I develop plugins for Minecraft that are run by the bukkit server software. My source is in the de.celestialcraft.agentestate package. When an exception occurs, I get this stack:

23:43:57 [INFO] com.sk89q.worldedit.CuboidClipboard@fb44f99 23:43:57 [SEVERE] Could not pass event BlockDamageEvent to AgentEstate v2.1alpha org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja va:363) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav a:62) at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.j ava:477) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j ava:462) at de.celestialcraft.AgentEstate.AgentEstateBlockListener.onBlockBreak(U nknown Source) 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.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja va:361) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav a:62) at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.j ava:477) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j ava:462) at ir.b(ItemInWorldManager.java:393) at ir.a(ItemInWorldManager.java:200) at iv.a(NetServerHandler.java:782) at ei.a(Packet14BlockDig.java:67) at cg.b(TcpConnection.java:467) at iv.d(NetServerHandler.java:220) at iw.b(NetworkListenThread.java:57) at ht.b(DedicatedServerListenThread.java:34) at net.minecraft.server.MinecraftServer.r(MinecraftServer.java:981) at ho.r(DedicatedServer.java:309) at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:857) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:744) at fy.run(ThreadMinecraftServer.java:16) Caused by: java.lang.NullPointerException at com.sk89q.worldedit.schematic.MCEditSchematicFormat.save(Unknown Sour ce) at de.celestialcraft.AgentEstate.Estate.saveState(Unknown Source) at de.celestialcraft.AgentEstate.Estate.create(Unknown Source) at de.celestialcraft.AgentEstate.Estate.create(Unknown Source) at de.celestialcraft.AgentEstate.AgentEstateBlockListener.onBlockDamage( Unknown Source) 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.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja va:361) ... 25 more 

I set the jdk path in the build path settings as lib for the project. I hope you can help me in this matter. Thanks.

+4
source share
2 answers

Your project must be marked to include specific project parameters, and in the Java Compiler β†’ Generatefile, the Add line number ... option should be unmarked.

0
source

Since Bukkit is an API, when you code the bukkit plugin, you create blocks of code in such a way that only Bukkit knows what to do with the specified code. To find out what causes the error you posted here, you need to look at the top line if the lines are β€œat” in StackTrace and find it in the Bukkit source files in Github. For example, in this stacktrace, you have this at the top:

 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:363) 

You can see that there is a Bukkit EventException error caused by an error in the JavaPluginLoader on line 363. To find out exactly what happened, you should visit https://github.com/Bukkit/Bukkit/releases and download the appropriate source version for the version MC for which you are coding. In this zip file, you will find the source folder in src / main / java / and follow the path on line 2 of this stacktrace (org / bukkit / plugin / java / JavaPluginLoader), and on line 363 of this file you will see where the error occurred.

Since I don’t know which version of Bukkit you are coding, I can’t help you in the past, except to say that no matter what method in this file contains line 363, as it relates to your problem, If you find out what this one does method, this is what Bukkit tried to do with your plugin code and failed.

0
source

All Articles