Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java 9 support - NoSuchMethodException: java.lang.Throwable.getStackTraceElement #70

Closed
mibby opened this issue Sep 26, 2017 · 9 comments

Comments

@mibby
Copy link

mibby commented Sep 26, 2017

Java 9
HolographicDisplay v2.2.6
Paper dev 1220 (Spigot 1.12.2)

[02:54:28] [Server thread/WARN]: [HolographicDisplays] Unable to get a stacktrace element, please inform the developer. You will only see this error once to avoid spam.
java.lang.NoSuchMethodException: java.lang.Throwable.getStackTraceElement(int)
	at java.lang.Class.getDeclaredMethod(Class.java:2432) ~[?:?]
	at com.gmail.filoghost.holographicdisplays.util.ReflectionUtils.getStackTraceElement(ReflectionUtils.java:44) [HolographicDisplays.jar:?]
	at com.gmail.filoghost.holographicdisplays.nms.v1_12_R1.EntityNMSArmorStand.getId(EntityNMSArmorStand.java:139) [HolographicDisplays.jar:?]
	at net.minecraft.server.v1_12_R1.PacketPlayOutEntityTeleport.<init>(SourceFile:22) [patched_1.12.2.jar:git-Paper-1220]
	at com.gmail.filoghost.holographicdisplays.nms.v1_12_R1.EntityNMSArmorStand.setLocationNMS(EntityNMSArmorStand.java:202) [HolographicDisplays.jar:?]
	at com.gmail.filoghost.holographicdisplays.nms.v1_12_R1.NmsManagerImpl.spawnNMSArmorStand(NmsManagerImpl.java:106) [HolographicDisplays.jar:?]
	at com.gmail.filoghost.holographicdisplays.object.line.CraftTextLine.spawn(CraftTextLine.java:75) [HolographicDisplays.jar:?]
	at com.gmail.filoghost.holographicdisplays.object.CraftHologram.spawnEntities(CraftHologram.java:300) [HolographicDisplays.jar:?]
	at com.gmail.filoghost.holographicdisplays.object.CraftHologram.refreshAll(CraftHologram.java:247) [HolographicDisplays.jar:?]
	at com.gmail.filoghost.holographicdisplays.task.StartupLoadHologramsTask.run(StartupLoadHologramsTask.java:11) [HolographicDisplays.jar:?]
	at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftTask.run(CraftTask.java:58) [patched_1.12.2.jar:git-Paper-1220]
	at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:356) [patched_1.12.2.jar:git-Paper-1220]
	at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:833) [patched_1.12.2.jar:git-Paper-1220]
	at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:426) [patched_1.12.2.jar:git-Paper-1220]
	at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:767) [patched_1.12.2.jar:git-Paper-1220]
	at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:665) [patched_1.12.2.jar:git-Paper-1220]
	at java.lang.Thread.run(Thread.java:844) [?:?]
@mibby
Copy link
Author

mibby commented Oct 10, 2017

@filoghost Bump. ^^

[20:47:39] [Server thread/WARN]: [HolographicDisplays] Unable to get a stacktrace element, please inform the developer. You will only see this error once to avoid spam.
java.lang.NoSuchMethodException: java.lang.Throwable.getStackTraceElement(int)
	at java.lang.Class.getDeclaredMethod(Class.java:2432) ~[?:?]
	at com.gmail.filoghost.holographicdisplays.util.ReflectionUtils.getStackTraceElement(ReflectionUtils.java:44) ~[?:?]
	at com.gmail.filoghost.holographicdisplays.nms.v1_12_R1.EntityNMSArmorStand.getId(EntityNMSArmorStand.java:139) ~[?:?]
	at net.minecraft.server.v1_12_R1.PacketPlayOutEntityTeleport.<init>(SourceFile:22) ~[patched_1.12.2.jar:git-Paper-1236]
	at com.gmail.filoghost.holographicdisplays.nms.v1_12_R1.EntityNMSArmorStand.setLocationNMS(EntityNMSArmorStand.java:202) ~[?:?]
	at com.gmail.filoghost.holographicdisplays.nms.v1_12_R1.NmsManagerImpl.spawnNMSArmorStand(NmsManagerImpl.java:106) ~[?:?]
	at com.gmail.filoghost.holographicdisplays.object.line.CraftTextLine.spawn(CraftTextLine.java:75) ~[?:?]
	at com.gmail.filoghost.holographicdisplays.object.CraftHologram.spawnEntities(CraftHologram.java:300) ~[?:?]
	at com.gmail.filoghost.holographicdisplays.object.NamedHologramManager.onChunkLoad(NamedHologramManager.java:49) ~[?:?]
	at com.gmail.filoghost.holographicdisplays.listener.MainListener.processChunkLoad(MainListener.java:84) ~[?:?]
	at com.gmail.filoghost.holographicdisplays.listener.MainListener.onChunkLoad(MainListener.java:70) ~[?:?]
	at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor188.execute(Unknown Source) ~[?:?]
	at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:70) ~[patched_1.12.2.jar:git-Paper-1236]
	at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:74) ~[patched_1.12.2.jar:git-Paper-1236]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[patched_1.12.2.jar:git-Paper-1236]
	at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:514) ~[patched_1.12.2.jar:git-Paper-1236]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:499) ~[patched_1.12.2.jar:git-Paper-1236]
	at net.minecraft.server.v1_12_R1.Chunk.loadNearby(Chunk.java:994) ~[patched_1.12.2.jar:git-Paper-1236]
	at org.bukkit.craftbukkit.v1_12_R1.chunkio.ChunkIOProvider.callStage2(ChunkIOProvider.java:54) ~[patched_1.12.2.jar:git-Paper-1236]
	at org.bukkit.craftbukkit.v1_12_R1.chunkio.ChunkIOProvider.callStage2(ChunkIOProvider.java:16) ~[patched_1.12.2.jar:git-Paper-1236]
	at org.bukkit.craftbukkit.v1_12_R1.util.AsynchronousExecutor.skipQueue(AsynchronousExecutor.java:337) ~[patched_1.12.2.jar:git-Paper-1236]
	at org.bukkit.craftbukkit.v1_12_R1.util.AsynchronousExecutor.getSkipQueue(AsynchronousExecutor.java:295) ~[patched_1.12.2.jar:git-Paper-1236]
	at org.bukkit.craftbukkit.v1_12_R1.chunkio.ChunkIOExecutor.lambda$syncChunkLoad$0(ChunkIOExecutor.java:18) ~[patched_1.12.2.jar:git-Paper-1236]
	at net.minecraft.server.v1_12_R1.MCUtil.ensureMain(MCUtil.java:66) [patched_1.12.2.jar:git-Paper-1236]
	at org.bukkit.craftbukkit.v1_12_R1.chunkio.ChunkIOExecutor.syncChunkLoad(ChunkIOExecutor.java:18) [patched_1.12.2.jar:git-Paper-1236]
	at net.minecraft.server.v1_12_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:164) [patched_1.12.2.jar:git-Paper-1236]
	at net.minecraft.server.v1_12_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:147) [patched_1.12.2.jar:git-Paper-1236]
	at net.minecraft.server.v1_12_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:143) [patched_1.12.2.jar:git-Paper-1236]
	at org.bukkit.craftbukkit.v1_12_R1.CraftWorld.loadChunk(CraftWorld.java:309) [patched_1.12.2.jar:git-Paper-1236]
	at org.bukkit.craftbukkit.v1_12_R1.CraftWorld.loadChunk(CraftWorld.java:198) [patched_1.12.2.jar:git-Paper-1236]
	at fr.neatmonster.nocheatplus.utilities.map.MapUtil.ensureChunksLoaded(MapUtil.java:91) [NoCheatPlus.jar:?]
	at fr.neatmonster.nocheatplus.checks.moving.util.MovingUtil.ensureChunksLoaded(MovingUtil.java:526) [NoCheatPlus.jar:?]
	at fr.neatmonster.nocheatplus.checks.moving.MovingListener.onPlayerTeleportMonitor(MovingListener.java:1811) [NoCheatPlus.jar:?]
	at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor744.execute(Unknown Source) [?:?]
	at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:70) [patched_1.12.2.jar:git-Paper-1236]
	at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:74) [patched_1.12.2.jar:git-Paper-1236]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) [patched_1.12.2.jar:git-Paper-1236]
	at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:514) [patched_1.12.2.jar:git-Paper-1236]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:499) [patched_1.12.2.jar:git-Paper-1236]
	at org.bukkit.craftbukkit.v1_12_R1.entity.CraftPlayer.teleport(CraftPlayer.java:608) [patched_1.12.2.jar:git-Paper-1236]
	at org.bukkit.craftbukkit.v1_12_R1.entity.CraftEntity.teleport(CraftEntity.java:303) [patched_1.12.2.jar:git-Paper-1236]
	at net.citizensnpcs.npc.CitizensNPC.spawn(CitizensNPC.java:209) [citizens-2.0.22-SNAPSHOT.jar:?]
	at net.citizensnpcs.npc.CitizensNPC.load(CitizensNPC.java:139) [citizens-2.0.22-SNAPSHOT.jar:?]
	at net.citizensnpcs.api.npc.SimpleNPCDataStore.loadInto(SimpleNPCDataStore.java:59) [citizens-2.0.22-SNAPSHOT.jar:?]
	at net.citizensnpcs.Citizens$2.run(Citizens.java:305) [citizens-2.0.22-SNAPSHOT.jar:?]
	at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftTask.run(CraftTask.java:58) [patched_1.12.2.jar:git-Paper-1236]
	at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:356) [patched_1.12.2.jar:git-Paper-1236]
	at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:833) [patched_1.12.2.jar:git-Paper-1236]
	at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:426) [patched_1.12.2.jar:git-Paper-1236]
	at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:767) [patched_1.12.2.jar:git-Paper-1236]
	at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:665) [patched_1.12.2.jar:git-Paper-1236]
	at java.lang.Thread.run(Thread.java:844) [?:?]

@markhughes
Copy link

markhughes commented Oct 18, 2017

Can confirm this is an issue with Java 9 in Holographic Displays v2.2.6.

Edit: here is a pastebin with a full walkthrough: https://pastebin.com/pgPTNuwc

@markhughes
Copy link

markhughes commented Oct 18, 2017

Done some research. In java 9 they have introduced StackWalker:

https://docs.oracle.com/javase/9/docs/api/java/lang/StackWalker.html

This is the official "solution" to getStackTraceElement()

@sgdc3
Copy link

sgdc3 commented Oct 18, 2017

@markehme Hello, since filoghost is inactive atm would you like to help me maintaining an updated and mavenized version of the project?

@markhughes
Copy link

@sgdc3 I've just contacted him on Twitter - if I don't get a response I'll fork and take it over. :)

@markhughes
Copy link

Just had a look, seems like it's not being maintained. I'll fork it and see how I go.

markhughes added a commit to redstone/HolographicDisplays that referenced this issue Oct 18, 2017
@markhughes
Copy link

Fixed in redstone@677ec60

@markhughes
Copy link

markhughes commented Oct 19, 2017

Fix available in v2.3.0:
https://github.com/redstone/HolographicDisplays/releases/tag/v2.3.0

@filoghost
Copy link
Owner

Should be finally fixed, while maintaining compatibility with previous Java versions (both for compiling and executing) 0ad5cda

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants