Chaim_chen 2017-11-04 06:02 采纳率: 50%
浏览 883
已结题

UrlReWriterFilter伪静态一直报异常,求助

这是异常信息:

 13:23:15,510 DEBUG RMI TCP Connection(2)-127.0.0.1 support.DefaultListableBeanFactory:251 - Returning cached instance of singleton bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0'
04-Nov-2017 13:23:15.731 严重 [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more Filters failed to start. Full details will be found in the appropriate container log file
04-Nov-2017 13:23:15.731 严重 [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [/generalize] startup failed due to previous errors
13:23:15,768  INFO RMI TCP Connection(2)-127.0.0.1 support.XmlWebApplicationContext:987 - Closing Root WebApplicationContext: startup date [Sat Nov 04 13:23:07 CST 2017]; root of context hierarchy
13:23:15,769 DEBUG RMI TCP Connection(2)-127.0.0.1 support.DefaultListableBeanFactory:251 - Returning cached instance of singleton bean 'lifecycleProcessor'
13:23:15,769 DEBUG RMI TCP Connection(2)-127.0.0.1 support.DefaultListableBeanFactory:512 - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@2865c2f8: defining beans [baseDaoImpl,tableDaoImpl,tableServiceImpl,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.context.event.internalEventListenerProcessor,org.springframework.context.event.internalEventListenerFactory,org.springframework.context.support.PropertySourcesPlaceholderConfigurer#0,dataSource,sessionFactory,transactionManager,txAdvice,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0]; root of factory hierarchy
13:23:15,770 DEBUG RMI TCP Connection(2)-127.0.0.1 support.DefaultListableBeanFactory:568 - Retrieved dependent beans for bean 'sessionFactory': [baseDaoImpl, tableDaoImpl, transactionManager]
13:23:15,770 DEBUG RMI TCP Connection(2)-127.0.0.1 support.DefaultListableBeanFactory:568 - Retrieved dependent beans for bean 'tableDaoImpl': [tableServiceImpl]
13:23:15,770 DEBUG RMI TCP Connection(2)-127.0.0.1 support.DefaultListableBeanFactory:568 - Retrieved dependent beans for bean 'transactionManager': [txAdvice]
13:23:15,771 DEBUG RMI TCP Connection(2)-127.0.0.1 support.DefaultListableBeanFactory:568 - Retrieved dependent beans for bean '(inner bean)#432df6b2': [txAdvice]
13:23:15,771 DEBUG RMI TCP Connection(2)-127.0.0.1 support.DisposableBeanAdapter:259 - Invoking destroy() on bean with name 'sessionFactory'
13:23:15,772 DEBUG RMI TCP Connection(2)-127.0.0.1 support.DisposableBeanAdapter:337 - Invoking destroy method 'close' on bean with name 'dataSource'
04-Nov-2017 13:23:15.781 警告 [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [generalize] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
[2017-11-04 01:23:15,813] Artifact Generalize:war exploded: Error during artifact deployment. See server log for details.

web.xml:

 <?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://java.sun.com/xml/ns/javaee"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">

  <!-- 通过ServletContext初始化参数指定Spring配置文件位置 -->
  <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath:applicationContext.xml</param-value>
  </context-param>
  <!-- 配置Spring ContextListener -->
  <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  </listener>

  <!-- 配置Spring字符编码过滤器 -->
  <filter>
    <filter-name>encodingFilter</filter-name>
    <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
    <init-param>
      <param-name>encoding</param-name>
      <param-value>UTF-8</param-value>
    </init-param>
  </filter>
  <filter-mapping>
    <filter-name>encodingFilter</filter-name>
    <url-pattern>*.action</url-pattern>
    <url-pattern>*.jsp</url-pattern>
  </filter-mapping>


  <!-- UrlReWriterFilter -->
  <filter>
    <filter-name>UrlReWriterFilter</filter-name>
    <filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
  </filter>
  <filter-mapping>
    <!-- 这里的名字要对应上UrlReWriterFilter -->
    <filter-name>UrlReWriterFilter</filter-name>
    <!-- 这里是选择过滤掉全部的Url -->
    <url-pattern>/*</url-pattern>
    <!-- 主要说明该拦截器拦截的请求包括客户端的请求和从服务器端forward的请求 -->
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
  </filter-mapping>

  <!-- 配置struts核心过滤器 -->
  <filter>
    <filter-name>struts</filter-name>
    <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>struts</filter-name>
    <url-pattern>*.action</url-pattern>
    <url-pattern>*.jsp</url-pattern>
  </filter-mapping>
</web-app>

还请大神们帮忙看看,问题出在哪里了,不在web.xml中配置UrlReWriterFilter就没有问题,一配置就会有这个警告

  • 写回答

1条回答 默认 最新

  • Chaim_chen 2017-11-04 16:30
    关注

    已经解决,后续会博客形式展示出解决思路

    评论

报告相同问题?

问题事件

  • 已结题 (查看结题原因) 7月29日

悬赏问题

  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?