Legacy Knowledge Base
Published Jul. 2, 2025

Trace about Reflection.getCallerClass is not supported when executing Patching Tool

Written By

David Tello

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • When you try to use the Patching Tool (for example, the command patchingtool.sh info), you get an error similar to the following:
    2021-07-16 06:41:48,143 INFO sun.reflect.Reflection.getCallerClass is not supported. ReflectionUtil.getCallerClass will be much slower due to this. java.lang.ClassNotFoundException: sun.reflect.Reflection
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
    at java.base/java.lang.Class.forName0(Native Method)
    at java.base/java.lang.Class.forName(Class.java:315)
    at org.apache.logging.log4j.util.LoaderUtil.loadClass(Unknown Source)
    at org.apache.logging.log4j.util.ReflectionUtil.<clinit>(Unknown Source)
    at org.apache.logging.log4j.core.impl.ThrowableProxy.<init>(Unknown Source)
    at org.apache.logging.log4j.core.impl.Log4jLogEvent.getThrownProxy(Unknown Source)
    at org.apache.logging.log4j.core.pattern.ExtendedThrowablePatternConverter.format(Unknown Source)
    at org.apache.logging.log4j.core.pattern.PatternFormatter.format(Unknown Source)
    at org.apache.logging.log4j.core.layout.PatternLayout.toSerializable(Unknown Source)
    at org.apache.logging.log4j.core.layout.PatternLayout.toSerializable(Unknown Source)
    at org.apache.logging.log4j.core.layout.AbstractStringLayout.toByteArray(Unknown Source)
    at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(Unknown Source)
    at org.apache.logging.log4j.core.config.AppenderControl.callAppender(Unknown Source)
    at org.apache.logging.log4j.core.config.LoggerConfig.callAppenders(Unknown Source)
    at org.apache.logging.log4j.core.config.LoggerConfig.log(Unknown Source)
    at org.apache.logging.log4j.core.config.LoggerConfig.log(Unknown Source)
    at org.apache.logging.log4j.core.Logger.logMessage(Unknown Source)
    at org.apache.logging.log4j.spi.AbstractLogger.logMessage(Unknown Source)
    at org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(Unknown Source)
    at org.apache.logging.log4j.spi.AbstractLogger.debug(Unknown Source)
    at com.liferay.patching.tool.d.n.a(Unknown Source)
    at com.liferay.patching.tool.Patcher.main(Unknown Source)

Environment

  •  Liferay DXP 7.2+

Resolution

  • This message could be ignored because it does not affect the behavior of the patching tool execution.
  • This trace could appear when using the patching tool with Java 11.
  • It does not actually refer to an error: it is an info message (see beginning of first line).

 

Did this article resolve your issue ?

Legacy Knowledge Base