No database found to handle jdbc:oracle:thin
mholmes
Posts: 2 New member
I can't get Maven or Gradle to connect to an Oracle database on a local server. I'll admit, I'm completely new to CI/CD using Maven or Gradle so it might be a configuration issue. Interesting thing though, it's the same error from both.
pom.xml
__________________________________________________
If I just run Flyway by itself, I can get connected and run migrations. I only get connection errors when I try to use it with other tools.
Oracle version: 19.3.0.0
Flyway version: Flyway Community Edition 9.20.0
Maven version: Apache Maven 3.5.4 (Red Hat 3.5.4-5)
Gradle version: Gradle 8.2.1
Java version: openjdk version "1.8.0_372"
OS version: Oracle Linux Server 8.8
pom.xml
__________________________________________________
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
<version>23.2.0.0</version>
</dependency>
</dependencies>
...
<plugin> <groupId>org.flywaydb</groupId>
<artifactId>flyway-maven-plugin</artifactId>
<version>9.20.1</version>
<configuration>
<driver>com.oracle.database.jdbc.ClientDriver</driver>
<url>jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=cicdsand)))</url>
<user>*****</user>
<password>*****</password>
</configuration>
If I just run Flyway by itself, I can get connected and run migrations. I only get connection errors when I try to use it with other tools.
Oracle version: 19.3.0.0
Flyway version: Flyway Community Edition 9.20.0
Maven version: Apache Maven 3.5.4 (Red Hat 3.5.4-5)
Gradle version: Gradle 8.2.1
Java version: openjdk version "1.8.0_372"
OS version: Oracle Linux Server 8.8
Tagged:
Best Answer
-
Peter_Laws Posts: 288 Silver 2
Answers
Thanks for the help! I did add the dependency in Maven and also found another error with the driver line for the plugin.
I changed
<driver>com.oracle.database.jdbc.ClientDriver</driver>
to
<driver>oracle.jdbc.OracleDriver</driver>
And got the output you would expect:
Thanks again and I appreciate the help!
Not at all, my pleasure, have a good week.