No database found to handle jdbc:oracle:thin

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.


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:
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

Best Answer

  • Peter_LawsPeter_Laws Posts: 178 Silver 1
    Hello mholmes,

    This mostly looks correct. I think you may need to explicitly add the flyway-database-oracle dependency as detailed here.

    If you're able to share the exception you receive that might also help.
    Kind regards
    Peter Laws | Redgate Software
    Have you visited our Help Center?


  • mholmesmholmes Posts: 2 New member

    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 

    And got the output you would expect:
    [INFO] ------------------------------------------------------------------------
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 5.307 s
    [INFO] Finished at: 2023-07-24T11:40:47-05:00
    [INFO] ------------------------------------------------------------------------

    Thanks again and I appreciate the help!
  • Excellent news!
    Not at all, my pleasure, have a good week.
    Kind regards
    Peter Laws | Redgate Software
    Have you visited our Help Center?

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file