I'm using embedded PostgreSQL with Java 11 for integration testing. On Windows it runs fine, but on Mac it first downloads Mac OS binaries (which is expected):
Extract /Users/fubar/.embedpostgresql/postgresql-11.1-1-osx-binaries.zip START
But then it fails with the following stacktrace:
java.lang.NoSuchFieldException: handle
at java.base/java.lang.Class.getDeclaredField(Class.java:2411)
at de.flapdoodle.embed.process.runtime.Processes.windowsProcessId(Processes.java:109)
at de.flapdoodle.embed.process.runtime.Processes.access$200(Processes.java:51)
at de.flapdoodle.embed.process.runtime.Processes$PidHelper$2.getPid(Processes.java:209)
When I look into Processes
source code I see that internally it uses PidHelper.LEGACY
, that fails the first attempt to obtain pid via unixLikeProcessId()
.
Could anyone, please, give a hint why this is happenning or how to fix that?