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

UnsupportedOperationException thrown at startup for vertx-quickstart project with Java 11 #5213

Closed
enbohm opened this issue Nov 5, 2019 · 3 comments · Fixed by #10544
Closed
Labels
kind/bug Something isn't working
Milestone

Comments

@enbohm
Copy link

enbohm commented Nov 5, 2019

Describe the bug
When starting vertx-quickstart project (from quarkus quickstart examples) via mvn compile quarkus:dev -Dquarkus.log.level=DEBUG the following stack trace is shown in the logs:

2019-11-05 13:00:34,557 DEBUG [io.net.uti.int.PlatformDependent0] (build-16) direct buffer constructor: unavailable: java.lang.UnsupportedOperationException: Reflective setAccessible(true) disabled
	at io.netty.util.internal.ReflectionUtil.trySetAccessible(ReflectionUtil.java:31)
	at io.netty.util.internal.PlatformDependent0$4.run(PlatformDependent0.java:224)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at io.netty.util.internal.PlatformDependent0.<clinit>(PlatformDependent0.java:218)
	at io.netty.util.internal.PlatformDependent.isAndroid(PlatformDependent.java:272)
	at io.netty.util.internal.PlatformDependent.<clinit>(PlatformDependent.java:92)
	at io.netty.buffer.UnpooledByteBufAllocator.<clinit>(UnpooledByteBufAllocator.java:37)
	at io.netty.buffer.Unpooled.<clinit>(Unpooled.java:73)
	at io.netty.handler.codec.http.HttpObjectEncoder.<clinit>(HttpObjectEncoder.java:53)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:315)
	at io.quarkus.netty.deployment.NettyProcessor.build(NettyProcessor.java:81)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at io.quarkus.deployment.ExtensionLoader$1.execute(ExtensionLoader.java:941)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:415)
	at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
	at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2011)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1535)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1426)
	at java.base/java.lang.Thread.run(Thread.java:834)
	at org.jboss.threads.JBossThread.run(JBossThread.java:479)

2019-11-05 13:00:34,558 DEBUG [io.net.uti.int.PlatformDependent0] (build-16) java.nio.Bits.unaligned: available, {}
2019-11-05 13:00:34,559 DEBUG [io.net.uti.int.PlatformDependent0] (build-16) jdk.internal.misc.Unsafe.allocateUninitializedArray(int): unavailable: java.lang.IllegalAccessException: class io.netty.util.internal.PlatformDependent0$6 cannot access class jdk.internal.misc.Unsafe (in module java.base) because module java.base does not export jdk.internal.misc to unnamed module @75b061d
	at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:361)
	at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:591)
	at java.base/java.lang.reflect.Method.invoke(Method.java:558)
	at io.netty.util.internal.PlatformDependent0$6.run(PlatformDependent0.java:334)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at io.netty.util.internal.PlatformDependent0.<clinit>(PlatformDependent0.java:325)
	at io.netty.util.internal.PlatformDependent.isAndroid(PlatformDependent.java:272)
	at io.netty.util.internal.PlatformDependent.<clinit>(PlatformDependent.java:92)
	at io.netty.buffer.UnpooledByteBufAllocator.<clinit>(UnpooledByteBufAllocator.java:37)
	at io.netty.buffer.Unpooled.<clinit>(Unpooled.java:73)
	at io.netty.handler.codec.http.HttpObjectEncoder.<clinit>(HttpObjectEncoder.java:53)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:315)
	at io.quarkus.netty.deployment.NettyProcessor.build(NettyProcessor.java:81)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at io.quarkus.deployment.ExtensionLoader$1.execute(ExtensionLoader.java:941)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:415)
	at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
	at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2011)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1535)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1426)
	at java.base/java.lang.Thread.run(Thread.java:834)
	at org.jboss.threads.JBossThread.run(JBossThread.java:479)

Expected behavior
No stack trace (or fail to start application)

Actual behavior
Application is started with possible errors.

To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/quarkusio/quarkus-quickstarts.git
  2. cd quarkus-quickstarts/vertx-quickstart
  3. mvn compile quarkus:dev -Dquarkus.log.level=DEBUG

Just after the application is about to start, this exception occurs and the stack trace is logged. This is probably related to Java modules (which was introduces in Java 9).

Environment (please complete the following information):

  • Output of uname -a or ver:
    Darwin MacBook-Pro.local 19.0.0 Darwin Kernel Version 19.0.0: Wed Sep 25 20:18:50 PDT 2019; root:xnu-6153.11.26~2/RELEASE_X86_64 x86_64
  • Output of java -version:
    openjdk version "11" 2018-09-25
    OpenJDK Runtime Environment 18.9 (build 11+28)
    OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)
  • GraalVM version (if different from Java): N/A
  • Quarkus version or git rev: 0.28.1
@enbohm enbohm added the kind/bug Something isn't working label Nov 5, 2019
@gsmet gsmet added this to the 0.28.3 milestone Nov 5, 2019
@stuartwdouglas
Copy link
Member

This is a netty issue, they attempt lots of different optimisations, and some of them don't work on all JDK versions. When they don't work they log them at DEBUG.

@gastaldi
Copy link
Contributor

gastaldi commented Nov 5, 2019

According to @stuartwdouglas' comment above, I don't think there is anything in the Quarkus side to fix?

@stuartwdouglas
Copy link
Member

It would be good to filter this out, we have had a few reports about it

@gsmet gsmet removed this from the 0.28.3 milestone Nov 6, 2019
stuartwdouglas added a commit to stuartwdouglas/quarkus that referenced this issue Jul 8, 2020
We have had various reports about these so this
drops them to TRACE level.

Fixes quarkusio#5213
stuartwdouglas added a commit to stuartwdouglas/quarkus that referenced this issue Jul 8, 2020
We have had various reports about these so this
drops them to TRACE level.

Fixes quarkusio#5213
patriot1burke pushed a commit to patriot1burke/quarkus that referenced this issue Jul 14, 2020
We have had various reports about these so this
drops them to TRACE level.

Fixes quarkusio#5213
@gsmet gsmet added this to the 1.6.1.Final milestone Jul 16, 2020
gsmet pushed a commit to gsmet/quarkus that referenced this issue Jul 16, 2020
We have had various reports about these so this
drops them to TRACE level.

Fixes quarkusio#5213
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants