question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UnsupportedFeatureError: The offset of private final java.util.Set

See original GitHub issue

Describe the bug The native image succeeds to build, but fails at startup:

N.B. the output seems partially corrupted as well?

[INFO] [io.quarkus.deployment.QuarkusAugmentor] Quarkus augmentation completed in 83658ms
[INFO] 
[INFO] --- maven-failsafe-plugin:2.22.1:integration-test (default) @ quarkus-integration-test-jpa-h2 ---
[INFO] 
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running io.quarkus.it.jpa.h2.JPAFunctionalityInGraalITCase
[INFO] H2 database started in TCP server mode; server status: TCP server running at tcp://192.168.1.218:9092 (only local connections)
Executing [/home/sanne/sources/quarkus/integration-tests/jpa-h2/target/quarkus-integration-test-jpa-h2-999-SNAPSHOT-runner, -Dquarkus.http.port=8081, -Dtest.url=http://localhost:8081, -Dquarkus.log.file.path=target/quarkus.log]
2020-02-06 13:44:35,565 ERROR [io.qua.application] (main) Failed to start application: com.oracle.svException in thread "main" java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.runnerm.core.jdk.UnsupportedFeatureError: The offset of private final java.util.Set sun.nio.ch.SelectorImp.ApplicationImpl.doStart(ApplicationImpl.zig:304)
	at io.quarkus.runtime.Application.start(Application.java:89)
	at io.quarkus.runtime.Application.run(Application.java:226)
	at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:41)
Caused by: com.oracle.svm.core.jdk.UnsupportedFeatureError: The offset of private final java.util.Set sun.nio.ch.SelectorImpl.selectedKeys is accessed without the field being first registered as unsafe accessed. Please register the field as unsafe accessed. You can do so with a reflection configuration that contains an entry for the field with the attribute "allowUnsafeAccess": true. Such a configuration file can be generated for you. Read CONFIGURE.md and REFl.selectedKeys is accessed without the field being first registered as unsafe accessed. Please regisLECTION.md for details.
	at com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:101)
	at jdk.internal.misc.Unsafe.objectFieldOffset(Unsafe.java:50)
	at sun.misc.Unsafe.objectFieldOffset(Uter the field as unsafe accessed. You can do so with a reflection configuration that contains an entnsafe.java:640)
	at io.netty.util.internal.PlatformDependent0.objectFieldOffset(PlatformDependent0.java:505)
	at io.netty.util.internal.PlatformDependent.objectFieldOffset(PlatformDependent.java:651)
	at io.netty.channel.nio.NioEventLoop$4.run(NioEventLoop.java:219)
	at java.security.AccessController.doPrivileged(AccessController.java:81)
	at io.netty.channel.nio.NioEventLoop.openSelector(NioEventLoop.java:209)
	at io.netty.channel.nio.NioEventLoop.<init>(NioEventLoop.java:142)
	at io.netty.channel.nio.NioEventLoopGroup.newChild(NioEventLoopGroup.java:146)
	at io.netty.channel.nio.NioEventLoopGroup.newChild(NioEventLoopGroup.java:37)
	at io.netty.util.concurrent.MultithreadEventExecutorGroupry for the field with the attribute "allowUnsafeAccess": true. Such a configuration file can be gene.<init>(MultithreadEventExecutorGroup.java:84)
	at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:58)
	at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:47)
	at io.netty.channel.MultithreadEventLoopGroup.<init>(MultithreadEventLoopGroup.java:59)
	at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:86)
	at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:81)
	at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:68)
	at io.vertx.core.net.impl.transport.Transport.eventLoopGroup(Transport.java:153)
	at io.vertx.core.impl.VertxImpl.<init>(VertxImpl.java:143)
	at io.vertx.core.impl.VertxImpl.vertx(VertxImpl.java:92)
	at io.vertx.core.impl.VertxFactoryImpl.vertx(VertxFactoryImpl.java:40)
	at io.vertx.core.impl.VertxFactoryImpl.vertx(VertxFactoryImpl.java:32)
	at io.vertx.core.Vertx.vertx(Vertx.java:85)
	at io.quarkus.vertx.core.runtime.VertxCoreRecorder.initializeWeb(VertxCoreRecorder.java:106)
	at io.quarkus.vertx.core.runtime.VertxCoreRecorder.initializeWeb(VertxCoreRecorder.java:88)
	at io.quarkus.deployment.steps.VertxCoreProcessor$buildWeb41.deploy_0(VertxCoreProcessor$buildWeb41.zig:88)
	at io.quarkus.deployment.steps.VertxCoreProcessor$buildWeb41.deploy(VertxCoreProcessor$buildWeb41.zig:36)
	at io.quarkus.runner.Applicatirated for you. Read CONFIGURE.md and REFLECTION.md for details.
	at com.oracle.svm.core.util.VMErroronImpl.doStart(ApplicationImpl.zig:186)
	... 3 more
.unsupportedFeature(VMError.java:101)
	at jdk.internal.misc.Unsafe.objectFieldOffset(Unsafe.java:50)
	at sun.misc.Unsafe.objectFieldOffset(Unsafe.java:640)
	at io.netty.util.internal.PlatformDependent0.objectFieldOffset(PlatformDependent0.java:505)
	at io.netty.util.internal.PlatformDependent.objectFieldOffset(PlatformDependent.java:651)
	at io.netty.channel.nio.NioEventLoop$4.run(NioEventLoop.java:219)
	at java.security.AccessController.doPrivileged(AccessController.java:81)
	at io.netty.channel.nio.NioEventLoop.openSelector(NioEventLoop.java:209)
	at io.netty.channel.nio.NioEventLoop.<init>(NioEventLoop.java:142)
	at io.netty.channel.nio.NioEventLoopGroup.newChild(NioEventLoopGroup.java:146)
	at io.netty.channel.nio.NioEventLoopGroup.newChild(NioEventLoopGroup.java:37)
	at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:84)
	at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:58)
	at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:47)
	at io.netty.channel.MultithreadEventLoopGroup.<init>(MultithreadEventLoopGroup.java:59)
	at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:86)
	at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:81)
	at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:68)
	at io.vertx.core.net.impl.transport.Transport.eventLoopGroup(Transport.java:153)
	at io.vertx.core.impl.VertxImpl.<init>(VertxImpl.java:143)
	at io.vertx.core.impl.VertxImpl.vertx(VertxImpl.java:92)
	at io.vertx.core.impl.VertxFactoryImpl.vertx(VertxFactoryImpl.java:40)
	at io.vertx.core.impl.VertxFactoryImpl.vertx(VertxFactoryImpl.java:32)
	at io.vertx.core.Vertx.vertx(Vertx.java:85)
	at io.quarkus.vertx.core.runtime.VertxCoreRecorder.initializeWeb(VertxCoreRecorder.java:106)
	at io.quarkus.vertx.core.runtime.VertxCoreRecorder.initializeWeb(VertxCoreRecorder.java:88)
	at io.quarkus.deployment.steps.VertxCoreProcessor$buildWeb41.deploy_0(VertxCoreProcessor$buildWeb41.zig:88)
	at io.quarkus.deployment.steps.VertxCoreProcessor$buildWeb41.deploy(VertxCoreProcessor$buildWeb41.zig:36)
	at io.quarkus.runner.ApplicationImpl.doStart(ApplicationImpl.zig:186)
	at io.quarkus.runtime.Application.start(Application.java:89)
	at io.quarkus.runtime.Application.run(Application.java:226)
	at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:41)

To Reproduce Steps to reproduce the behavior:

  1. Checkout current master ( 64f0e690c when I hit this )
  2. Build integration test module quarkus-integration-test-jpa-h2 with -Dnative
  3. run existing test io.quarkus.it.jpa.h2.JPAFunctionalityInGraalITCase

Running GraalVM CE 19.3.1, 64 bit

The issue only manifests on the JDK11 version: no problem on GraalVM / JDK8.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:21 (21 by maintainers)

github_iconTop GitHub Comments

2reactions
gsmetcommented, Feb 6, 2020

Lol:

[INFO] --- maven-failsafe-plugin:2.22.1:integration-test (default) @ quarkus-integration-test-jpa-h2 ---
[INFO] Tests are skipped.
[INFO] 
[INFO] --- maven-failsafe-plugin:2.22.1:verify (default) @ quarkus-integration-test-jpa-h2 ---
[INFO] Tests are skipped.
1reaction
gsmetcommented, Feb 6, 2020

OK, I will check if I can reproduce it myself. If CI was red, I wouldn’t but there’s something fishy here. It might be our CI not testing the right thing. We need to get to the bottom of it.

https://github.com/quarkusio/quarkus/runs/428850800?check_suite_focus=true is green.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[native-image] Micronaut doesn't work with GraalVM and JDK11
UnsupportedFeatureError: The offset of private final java.util.Set sun.nio.ch.SelectorImpl.selectedKeys is accessed without the field being ...
Read more >
Micronaut Framework/questions - Gitter
UnsupportedFeatureError: The offset of private final java.util.Set sun.nio.ch.SelectorImpl.selectedKeys is accessed without the field being first registered ...
Read more >
Change private static final field using Java reflection
Freezes of a final field occur both at the end of the constructor in which the final field is set, and immediately after...
Read more >
LocalVariableImpl - Ghidra
Set the first use offset. void, setName​(java.lang.String name, SourceType source). Set the name of this variable.
Read more >
OracleLog (Oracle Database JDBC Java API Reference)
Deprecated. when using jdk 1.4. Use java.util.logging instead. Set the private tracing enable variable. setupFromSystemProperties. public static void ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found