Hello
I am using liquibase to connect to Redshift to manipulate my DDL. I am using the following Pom dependencies:
- <dependency>
- <groupId>com.amazon.redshift</groupId>
- <artifactId>redshift-jdbc42</artifactId>
- <version>1.2.8.1005</version>
- </dependency>
- <dependency>
- <groupId>org.liquibase.ext</groupId>
- <artifactId>liquibase-redshift</artifactId>
- <version>1.0</version>
- </dependency>
- <dependency>
- <groupId>org.liquibase</groupId>
- <artifactId>liquibase-core</artifactId>
- </dependency>
and in my properties file, I reference the following driver:
- datasource.config.driver-class-name=com.amazon.redshift.jdbc42.Driver
In my local environment, my code works fine, but when I deploy the code and during runtime, I receive the following error:
- [org/springframework/boot/autoconfigure/liquibase/LiquibaseAutoConfiguration$LiquibaseConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: com/amazon/redshift/core/jdbc42/PGJDBC42DriverImpl
I am not sure what is calling this driver, but I verified that I am able to pick up the properties file in DEV, but it keeps calling a driver (PGJDBC42DriverImpl) that I am not specifying. I have explicitly called out the driver I want to use in my DEV properties file. (com.amazon.redshift.jdbc42.Driver)
I have found a few other solutions out there, but I am unable to resolve my problem. For example:
- using com.amazon.redshift.core.jdbc4.PGJDBC4DriverImpl, but I cannot find it in the jar RedshiftJDBC4-no-awssdk-1.2.8.1005.jar
That does not resolve my problem because now I get the known redshift "TAG" issue. I was able to resolve that with using com.amazon.redshift version 1.2.8.1005. By using the no awssdk jar, I revert myself to the insert into the changelog table issue.
Any help will be greatly appreciated!