tomcat在加载项目时,spring已加载成功,突然报错Error filterStart,大家帮我分析一下看是那个filter加载错误了,谢谢大家了启动日志如下:2009-02-21 15:00:52,062 [org.springframework.scheduling.quartz.SchedulerFactoryBean]-[INFO] Starting Quartz Scheduler now
2009-02-21 15:00:52,062 [org.quartz.core.QuartzScheduler]-[INFO] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
2009-02-21 15:00:52,171 [org.springframework.web.context.ContextLoader]-[INFO] Root WebApplicationContext: initialization completed in 64265 ms
2009-2-21 15:00:59 org.apache.catalina.core.StandardContext start
严重: Error filterStart
2009-2-21 15:00:59 org.apache.catalina.core.StandardContext start
严重: Context startup failed due to previous errors
我的web.xml如下:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
         xmlns="http://java.sun.com/xml/ns/j2ee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <display-name>bbscs8</display-name>
    <filter>
        <filter-name>UrlRewriteFilter</filter-name>
        <filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>UrlRewriteFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <!--
   <filter>
     <filter-name>SidFilter</filter-name>
     <filter-class>com.laoer.bbscs.web.servlet.SidFilter</filter-class>
   </filter>
   <filter-mapping>
     <filter-name>SidFilter</filter-name>
     <url-pattern>/*</url-pattern>
   </filter-mapping>
    -->
    <filter>
        <filter-name>CharacterEncodingFilter</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>
        <init-param>
            <param-name>forceEncoding</param-name>
            <param-value>true</param-value>
        </init-param>
    </filter>
    <filter-mapping>
        <filter-name>CharacterEncodingFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <filter>
        <filter-name>OpenSessionInViewFilter</filter-name>
        <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>OpenSessionInViewFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <filter>
        <filter-name>struts-cleanup</filter-name>
        <filter-class>org.apache.struts2.dispatcher.ActionContextCleanUp</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>struts-cleanup</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <filter>
        <filter-name>Struts2</filter-name>
        <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>Struts2</filter-name>
        <url-pattern>/*</url-pattern>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>FORWARD</dispatcher>
    </filter-mapping>
    <context-param>
        <param-name>urlrewrite</param-name>
        <param-value>false</param-value>
    </context-param>
    <context-param>
        <param-name>cluster</param-name>
        <param-value>false</param-value>
    </context-param>
    <context-param>
        <param-name>servletmapping</param-name>
        <param-value>*.bbscs</param-value>
    </context-param>
    <context-param>
        <param-name>poststoragemode</param-name>
        <param-value>1</param-value>
    </context-param>
    <listener>
        <listener-class>com.laoer.bbscs.web.servlet.SysListener</listener-class>
    </listener>
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/applicationContext.xml,/WEB-INF/action-servlet.xml</param-value>
    </context-param>
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    <servlet>
        <servlet-name>authimg</servlet-name>
        <servlet-class>com.laoer.bbscs.web.servlet.AuthImg</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>authimg</servlet-name>
        <url-pattern>/authimg</url-pattern>
    </servlet-mapping>
    <servlet>
        <servlet-name>rss</servlet-name>
        <servlet-class>com.laoer.bbscs.web.servlet.Rss</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>rss</servlet-name>
        <url-pattern>/rss</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    <jsp-config>
        <taglib>
            <taglib-uri>/WEB-INF/struts-tags.tld</taglib-uri>
            <taglib-location>/WEB-INF/struts-tags.tld</taglib-location>
        </taglib>
    </jsp-config>
    <error-page>
        <error-code>401</error-code>
        <location>/401.htm</location>
    </error-page>
    <error-page>
        <error-code>403</error-code>
        <location>/403.htm</location>
    </error-page>
    <error-page>
        <error-code>404</error-code>
        <location>/404.htm</location>
    </error-page>
    <error-page>
        <error-code>500</error-code>
        <location>/500.htm</location>
    </error-page>
    <error-page>
        <exception-type>java.lang.NullPointerException</exception-type>
        <location>/npe.htm</location>
    </error-page>
</web-app>

解决方案 »

  1.   

    异常如下:
    2009-02-21 15:00:52,015 [org.quartz.impl.StdSchedulerFactory]-[INFO] Quartz scheduler version: 1.5.2
    2009-02-21 15:00:52,046 [org.quartz.core.QuartzScheduler]-[INFO] JobFactory set to: org.springframework.scheduling.quartz.AdaptableJobFactory@3c855e
    2009-02-21 15:00:52,062 [org.springframework.scheduling.quartz.SchedulerFactoryBean]-[INFO] Starting Quartz Scheduler now
    2009-02-21 15:00:52,062 [org.quartz.core.QuartzScheduler]-[INFO] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
    2009-02-21 15:00:52,171 [org.springframework.web.context.ContextLoader]-[INFO] Root WebApplicationContext: initialization completed in 64265 ms
    2009-2-21 15:00:59 org.apache.catalina.core.StandardContext start
    严重: Error filterStart
    2009-2-21 15:00:59 org.apache.catalina.core.StandardContext start
    严重: Context startup failed due to previous errors
    2009-02-21 15:00:59,625 [org.springframework.web.context.support.XmlWebApplicationContext]-[INFO] Closing org.springframework.web.context.support.XmlWebApplicationContext@18706f6: display name [Root WebApplicationContext]; startup date [Sat Feb 21 14:59:48 CST 2009]; root of context hierarchy
    2009-02-21 15:00:59,625 [org.quartz.core.QuartzScheduler]-[INFO] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED paused.
    2009-02-21 15:00:59,625 [org.springframework.beans.factory.support.DefaultListableBeanFactory]-[INFO] Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@12e43f1: defining beans [placeholderConfig,dataSource,abstractSessionFactory,sessionFactory,myTransactionManager,messageSource,sysOptionsValues,sysConfig,userConfig,forumConfig,sysStatService,userPermissionCache,sysListObjCache,boardCache,postCache,ipSeeker,ajaxMessagesJson,templateMail,userInfoFileIO,forumUploadFile,commendFileIO,subscibeQueue,tempConfiguration,userInfoDAO,configDAO,boardDAO,boardPermissionDAO,permissionDAO,roleDAO,userGroupDAO,userOnlineDAO,loginErrorDAO,userLevelDAO,boardSaveDAO,friendDAO,noteDAO,bookMarkDAO,forumMainDAO,forumHistoryDAO,subscibeDAO,voteDAO,voteItemDAO,voteUserDAO,forumBuyDAO,agreeAgainstDAO,commendDAO,boardAuthUserDAO,sysNumStatDAO,userTopDAO,eliteDAO,forumArchivesDAO,boardMasterDAO,boardTagDAO,boardMasterDAOIntercept,boardTagDAOIntercept,boardDAOIntercept,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.aop.aspectj.AspectJPointcutAdvisor#0,org.springframework.aop.aspectj.AspectJPointcutAdvisor#1,org.springframework.aop.aspectj.AspectJPointcutAdvisor#2,org.springframework.aop.aspectj.AspectJPointcutAdvisor#3,org.springframework.aop.aspectj.AspectJPointcutAdvisor#4,org.springframework.aop.aspectj.AspectJPointcutAdvisor#5,org.springframework.aop.aspectj.AspectJPointcutAdvisor#6,userService,configService,permissionService,roleService,userGroupService,userOnlineService,loginErrorService,userLevelService,boardService,boardPermissionService,boardSaveService,friendService,noteService,bookMarkService,forumService,forumHistoryService,subscibeService,voteService,voteItemService,voteUserService,agreeAgainstService,commendService,boardAuthUserService,sysNumStatService,userTopService,eliteService,forumArchivesService,boardMasterService,boardTagService,txAdvice,serviceOperation,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0,friendFactory,noteFactory,bookMarkFactory,subscibeFactory,boardCount,loginErrorClear,voteUserClear,forumHistoryTimer,userOnlineClear,subscibeSend,boardCountTimerTask,loginErrorClearTimerTask,voteUserClearTimerTask,forumHistoryTimerTask,userOnlineClearTimerTask,subscibeSendTimerTask,timerFactory,sysNumStatJob,userTopFileJob,forumArchivesJob,sysNumStatJobCronTrigger,userTopFileJobCronTrigger,forumArchivesJobCronTrigger,org.springframework.scheduling.quartz.SchedulerFactoryBean#0,regAction,regValidateAction,checkUserNameAction,loginAction,adminLogoutAction,adminOpenSetAction,adminWebsetAction,adminBaseSetAction,adminDateTimeFormatSetAction,adminCookiePassSetAction,adminScreenSetAction,adminEmailSetAction,adminUserRegSetAction,adminUserProSetAction,adminFaceSetAction,adminForbidSetAction,adminPostSetAction,adminAttachSetAction,adminVoteSetAction,adminPmSetAction,adminForumViewSetAction,adminPostViewSetAction,adminPostHiddenSetAction,adminUOTimeSetAction,adminUserLevelAction,adminBoardListAction,adminBoardSetAction,adminBoardMasterListAction,adminBoardMasterSetAction,adminBoardTagAction,adminBoardUgAction,adminPermissionAction,adminRoleAction,adminUgSetAction,adminUserSearchAction,nagAction,logoutAction,signSetAction,nickNameSetAction,userConfigSetAction,friendSetAction,noteAction,bookMarkAction,userFaceAction,userDetailSetAction,cpasswdAction,boardSaveManageAction,forumAction,postAction,readAction,delAttachAction,votePostAction,voteOptAction,postOptAction,moveForumAction,boardSaveAction,subsAction,forumManageAction,postWaitAuditAction,manageAdvanceAction,forumSearchAction,userInfoAction,inAction,onlineAction,userShowAction,sysNumStatAction,refineAction,boardPasswdAction]; root of factory hierarchy
    2009-02-21 15:00:59,625 [org.springframework.scheduling.quartz.SchedulerFactoryBean]-[INFO] Shutting down Quartz Scheduler
    2009-02-21 15:00:59,625 [org.quartz.core.QuartzScheduler]-[INFO] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED shutting down.
    2009-02-21 15:00:59,625 [org.quartz.core.QuartzScheduler]-[INFO] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED paused.
    2009-02-21 15:00:59,625 [org.quartz.core.QuartzScheduler]-[INFO] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED shutdown complete.
    2009-02-21 15:00:59,625 [org.springframework.scheduling.timer.TimerFactoryBean]-[INFO] Cancelling Timer
    2009-02-21 15:00:59,640 [org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean]-[INFO] Closing Hibernate SessionFactory
    2009-02-21 15:00:59,640 [org.hibernate.impl.SessionFactoryImpl]-[INFO] closing
    2009-02-21 15:00:59,640 [org.springframework.orm.hibernate3.LocalSessionFactoryBean]-[INFO] Closing Hibernate SessionFactory
    2009-02-21 15:00:59,640 [org.hibernate.impl.SessionFactoryImpl]-[INFO] closing
    2009-2-21 15:00:59 org.apache.catalina.loader.WebappClassLoader loadClass
    信息: Illegal access: this web application instance has been stopped already (the eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact)
    2009-2-21 15:01:07 org.apache.catalina.core.StandardHostDeployer install
    信息: Installing web application at context path /jsp-examples from URL file:D:\jakarta-tomcat-5.0.28\webapps\jsp-examples
    2009-2-21 15:01:08 org.apache.catalina.core.StandardHostDeployer install
    …………