Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

Code referencing com/amazon/redshift/core/jdbc42/PGJDBC42DriverImpl at runtime

$
0
0
Hello

I am using liquibase to connect to Redshift to manipulate my DDL. I am using the following Pom dependencies:

  1.     <dependency>
  2.         <groupId>com.amazon.redshift</groupId>
  3.         <artifactId>redshift-jdbc42</artifactId>
  4.         <version>1.2.8.1005</version>
  5.     </dependency>
  6.     <dependency>
  7.         <groupId>org.liquibase.ext</groupId>
  8.         <artifactId>liquibase-redshift</artifactId>
  9.         <version>1.0</version>
  10.     </dependency>
  11.     <dependency>
  12.         <groupId>org.liquibase</groupId>
  13.         <artifactId>liquibase-core</artifactId>
  14.     </dependency>

and in my properties file, I reference the following driver:

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

  1. [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:
  1.  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!

Viewing all articles
Browse latest Browse all 2993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>