Mojira Archive
MC-80817

Server Does Not Start - OSHI / JNA - java.lang.UnsatisfiedLinkError

Some users are unable to run the server as of 1.8.3 due to an error in utilizing the OSHI library to get processor information.
The error looks something like this:

java.lang.UnsatisfiedLinkError: Can't obtain static newInstance method for class
com.sun.jna.Structure
at com.sun.jna.Native.initIDs(Native Method)
at com.sun.jna.Native.<clinit>(Native.java:135)
at com.sun.jna.Pointer.<clinit>(Pointer.java:42)
at com.sun.jna.platform.win32.WinReg$HKEY.<init>(WinReg.java:32)
at com.sun.jna.platform.win32.WinReg.<clinit>(WinReg.java:61)
at oshi.software.os.windows.WindowsHardwareAbstractionLayer.getProcessor
s(WindowsHardwareAbstractionLayer.java:33)
at net.minecraft.server.SystemUtils.<clinit>(SourceFile:16)

The code however is designed to prevent this error and fall back to "<unknown>", but it is incorrectly designed to catch Exception rather than Throwable (which an UnsatisfiedLinkError is). The fix is simply to widen the catch block in the file we name as SystemUtils from Exception to Throwable.

Some additional info on this issue can be seen: https://hub.spigotmc.org/jira/browse/BUILDTOOLS-114

Fixed

[Mod] md_5

[Mojang] Nathan Adams

2015-05-29, 08:22 AM

2017-02-16, 08:27 PM

2015-07-27, 01:56 PM

4

4

Community Consensus

Minecraft 1.8.3 - Minecraft 1.8.7Minecraft 1.8.3, Minecraft 1.8.4, Minecraft 1.8.5, Minecraft 1.8.6, Minecraft 1.8.7

Minecraft 1.8.8