Skip to content
This repository has been archived by the owner on May 12, 2020. It is now read-only.

java.lang.NoSuchFieldException: handle thrown possible because of JDK11 #153

Open
LukeButters opened this issue Dec 27, 2018 · 7 comments
Open

Comments

@LukeButters
Copy link

Hi when following the tutorial I get this exception:

java.lang.NoSuchFieldException: handle
	at java.base/java.lang.Class.getDeclaredField(Class.java:2412)
	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)
	at de.flapdoodle.embed.process.runtime.Processes.processId(Processes.java:72)
	at de.flapdoodle.embed.process.runtime.ProcessControl.<init>(ProcessControl.java:64)
	at de.flapdoodle.embed.process.runtime.ProcessControl.start(ProcessControl.java:205)
	at de.flapdoodle.embed.process.runtime.AbstractProcess.<init>(AbstractProcess.java:99)
	at ru.yandex.qatools.embed.postgresql.AbstractPGProcess.<init>(AbstractPGProcess.java:19)
	at ru.yandex.qatools.embed.postgresql.InitDbProcess.<init>(InitDbProcess.java:56)
	at ru.yandex.qatools.embed.postgresql.InitDbExecutable.start(InitDbExecutable.java:23)
	at ru.yandex.qatools.embed.postgresql.InitDbExecutable.start(InitDbExecutable.java:14)
	at de.flapdoodle.embed.process.runtime.Executable.start(Executable.java:108)
	at ru.yandex.qatools.embed.postgresql.PostgresProcess.runCmd(PostgresProcess.java:119)
	at ru.yandex.qatools.embed.postgresql.PostgresProcess.runCmd(PostgresProcess.java:74)
	at ru.yandex.qatools.embed.postgresql.PostgresProcess.onBeforeProcess(PostgresProcess.java:196)
	at de.flapdoodle.embed.process.runtime.AbstractProcess.<init>(AbstractProcess.java:83)
	at ru.yandex.qatools.embed.postgresql.AbstractPGProcess.<init>(AbstractPGProcess.java:19)
	at ru.yandex.qatools.embed.postgresql.PostgresProcess.<init>(PostgresProcess.java:68)
	at ru.yandex.qatools.embed.postgresql.PostgresExecutable.start(PostgresExecutable.java:25)
	at ru.yandex.qatools.embed.postgresql.PostgresExecutable.start(PostgresExecutable.java:13)
	at de.flapdoodle.embed.process.runtime.Executable.start(Executable.java:108)
	at ru.yandex.qatools.embed.postgresql.EmbeddedPostgres.start(EmbeddedPostgres.java:194)
	at ru.yandex.qatools.embed.postgresql.EmbeddedPostgres.start(EmbeddedPostgres.java:165)
	at ru.yandex.qatools.embed.postgresql.EmbeddedPostgres.start(EmbeddedPostgres.java:139)
@littlewoo
Copy link

I see the same issue... It seems that the exception isn't thrown - it's caught and then printed to std.err.

@LukeButters
Copy link
Author

I think this might only matter on windows and so it might make sense to look for the field when the OS is windows.

@TurtleTony
Copy link

This also happens on Linux, it doesn't seem to break anything but it's really ugly. This should be fixed

@mdavydau
Copy link

mdavydau commented Feb 25, 2019

Quick fix for current issue

        <dependency>
            <groupId>ru.yandex.qatools.embed</groupId>
            <artifactId>postgresql-embedded</artifactId>
            <version>2.10</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>de.flapdoodle.embed</groupId>
                    <artifactId>de.flapdoodle.embed.process</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>de.flapdoodle.embed</groupId>
            <artifactId>de.flapdoodle.embed.process</artifactId>
            <version>2.0.5</version>
        </dependency>

@SButterfly
Copy link

fix 7ed616e

@tovbinm
Copy link

tovbinm commented Oct 18, 2019

@SButterfly are you folks planning to release this?

@SButterfly
Copy link

@smecsia Could you please release new version?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants