tomcat啓動報錯:
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.jasig.cas.authentication.AuthenticationTransactionManager org.jasig.cas.authentication.DefaultAuthenticationSystemSupport.authenticationTransactionManager; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultAuthenticationTransactionManager': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.jasig.cas.authentication.AuthenticationManager org.jasig.cas.authentication.DefaultAuthenticationTransactionManager.authenticationManager; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationManager': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationHandlersResolvers': Cannot resolve reference to bean 'primaryAuthenticationHandler' while setting bean property 'sourceMap'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'queryDatabaseAuthenticationHandlerWithSalt': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void org.jasig.cas.adaptors.jdbc.QueryDatabaseAuthenticationHandlerWithSalt.setDataSource(javax.sql.DataSource); nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/deployerConfigContext.xml]: Invocation of init method failed; nested exception is java.sql.SQLException: Network error IOException: Connection timed out: connect
解決方法:
1.檢查配置信息有無異常:如 web.xml配置是否有問題
2.檢查tomcat的webapp的項目與當前項目是否一致,我的錯誤是工作空間的項目與此次運行的項目不一致,包括個數和內容
3.把Tomcat/Catalina 底下的所有歷史信息去掉
4.查看Tomcat底下的log日誌文件,根據日誌找原因
關注
如果有問題,請在下方評論
想獲得更多的學習知識請關注微信公衆號:西北碼農或掃下方二維碼