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日志文件,根据日志找原因
关注
如果有问题,请在下方评论
想获得更多的学习知识请关注微信公众号:西北码农或扫下方二维码