It seems like this is an issue with the version of JNA that I used. Updating it to the newest fixed that error.
pom.xml:
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>5.15.0</version>
</dependency>