Loading

Mule 4 Application on Java 11 or Java 17 Fails to Start Due to Certain Deprecated GC Logging Flags Enabled

게시 일자: Aug 9, 2024
상세 설명

A mule 4 application is being migrated from Java 8 to Java 17. It had additional JVM parameters enabled to log garbage collection (GC) activity. For example: -XX:+PrintGCApplicationStoppedTime The application fails to be deployed with something similar to:

MULE_HOME is set to /Applications/AnypointStudio7.app/Contents/Eclipse/plugins/org.mule.tooling.server.4.6.ee_7.17.0.202408061751/mule
MULE_BASE is set to /Applications/AnypointStudio7.app/Contents/Eclipse/plugins/org.mule.tooling.server.4.6.ee_7.17.0.202408061751/mule
Running Mule Enterprise Edition...
--> Wrapper Started as Console
Java Service Wrapper Standard Edition 64-bit 3.5.51
  Copyright (C) 1999-2022 Tanuki Software, Ltd. All Rights Reserved.
    http://wrapper.tanukisoftware.com
  Licensed to MuleSoft Inc. for Mule Runtime Enterprise Edition

Launching a JVM...
OpenJDK 64-Bit Server VM warning: Option UseBiasedLocking was deprecated in version 15.0 and will likely be removed in a future release.
Unrecognized VM option 'PrintGCApplicationStoppedTime'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
JVM exited while loading the application.
Automatic JVM Restarts disabled.  Shutting down.
<-- Wrapper Stopped

There are also flags like:

PrintGC

PrintGCDetails

-Xloggc

 

솔루션

According to JDK-8145092 certain GC flags were removed and are no longer supported.

As per JDK-8145180 some flags were later re-added back as deprecated.

To move forward, consider using the new flags. Refer to the following for more information: 

Old: -XX:+PrintGC
New: -Xlog:gc

Old: -XX:+PrintGCDetails
New: -Xlog:gc*

Old: -Xloggc:<filename>
New: -Xlog:gc:<filename>

Knowledge 기사 번호

002520960

 
로드 중
Salesforce Help | Article