Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PrivilegedActionException after fetchInto() using quarkus-jooq #25

Open
codemonstur opened this issue Jul 2, 2021 · 0 comments
Open
Assignees

Comments

@codemonstur
Copy link

First up; the code works. I'm getting an exception in my log but no actual error actually occurs. The correct output gets sent to the client, the app keeps running, as far as I can tell everything is fine. Yet I have an error.

I'm using Quarkus and JOOQ. There is an endpoint that triggers a select().fetchInto(Custom.class). The endpoint still returns the correct data. But the log shows this error:

2021-07-02 12:58:25,938 SEVERE [com.sun.xml.bin.v2.run.ref.opt.Injector] (executor-thread-1) null: java.security.PrivilegedActionException: java.lang.NoSuchMethodException: sun.misc.Unsafe.defineClass(java.lang.String,[B,int,int,java.lang.ClassLoader,java.security.ProtectionDomain)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:558)
        at com.sun.xml.bind.v2.runtime.reflect.opt.Injector.<clinit>(Injector.java:166)
        at com.sun.xml.bind.v2.runtime.reflect.opt.AccessorInjector.prepare(AccessorInjector.java:51)

The exception is long. And goes through a bunch of different pieces of code:

at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
...
at com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(PropertyFactory.java:99)
...
at javax.xml.bind.ContextFinder.find(ContextFinder.java:393)
...
at org.jooq.tools.Convert.<clinit>(Convert.java:223)
...
at org.jooq.impl.SelectImpl.fetchInto(SelectImpl.java:3936)
...
at my-code-here-somewhere

Right now I'm running as a simple uber-jar. Native compilation worked fine a while ago but I haven't tested if this error persists in the native binary.

I'd like the error to not be there. I'm fine with a solution to suppress it but if possible I'd like to know who is failing to do something here and if there is a real problem.

Some versions and stuff:

  • Installed Java: 16
  • Targeted Java: 11
  • Quarkus: 1.13.7.Final
  • io.quarkiverse.jooq:quarkus-jooq : 0.2.0
@angrymango angrymango self-assigned this Jul 7, 2021
@angrymango angrymango reopened this Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants