Translated message

A translation of this page exists in English.

JDK 21 環境で `PRESERVE_JAVA_OPTS=true` を設定すると、JBoss EAP 8.0 の起動が `InaccessibleObjectException` と `NoClassDefFoundError` で失敗する

Solution Unverified - Updated -

Issue

  • 環境変数 PRESERVE_JAVA_OPTS=true を設定した状態で JBoss EAP 8.0 を JDK 21 を使用して起動すると、プロセスが失敗し server.log に複数のエラーが出力される。
  • エラーには java.lang.reflect.InaccessibleObjectExceptionjava.lang.NoClassDefFoundError: Could not initialize class org.wildfly.clustering.marshalling.protostream.util.UtilMarshallerProvider が含まれる。
  • 具体的なエラーメッセージとして、java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.lang.Class java.util.EnumMap.keyType accessible: module java.base does not "opens java.util" to unnamed module が確認される。
  • JAVA_OPTS に JVM オプションとして --add-opens java.base/java.util=ALL-UNNAMED を追加するとサーバーは起動する。

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP) 8.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content