[b]Addressed issues when starting Tomcat with Spring application [/b]
[b]Issue 1: failed to register JDBC[/b]
Problem: registered the jdbc, failed to register com.microsoft.sqlserver.jdbc.SQLServerDriver, prevent memory leak
Solution: overwrite org.apache.commons.dbcp.BasicDataSource
[b]Issue 2: servlet-api offends[/b]
Problem: servlet-api offends with tomcat.
Solution: delete servlet-api-2.5.jar
[b]Issue 3[/b]
Problem: Could not find value for key log4j.appender.errorlog
Solution: clear the redundant information of log4j.properties
[b]Issue 4[/b]
Problem: log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
Solution: append log4j config of spring into log4j.properties
[b]Issue 5: Can not connect to SQL Server[/b]
Problem: Can not connect to SQL Server
Solution: modify TCP/IP option of SQL Server Network configuration
[b]Issue 1: failed to register JDBC[/b]
Problem: registered the jdbc, failed to register com.microsoft.sqlserver.jdbc.SQLServerDriver, prevent memory leak
Solution: overwrite org.apache.commons.dbcp.BasicDataSource
[b]Issue 2: servlet-api offends[/b]
Problem: servlet-api offends with tomcat.
Solution: delete servlet-api-2.5.jar
[b]Issue 3[/b]
Problem: Could not find value for key log4j.appender.errorlog
Solution: clear the redundant information of log4j.properties
[b]Issue 4[/b]
Problem: log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
Solution: append log4j config of spring into log4j.properties
[b]Issue 5: Can not connect to SQL Server[/b]
Problem: Can not connect to SQL Server
Solution: modify TCP/IP option of SQL Server Network configuration
本文解决启动Tomcat与Spring应用时遇到的五个常见问题:注册JDBC失败、servlet-api jar文件错误、log4j配置问题、无法连接SQLServer、以及Servlet API错误。通过提供详细解决方案,确保应用稳定运行。

被折叠的 条评论
为什么被折叠?



