Skip to content
Advertisement

Tomcat and Tomcat dbcp issue after upgrade to v9.0.58

I’m getting this issue when upgrading Tomcat and Tomcat DBCP from v9.0.54 to v.9.0.58 with Java 11.

JavaScript

Advertisement

Answer

This issue was happening when we were trying to create a BasicDataSource BasicDataSource dataSource = new BasicDataSource(); which was imported from import org.apache.tomcat.dbcp.dbcp2.BasicDataSource;

So we found a workaround to remove the tomcat dbcp dependency by excluding it from spring-boot starter tomcat and tomcat jdbc.

JavaScript

and Replacing the datasource to org.apache.tomcat.jdbc.pool.DataSource dataSource = new org.apache.tomcat.jdbc.pool.DataSource();

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement