GAE/J アプリですべての java.util.logging コードを log4j に移行しましたが、次のエラーが発生します。
[INFO] Caused by: java.lang.NoClassDefFoundError: java.lang.management.ManagementFactory is a restricted class. Please see the Google App Engine developer's guide for more details.
[INFO] at com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:51)
[INFO] at org.apache.logging.log4j.core.appender.rolling.OnStartupTriggeringPolicy.<clinit>(OnStartupTriggeringPolicy.java:33)
[INFO] at java.lang.Class.forName0(Native Method)
[INFO] at java.lang.Class.forName(Class.java:186)
[INFO] at org.apache.logging.log4j.core.config.plugins.PluginManager.decode(PluginManager.java:222
これに対する回避策はありますか?
Log4j の依存関係は次のとおりです。
<dependency>
<groupId>org.apache.onami.logging</groupId>
<artifactId>org.apache.onami.logging.log4j2</artifactId>
<version>3.4.0-incubating</version>
</dependency>