Warm tip: This article is reproduced from stackoverflow.com, please click
java jdbc oracle

I can't find OracleCallablestatement in ojdbc8. Is it replaced? if so with what?

发布于 2020-04-13 10:17:56

I can't find OracleCallablestatement in ojdbc8. Is it replaced? if so with what?

<dependency>
  <groupId>com.oracle.ojdbc</groupId>
  <artifactId>ojdbc8</artifactId>
  <scope>runtime</scope>
</dependency>
Questioner
qwerty
Viewed
49
Karol Dowbecki 2020-02-03 20:37

That's because the ojdbc8.jar dependency scope is runtime so classes are not available during compilation. If you need to use OracleCallableStatement in your code change the scope to compile.

<dependency>
  <groupId>com.oracle.ojdbc</groupId>
  <artifactId>ojdbc8</artifactId>
  <scope>compile</scope>
</dependency>