Dahyun Ko created AMBARI-26557:
----------------------------------
Summary: Ambari Schema Upgrade Fails with JDK 17
Key: AMBARI-26557
URL: https://issues.apache.org/jira/browse/AMBARI-26557
Project: Ambari
Issue Type: Bug
Components: ambari-server
Affects Versions: 3.0.0
Reporter: Dahyun Ko
Assignee: Dahyun Ko
Fix For: 3.1.0
h2. Summary
Ambari server schema upgrade fails with InaccessibleObjectException when
upgrading from version 2.7.9 to 3.0.0 under JDK 17 environment.
h3. Steps to Reproduce
# Set up Ambari-server version 2.7.9 (use JDK 11)
# Replace the Ambari-server package with version 3.0.0 (use JDK 17)
# Run the following command to upgrade the database schema
{code:java}
ambari-server upgrade{code}
h3. Expected Behavior
Ambari successfully upgrades the schema.
h3. Observed Behavior
Upgrade fails with the following error message:
{code:java}
# ambari-server.log Caused by: java.lang.reflect.InaccessibleObjectException:
Unable to make protected final java.lang.Class
java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int) throws
java.lang.ClassFormatError accessible: module java.base does not "opens
java.lang" to unnamed module @45cde1af {code}
h3. Solution
Add logic to apply JVM options "{{{}--add-opens"{}}} depending on JDK version.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]