kohsuke/libpam4j — pull request #4 by davidmc24 (2012-12-14 05:11:55+00:00)
Title: JNA: update to 2.5.0

When running libpam4j 1.6 with JNA 2.5.0, you get AbstractMethodErrors, since
JNA 2.5.0 added a new abstract method "getFieldOrder" to Structure. This is
especially problematic if you have multiple libraries in an application that
depend on JNA, and some require 2.5.0, and others don't support it yet.

Caused by: java.lang.AbstractMethodError: com.sun.jna.Structure.getFieldOrder()Ljava/util/List;
at com.sun.jna.Structure.fieldOrder(Structure.java:831)
at com.sun.jna.Structure.getFields(Structure.java:857)
at com.sun.jna.Structure.deriveLayout(Structure.java:983)
at com.sun.jna.Structure.calculateSize(Structure.java:908)
at com.sun.jna.Structure.calculateSize(Structure.java:896)
at com.sun.jna.Structure.allocateMemory(Structure.java:357)
at com.sun.jna.Structure.(Structure.java:191)
at com.sun.jna.Structure.(Structure.java:180)
at com.sun.jna.Structure.(Structure.java:167)
at com.sun.jna.Structure.(Structure.java:159)
at org.jvnet.libpam.impl.PAMLibrary$pam_conv.(PAMLibrary.java:107)
at org.jvnet.libpam.PAM.(PAM.java:73)

I tested this code against my local Mac OS X machine to make sure that it at least works there, but I don't have easy access to environments to perform further testing.