添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

Struts2 Error when Deploying java.lang.NoSuchMethodError: 'java.lang.String org.apache.logging.log4j.util.PropertiesUtil.getStringProperty

Ask Question

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>
                It should be duplicate of this question, but can't be, because this question does not have an upvoted or accepted answer :(
– Roman C
                Aug 4, 2021 at 10:19
        

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.