zoukankan      html  css  js  c++  java
  • com.opensymphony.xwork2.config.ConfigurationManager.addConfigurationProvider

    一月 31, 2016 5:06:31 下午 org.apache.catalina.core.StandardContext filterStart
    严重: Exception starting filter Struts2
    java.lang.NoSuchMethodError: com.opensymphony.xwork2.config.ConfigurationManager.addConfigurationProvider(Lcom/opensymphony/xwork2/config/ConfigurationProvider;)V
        at org.apache.struts2.dispatcher.Dispatcher.init_DefaultProperties(Dispatcher.java:310)
        at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:411)
        at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:190)
        at org.texturemedia.smarturls.SmartURLsFilter.init(SmartURLsFilter.java:68)
        at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
        at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
        at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
        at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4573)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5188)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

    开始还以为是包冲突,到处找jar包。

    搞不好久没有解决,后来无意间看了一下配置,(当时想知道,谁启动的它)就看了一下web.xml

      <filter>
        <filter-name>Struts2</filter-name>
        <filter-class>org.texturemedia.smarturls.SmartURLsFilter</filter-class>
      </filter>
      <filter-mapping>
        <filter-name>Struts2</filter-name>
        <url-pattern>*.jsp</url-pattern>
      </filter-mapping>

    感觉这个配置怪怪了,就注解了,后来就ok了。

    实际项目里用的spring mvc, 而且这个是过滤jsp的,还标为struts2,感觉有点挂羊头卖狗的感觉。

  • 相关阅读:
    Vocabulary Recitation 2020/05/06
    java set TreeSet详解
    vue快速入门~必备基础知识(一)下~过滤器
    vue快速入门~必备基础知识(一)上
    vue入门(二)基于前面的基础的一个小Demo
    Annotation注释详解~
    泛型~详解~
    Collections工具类详解
    TreeMap实现类和SortMap接口
    Map集合-主要HashMap和Hashtable
  • 原文地址:https://www.cnblogs.com/angelshelter/p/5173541.html
Copyright © 2011-2022 走看看