Closed nrktkt closed 3 years ago
The newest version updated JNA (see https://github.com/phxql/argon2-jvm/blob/master/CHANGELOG.md#27---2020-04-15). Can you run a mvn dependency:tree
or gradle dependencies
and find out the JNA version in your project?
The only JNA shown by mill show _.ivyDepsTree
is
├─ de.mkammerer:argon2-jvm:2.7
│ └─ net.java.dev.jna:jna:5.5.0
I'm not super savvy on how JNA works. Is that dependency all that is required, or is there a matching JNA (or JNI) implementation provided by the JVM or something whose version I could check as well?
That looks like the correct JNA version. JNA is all you need. I have no idea how mill works, it seems like the classpath is botched. Have you tried older versions of argon2-jvm?
2.6 does seem to work fine
@QuestofIranon if you're seeing a similar error, can you chime in with your build environment?
I have exactly the same problem. In my case, argon2-jvm is used when running Flyway (https://github.com/flyway/flyway) database migrations via the command line. I noticed Flyway uses version JNA version 4.5.2
. Both versions are probably on the classpath and incompatible?
argon2-jvm versino 2.6 was working properly.
You can't have both JNA 4.5.2 and JNA 5.5.0 on the classpath - Java can only have on version on the classpath. If you run mvn dependency:tree
and look for jna
you see the exact version on the classpath.
You have two options: use a newer flyway which uses a modern version of JNA, or force maven to use the JNA argon2-jvm
requires via a <dependencyManagement>
entry in the POM and hope that Flyway works with the newer version.
If this isn't a possibility for you, then just use argon2-jvm in 2.6 - no harm doing that. The changes in 2.7 are not security-relevant.
In my project's dependencies there is only JNA 5.5.0 (from argon2-jvm). I don't have control over Flyway's dependencies, so I'll just stick with argon2-jvm 2.6.
I'm starting to see errors locally and on CI like
Here's a build with the failure https://travis-ci.com/github/lightform-oss/2Auth/builds/165341286 library version 2.7 running openjdk version "11.0.2" 2019-01-15 OpenJDK Runtime Environment 18.9 (build 11.0.2+9) OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)
Clearly the build and runtime environments are not on compatible versions of JNA, but it feels like this happened rather suddenly. Any ideas?