qq_38637558
Chaim_chen
2017-11-04 06:02

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

  • ssh
  • 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条回答

为你推荐

换一换