Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Including plugin breaks the redshift driver #24

Open
alvaroc1 opened this issue Apr 10, 2018 · 0 comments
Open

Including plugin breaks the redshift driver #24

alvaroc1 opened this issue Apr 10, 2018 · 0 comments

Comments

@alvaroc1
Copy link

alvaroc1 commented Apr 10, 2018

When I include it like this:

resolvers += Resolver.bintrayIvyRepo("kamon-io", "sbt-plugins")
addSbtPlugin("io.kamon" % "sbt-aspectj-runner-play-2.6" % "1.1.0")

I get an error on startup when play tries to start up a connection to redshift using these settings:

db {
  ...
  reporting {
    driver = "com.amazon.redshift.jdbc42.Driver"
    url = "jdbc:redshift://....redshift.amazonaws.com:5439/dbname"
    username = "..."
    password = "..."
  }
}

Driver jar: https://s3.amazonaws.com/redshift-downloads/drivers/jdbc/1.2.12.1017/RedshiftJDBC42-1.2.12.1017.jar

play.api.Configuration$$anon$1: Configuration error[Cannot connect to database [reporting]]
	at play.api.Configuration$.configError(Configuration.scala:156)
	at play.api.Configuration.reportError(Configuration.scala:990)
	at play.api.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:48)
	at play.api.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:42)
...
Caused by: java.lang.NullPointerException: null
	at java.io.File.<init>(File.java:277)
	at com.amazon.redshift.common.PGClassLoaderSingleton.validateTempDir(Unknown Source)
	at com.amazon.redshift.jdbc.Driver.getInstance(Unknown Source)
	at com.amazon.redshift.jdbc.Driver.acceptsURL(Unknown Source)
	at com.zaxxer.hikari.util.DriverDataSource.<init>(DriverDataSource.java:105)
	at com.zaxxer.hikari.pool.PoolBase.initializeDataSource(PoolBase.java:342)
	at com.zaxxer.hikari.pool.PoolBase.<init>(PoolBase.java:117)
	at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:107)
	at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:82)
	at play.api.db.HikariCPConnectionPool$$anonfun$1.apply(HikariCPModule.scala:51)
	at play.api.db.HikariCPConnectionPool$$anonfun$1.apply(HikariCPModule.scala:47)
	at scala.util.Try$.apply(Try.scala:192)
	at play.api.db.HikariCPConnectionPool.create(HikariCPModule.scala:47)
	at play.api.db.PooledDatabase.createDataSource(Databases.scala:199)
	at play.api.db.DefaultDatabase.dataSource$lzycompute(Databases.scala:123)
	at play.api.db.DefaultDatabase.dataSource(Databases.scala:121)
	at play.api.db.DefaultDatabase.getConnection(Databases.scala:142)
	at play.api.db.DefaultDatabase.getConnection(Databases.scala:138)
	at play.api.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:44)
	at play.api.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:42)
	at scala.collection.immutable.List.foreach(List.scala:392)
	at play.api.db.DefaultDBApi.connect(DefaultDBApi.scala:42)
	at play.api.db.DBApiProvider.get$lzycompute(DBModule.scala:86)
	at play.api.db.DBApiProvider.get(DBModule.scala:75)
	at play.api.db.DBApiProvider.get(DBModule.scala:56)
	at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
	at com.google.inject.internal.BoundProviderFactory.provision(BoundProviderFactory.java:72)
	at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)
	at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:62)
	at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:54)

The error disappears if I remove the sbt plugin.

@alvaroc1 alvaroc1 changed the title It apears to break the redshift driver It appears to break the redshift driver Apr 10, 2018
@alvaroc1 alvaroc1 changed the title It appears to break the redshift driver Including plugin break the redshift driver Apr 10, 2018
@alvaroc1 alvaroc1 changed the title Including plugin break the redshift driver Including plugin breaks the redshift driver Apr 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant