liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: java.lang.RuntimeException: Cannot find database driver: org.postgresql.Driver

JIRA | Josh Wand | 2 months ago
  1. 0

    I am having trouble getting liquibase to work in my environment-- it seems unable to find the postgresql jdbc driver, even when I add the jar to the classpath via the following methods: * maven plugin dependencies * maven project dependencies * liquibase command line classpath argument * liquibase.properties classpath entry * adding jar to {{$LIQUIBASE_HOME/lib}} command line version: {code} $ liquibase --changeLogFile=src/main/resources/db/changelog/db.changelog-master.yaml --defaultsFile=src/main/resources/db/liquibase.properties --logLevel=debug --classpath="/Users/jwand/.m2/repository/org/postgresql/postgresql/9.4.1211/postgresql-9.4.1211.jar" diffChangeLog Unexpected error running Liquibase: java.lang.RuntimeException: Cannot find database driver: org.postgresql.Driver SEVERE 10/5/16 2:37 PM: liquibase: java.lang.RuntimeException: Cannot find database driver: org.postgresql.Driver liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: java.lang.RuntimeException: Cannot find database driver: org.postgresql.Driver at liquibase.integration.commandline.CommandLineUtils.createDatabaseObject(CommandLineUtils.java:127) at liquibase.integration.commandline.Main.doMigration(Main.java:954) at liquibase.integration.commandline.Main.run(Main.java:184) at liquibase.integration.commandline.Main.main(Main.java:103) Caused by: liquibase.exception.DatabaseException: java.lang.RuntimeException: Cannot find database driver: org.postgresql.Driver at liquibase.database.DatabaseFactory.openConnection(DatabaseFactory.java:247) at liquibase.database.DatabaseFactory.openDatabase(DatabaseFactory.java:151) at liquibase.integration.commandline.CommandLineUtils.createDatabaseObject(CommandLineUtils.java:85) ... 3 more Caused by: java.lang.RuntimeException: Cannot find database driver: org.postgresql.Driver at liquibase.database.DatabaseFactory.openConnection(DatabaseFactory.java:199) ... 5 more For more information, use the --logLevel flag {code} Maven version: {code} $ mvn liquibase:diff ... Error setting up or running Liquibase: liquibase.exception.DatabaseException: java.lang.RuntimeException: Cannot find database driver: org.postgresql.Driver}} {code} I have included postgres in plugin dependencies (and I checked to make sure that jar does include the driver class): {code} <plugin> <groupId>org.liquibase</groupId> <artifactId>liquibase-maven-plugin</artifactId> <configuration> <propertyFile>src/main/resources/db/liquibase.properties</propertyFile> </configuration> <dependencies> <dependency> <groupId>org.liquibase.ext</groupId> <artifactId>liquibase-hibernate4</artifactId> <version>3.5</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> <version>4.1.7.RELEASE</version> </dependency> <dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-jpa</artifactId> <version>1.7.3.RELEASE</version> </dependency> <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> <version>9.4.1211</version> </dependency> </dependencies> </plugin> {code} liquibase.properties: {code} driver=org.postgresql.Driver url=jdbc:postgresql://localhost:6502/dbname username=username password=password changeLogFile=src/main/resources/db/liquibase-outputChangeLog.xml referenceUrl=hibernate:spring:com.foo.bar.entity? dialect=org.hibernate.dialect.PostgreSQL82Dialect {code}

    JIRA | 2 months ago | Josh Wand
    liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: java.lang.RuntimeException: Cannot find database driver: org.postgresql.Driver
  2. 0

    Error in using tag in command line when using liquibase

    Stack Overflow | 2 years ago | Ivan Wangsa
    liquibase.exception.DatabaseException: java.lang.NullPointerException
  3. 0

    Liquibase Hibernate Plugin Does Not Work

    Stack Overflow | 2 years ago | Jazzepi
    liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: java.lang.RuntimeException: Cannot find database driver: Driver class was not specified and could not be determined from the url (hibernate:spring:com.companyname.dirtylibs.persistence.entities?dialect=org.hibernate.dialec t.MySQL5Dialect)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Extension fails to load hibernate driver and breaks if I manually specify it

    GitHub | 2 years ago | Jazzepi
    liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: java.lang.RuntimeException: Cannot find database driver: Driver class was not specified and could not be determined from the url (hibernate:spring:com.companyname.dirtylibs.persistence.entities?dialect=org.hibernate.dialec t.MySQL5Dialect)
  6. 0

    Using Liquibase on Teradata 14. - Liquibase Forums

    liquibase.org | 1 year ago
    liquibase.exception.DatabaseException: com.teradata.jdbc.jdbc_4.util.JDBCEx ception: [Teradata Database] [TeraJDBC 14.00.00.41] [Error 3802] [SQLState 42S02 ] Database 'information_schema' does not exist.

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.RuntimeException

      Cannot find database driver: org.postgresql.Driver

      at liquibase.database.DatabaseFactory.openConnection()
    2. Liquibase Core
      Main.main
      1. liquibase.database.DatabaseFactory.openConnection(DatabaseFactory.java:199)
      2. liquibase.database.DatabaseFactory.openDatabase(DatabaseFactory.java:151)
      3. liquibase.integration.commandline.CommandLineUtils.createDatabaseObject(CommandLineUtils.java:85)
      4. liquibase.integration.commandline.Main.doMigration(Main.java:954)
      5. liquibase.integration.commandline.Main.run(Main.java:184)
      6. liquibase.integration.commandline.Main.main(Main.java:103)
      6 frames