[BUILDTOOLS-114] Test run failure - Can't obtain static newInstance method for class Created: 26/May/15  Updated: 29/May/15  Resolved: 29/May/15

Status: Resolved
Project: BuildTools
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: David Lisborg Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: BuildTools, error
Environment:

------------------
System Information
------------------
Time of this report: 5/26/2015, 15:14:00
Machine name: KAJZBORV-SERVER
Operating System: Windows 7 Professional N 64-bit (6.1, Build 7601) Service Pack 1 (7601.win7sp1_gdr.150427-0707)
Language: Swedish (Regional Setting: Swedish)
System Manufacturer: Gigabyte Technology Co., Ltd.
System Model: H55-UD3H
BIOS: Award Modular BIOS v6.00PG
Processor: Intel(R) Core(TM) i3 CPU 540 @ 3.07GHz (4 CPUs), ~3.7GHz
Memory: 16384MB RAM
Available OS Memory: 16184MB RAM
Page File: 8177MB used, 24187MB available
Windows Dir: C:\Windows
DirectX Version: DirectX 11
DX Setup Parameters: Not found
User DPI Setting: 120 DPI (125 percent)
System DPI Setting: 96 DPI (100 percent)
DWM DPI Scaling: Disabled
DxDiag Version: 6.01.7601.17514 32bit Unicode

Need something else?


Attachments: Text File BuildTools.log.txt    

 Description   

When running commando:
java -jar BuildTools.jar
it stops at:
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.288 sec <<< FA
ILURE! - in org.bukkit.craftbukkit.inventory.ItemFactoryTest
testKnownAttributes(org.bukkit.craftbukkit.inventory.ItemFactoryTest) Time elap
sed: 0.288 sec <<< ERROR!
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)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.bukkit.craftbukkit.inventory.ItemFactoryTest.testKnownAttributes(
ItemFactoryTest.java:31)

See attachment for full log.

NOTE: Ignore Version as i just had to fill something in to be able to create this ticket, might wanna remove that as mandatory as I dont get how to get it out off buildtools, gives error.



 Comments   
Comment by md_5 [ 28/May/15 ]

If you build the jar on another computer, does the server run on the computer which it fails?

If you can't do that, does 1.8.6 Vanilla run on that same computer?

Comment by David Lisborg [ 26/May/15 ]

Yes ofcourse, I have a 1.8.1 server running right now. All version after 1.8.3 and forward has given this error.

Operating System: Windows 7 Professional N 64-bit (6.1, Build 7601) Service Pack 1 (7601.win7sp1_gdr.150427-0707)
System Manufacturer: Gigabyte Technology Co., Ltd.
System Model: H55-UD3H
BIOS: Award Modular BIOS v6.00PG
Processor: Intel(R) Core(TM) i3 CPU 540 @ 3.07GHz (4 CPUs), ~3.7GHz
Memory: 16384MB RAM
Available OS Memory: 16184MB RAM
Page File: 8177MB used, 24187MB available
Windows Dir: C:\Windows
java 8 64bits

Comment by Conner [ 26/May/15 ]

David, Are you building on a machine that has the requirements? an Error like this usually occurs because the tests run out of resources to complete

Computer powerful enough to run Minecraft
1GB of free disk space.
2GB of memory, at least 1GB free. (Minimum for Minecraft).
Java 7 or Java 8 installed. (Recommended for Minecraft).
Git & Bash installed.

Comment by David Lisborg [ 26/May/15 ]

Much appreciated! I dont think this is related to buildtools specifically though. As if I build a spigot on another machine, move it to this machine and start the server I will get the same error when someone connects to the server as it crashes.

I have actually not tested a normal minecraft 1.8.3+ but from what I've read it should cause the same. Seems to be something with Java and how it fetches CPU info from registry. I might be far out of my league, this is just what I've read around the net. All and any help is most welcome. You are doing a really great work!

Comment by Oliver Dunk [ 26/May/15 ]

I can confirm that this is issue is present for a number of users - @GingerGeek does lots of work on BuildTools and I've contacted him to see if he can help at all.

Generated at Sat Dec 13 14:32:02 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.