problem with log4j2
Posted: 27 Jan 2022, 11:14
Hi,
We upgraded the logging in our application from log4j 1.x to the newest 2.17.1 version and now we get errors with OpenWebstart.
Exception is below - log4j-core-2.17.1.jar and log4j-api-2.17.1.jar are in the jnlp and they are loaded. PluginAliases is part of the core-jar. Is this a known problem with OpenWebstart or AdoptOpenJDK? Old webstart is working fine?
We upgraded the logging in our application from log4j 1.x to the newest 2.17.1 version and now we get errors with OpenWebstart.
Exception is below - log4j-core-2.17.1.jar and log4j-api-2.17.1.jar are in the jnlp and they are loaded. PluginAliases is part of the core-jar. Is this a known problem with OpenWebstart or AdoptOpenJDK? Old webstart is working fine?
Code: Select all
Exiting Boot.mainWithReturnCode() with 0
... 27 more
at net.sourceforge.jnlp.runtime.classloader.JNLPClassLoader.loadClass(JNLPClassLoader.java:1446)
at java.util.Optional.orElseThrow(Optional.java:290)
at net.sourceforge.jnlp.runtime.classloader.JNLPClassLoader.lambda$loadClass$9(JNLPClassLoader.java:1446)
Caused by: java.lang.ClassNotFoundException: org.apache.logging.log4j.core.config.plugins.PluginAliases
at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:659)
at net.sourceforge.jnlp.Launcher.access$200(Launcher.java:71)
at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:406)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at dataplan.client.journaldesigner.jd.<clinit>(jd.java:73)
at dataplan.common.utilities.dpLogfile.<clinit>(dpLogfile.java:84)
at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:666)
at org.apache.logging.log4j.LogManager.getContext(LogManager.java:176)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:47)
at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:270)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:716)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:695)
at org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:323)
at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:481)
at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:557)
at org.apache.logging.log4j.core.config.xml.XmlConfigurationFactory.getConfiguration(XmlConfigurationFactory.java:46)
at org.apache.logging.log4j.core.config.xml.XmlConfiguration.<init>(XmlConfiguration.java:138)
at org.apache.logging.log4j.core.config.AbstractConfiguration.initializeWatchers(AbstractConfiguration.java:264)
at org.apache.logging.log4j.core.config.AbstractConfiguration.monitorSource(AbstractConfiguration.java:276)
at org.apache.logging.log4j.core.util.WatcherFactory.getInstance(WatcherFactory.java:55)
at org.apache.logging.log4j.core.util.WatcherFactory.<init>(WatcherFactory.java:47)
at org.apache.logging.log4j.core.config.plugins.util.PluginManager.collectPlugins(PluginManager.java:152)
at org.apache.logging.log4j.core.config.plugins.util.PluginRegistry.loadFromPackage(PluginRegistry.java:246)
Caused by: java.lang.NoClassDefFoundError: org/apache/logging/log4j/core/config/plugins/PluginAliases
at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:679)