Upgrade from Spring 5 to Spring 6 (Spring Boot v2 — v3) brings Jakarta EE 9+ with it. This makes com.oracle.database.messaging:aqapi to be incompatible because the ConnectionFactory class moved from javax package to jakarta package.
This one can be solved by replacing the com.oracle.database.messaging:aqapi with com.oracle.database.messaging:aqapi-jakarta dependency.
But after this replacement the project doesn't get compiled with the error: createShardingKeyBuilder() in cannot implement createShardingKeyBuilder() in javax.sql.CommonDataSource return type oracle.jdbc.OracleShardingKeyBuilder is not compatible with java.sql.ShardingKeyBuilder or it can be createShardingKeyBuilder in oracle.ucp.jdbc.PoolDataSource clashes with createShardingKeyBuilder in javax.sql.CommonDataSource.
The problem lies in
com.oracle.database.jdbc:ojdbcdependency.com.oracle.database.messaging:aqapi-jakartais depended oncom.oracle.database.jdbc:ojdbc8but to make Oracle JDBC work under Java17 one needscom.oracle.database.jdbc:ojdbc11.Thus the
pom.xmlshould have the dependencies specified in the following way: