I'm creating a basic Struts2 webApp and getting this error when I deploy to Tomcat 10. Has anyone seen this?
How can I solve this?
java.lang.NoSuchMethodError: 'java.lang.String org.apache.logging.log4j.util.PropertiesUtil.getStringProperty(java.lang.String[], java.lang.String, org.apache.logging.log4j.util.Supplier)'
at org.apache.logging.log4j.core.util.BasicAuthorizationProvider.<init>(BasicAuthorizationProvider.java:43)
at org.apache.logging.log4j.core.config.ConfigurationFactory.authorizationProvider(ConfigurationFactory.java:215)
at org.apache.logging.log4j.core.config.ConfigurationFactory.getInstance(ConfigurationFactory.java:188)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:696)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:717)
at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:272)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:155)
web.xml & struct.xml
<?xml version="1.0" encoding="UTF-8" ?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:javaee="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
<struts>
<package name="default" extends="struts-default">
<action name="myurl" class="com.pro.basics.myActionClass">
<result name="success">/success.jsp</result>
</action>
</package>
</struts>
Use the same versions of log4j-api
and log4j-core