0

My application is dependent upon the following artifact

com.oracle.jdbc:ojdbc8

which has a circular dependency with

com.oracle.jdbc:ucp

The build fails with the following error

ERROR: /private/var/tmp/_bazel_me/4f1994ece960b360388a372b5e6aa4b2/external/maven/BUILD:2757:11: in jvm_import rule @maven//:com_oracle_jdbc_ojdbc8: cycle in dependency graph:
   //package/java:MyClass
.-> @maven//:com_oracle_jdbc_ojdbc8
|   @maven//:com_oracle_jdbc_ucp
`-- @maven//:com_oracle_jdbc_ojdbc8

Is there a way to get around this?

user12331
  • 486
  • 7
  • 22

1 Answers1

0

Looking at the artifact here:
https://mvnrepository.com/artifact/com.oracle.jdbc/ojdbc8

there's only one version:
https://mvnrepository.com/artifact/com.oracle.jdbc/ojdbc8/12.2.0.1

and it depends on com.oracle.jdbc:upc, which indeed depends back on com.oracle.jdbc:ojdbc8:12.2.0.1
https://mvnrepository.com/artifact/com.oracle.jdbc/ucp/12.2.0.1

This was surely a mistake, because I don't believe that maven allows circular dependencies either.

Looking back at https://mvnrepository.com/artifact/com.oracle.jdbc/ojdbc8, it says this was moved to https://mvnrepository.com/artifact/com.oracle.database.jdbc/ojdbc8, and the version of upc there has no dependencies: https://mvnrepository.com/artifact/com.oracle.database.jdbc/ucp/12.2.0.1

So maybe com.oracle.database.jdbc:ojdbc8 will work for you (or the specific version com.oracle.database.jdbc:ojdbc8:12.2.0.1, since the previous one was 12.2.0.1 and the latest version is 21.4.0.0.1)

Interestingly, com.oracle.database.jdbc:ojdbc8 says it was also moved: https://mvnrepository.com/artifact/com.oracle.database.jdbc/ojdbc8

ahumesky
  • 4,203
  • 8
  • 12