edulify / play-hikaricp.edulify.com Goto Github PK
View Code? Open in Web Editor NEWHikariCP Plugin for Playframework 2.2.x and 2.3.x
Home Page: http://edulify.github.io/play-hikaricp.edulify.com/
License: Apache License 2.0
HikariCP Plugin for Playframework 2.2.x and 2.3.x
Home Page: http://edulify.github.io/play-hikaricp.edulify.com/
License: Apache License 2.0
hi. your repository at
http://edulify.github.io/modules/releases/
is currently 404'ing. if its down permanently, is there some place else to download jars from?
We use play-hikaricp plugin to pool database connection with Vertica. Vertica supports automatic switchover to one of the nodes in the cluster if the primary node goes down through the jdbc property BackupServerNode. However, play-hikaricp plugin doesn't seem to honour the custom connection property and hence we are not able to fallback to a different node in the cluster if the node mentioned in db.default.url property goes down. Is there a way to make this property work with HikariCP? We have verified that if we actually create a java.util.Properties and use that to create a JDBC Connection using HikariCP, it works.
db.default.url="jdbc://postgresql://IP-Address:Port/DBName"
db.default.BackupServerNode="node2-domain,node3-domain"
Hello,
I found that some DB properties are not retrieved with the right key in PlayConfig mode.
In play-hikari
properties.setPropertyFromConfig("autoCommit", "defaultAutoCommit", "true")
properties.setPropertyFromConfig("transactionIsolation", "defaultTransactionIsolation")
properties.setPropertyFromConfig("readOnly", "defaultReadOnly", "false")
conf.getBoolean("autocommit")
conf.getString("isolation")
conf.getBoolean("readOnly")
In addition, some default properties doesn't match with the Hikaricp or Play default values.
For example :
Property | Play default | Hikaricp default | Play-Hikaricp default |
---|---|---|---|
maximumPoolSize |
2*5 = 10 | 10 | 1*30 = 30 |
minimumIdle |
2*5 = 10 | 10 | 1*5 = 5 |
If it's an intended optimization, it should be explained in the Readme.
Hi,
Is there an issue with the hosting of your packages ?
Can't download it.
[info] Resolving com.edulify#play-hikaricp_2.11;2.0.1 ...
[warn] module not found: com.edulify#play-hikaricp_2.11;2.0.1
[warn] ==== typesafe-ivy-releases: tried
[warn] https://repo.typesafe.com/typesafe/ivy-releases/com.edulify/play-hikaricp_2.11/2.0.1/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn] https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.edulify/play-hikaricp_2.11/2.0.1/ivys/ivy.xml
[warn] ==== local: tried
[warn] /Users/nicolas/.ivy2/local/com.edulify/play-hikaricp_2.11/2.0.1/ivys/ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com/edulify/play-hikaricp_2.11/2.0.1/play-hikaricp_2.11-2.0.1.pom
[warn] ==== local: tried
[warn] /Users/nicolas/.ivy2/local/com.edulify/play-hikaricp_2.11/2.0.1/ivys/ivy.xml
[warn] ==== Maven2 Local: tried
[warn] file:/Users/nicolas/.m2/repository/com/edulify/play-hikaricp_2.11/2.0.1/play-hikaricp_2.11-2.0.1.pom
[warn] ==== typesafe-releases: tried
[warn] https://repo.typesafe.com/typesafe/releases/com/edulify/play-hikaricp_2.11/2.0.1/play-hikaricp_2.11-2.0.1.pom
[warn] ==== typesafe-snapshots: tried
[warn] https://repo.typesafe.com/typesafe/snapshots/com/edulify/play-hikaricp_2.11/2.0.1/play-hikaricp_2.11-2.0.1.pom
[warn] ==== sonatype-releases: tried
[warn] https://oss.sonatype.org/content/repositories/releases/com/edulify/play-hikaricp_2.11/2.0.1/play-hikaricp_2.11-2.0.1.pom
[warn] ==== sonatype-snapshots: tried
[warn] https://oss.sonatype.org/content/repositories/snapshots/com/edulify/play-hikaricp_2.11/2.0.1/play-hikaricp_2.11-2.0.1.pom
[warn] ==== Edulify Repository: tried
[warn] http://edulify.github.io/modules/releases/com/edulify/play-hikaricp_2.11/2.0.1/play-hikaricp_2.11-2.0.1.pom
Best
Nicolas
Hi,
I want to use version 2.0.2 with JAVA 7,
what should I do?
Thanks
Dean
Hi There, thanks for the project!
The initializationFailFast = false
semantics are not what I expected. I was hoping to be able to start the application even if a configured db is unavailable (a data warehouse we're connecting to sometimes goes down for maintenance).
We could extend your plugin and probably figure out how to do that, but before we do, was wondering if you had any plans for adding this, or pointers for us?
Thanks!
Richard
In the README it says "Note, it can be made to work with Play 2.2.x of the PlayFramework, but it requires changing the dependencies as the current build relies on the Play 2.3.x plugin."
It is not very clear regarding what to do. Can I use 1.5.0 hikari play plugin with Play 2.2.x? If yes, what dependencies do I need to change and where and how??
When I try to use 1.5.0 with 2.2.x, I get this on play start
:
java.lang.NoSuchMethodException: play.core.server.NettyServer.mainDevHttpMode(play.core.SBTLink, play.core.SBTDocHandler, int)
at java.lang.Class.getMethod(Class.java:1665)
at play.PlayRun$$anonfun$playRunTask$1$$anonfun$apply$1.apply(PlayRun.scala:232)
at play.PlayRun$$anonfun$playRunTask$1$$anonfun$apply$1.apply(PlayRun.scala:91)
at scala.Function7$$anonfun$tupled$1.apply(Function7.scala:35)
at scala.Function7$$anonfun$tupled$1.apply(Function7.scala:34)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
[trace] Stack trace suppressed: run last main/compile:run for the full output.
[error] (main/compile:run) java.lang.NoSuchMethodException: play.core.server.NettyServer.mainDevHttpMode(play.core.SBTLink, play.core.SBTDocHandler, int)
[error] Total time: 14 s, completed Sep 26, 2014 3:18:19 PM
I think that's quite confusing.
"com.edulify" %% "play-hirakicp" % "1.3.0"
Hey, would it be possible to set the HikariCP pool name to the name of the DataSource as it appears in the play config? I've submitted a pull request that implements this behaviour.
Following the provided instructions produces this error under Java 7. I see that the Hikari team has provided some mechanism to work around this issue
However, for those not that much versed in Maven or sbt, could you provide some guidance as to how to workaround in the plugin?
We need to support a way to use environment variables to configure database properties (like url
, user
, password
). That is necessary to deploy to heroku and other similar cloud services.
References:
In HikariCPConfig the maxPoolSize is incorrect. Should it not be the following in line 82:
val maxConnectionsPerPartition = config.getInt("maxPoolSize").get
The same goes for the minPoolSize in line 88.
Hi!
I was just wondering why you are not using git tags for tagging each new version? It would make it much more easier for developers/contributers to dig in the source code if we could e.g. see a diff between the differents tagged versions.
Right now you just have a master branch which means we have to go through the whole commit history to find out what exactly changed between versions.
Greetings,
Matthias
acquireRetryDelay
minimumPoolSize
The latest release is 1.3.8, and HikariCP 1.3.7 included a critical reliability fix when using the JDBC4 isValid()
method for checking connection-aliveness (the default).
And thanks for creating this plugin!
Hi,
I have a question about the use of play.utils.ProxyDriver class when register the driver and not the Driver class directly ??
It think the password printed in line 47 of HikariCPConfig should be masked. Maybe just print the first letter, so one can check that it is using the correct value.
I just upgraded from 1.4.1 to 1.5.2 and now have "[info] HikariPool - HikariCP pool HikariPool-114 is shutting down." in logs despite having "logger.com.zaxxer.hikari=ERROR" in my application.conf.
This message adds alot of noise to the test results. I apologize if this is a silly question but how can I turn off all HikariPool message in this new version so unit tests go back to ERROR only.
✗ activator test
[info] The Collections utility should
[info] + return the previous element in the collection
[info]
[info] Total for specification CollectionsSpec
[info] Finished in 2 ms
[info] 1 example, 0 failure, 0 error
[info] HikariPool - HikariCP pool HikariPool-26 is shutting down.
[info] HikariPool - HikariCP pool HikariPool-27 is shutting down.
[info] HikariPool - HikariCP pool HikariPool-28 is shutting down.
[info] HikariPool - HikariCP pool HikariPool-29 is shutting down.
[info] HikariPool - HikariCP pool HikariPool-30 is shutting down.
[info] HikariPool - HikariCP pool HikariPool-31 is shutting down.
...
...
...
Hi,
After I added
resolvers += Resolver.url("Edulify Repository", url("http://edulify.github.io/modules/releases/"))(Resolver.ivyStylePatterns)
to the build.sbt, the module still cannot be resolved.
The scala version is set to 2.11.5:
scalaVersion := "2.11.5"
Am I wrong?
Best Regards,
Wei Zheng
There is an error in the idleTimeout
method, the config.getMilliseconds("idleMaxAge")
is mistakenly multiplied by 1000.
// Good: only the previous maxLife is multiplied by 1000
private def maxLifetime(config: Configuration) = {
var maxLife = config.getLong("maxConnectionAgeInMinutes").getOrElse(30L)
maxLife = config.getLong("maxConnectionAgeInSeconds").getOrElse(maxLife * 60)
maxLife = config.getMilliseconds("maxConnectionAge").getOrElse(maxLife * 1000)
maxLife.toString
}
// Invalid! The idleMaxAge config itself is multiplied by 1000
private def idleTimeout(config: Configuration) = {
var idleMaxAge = config.getLong("idleMaxAgeInMinutes").getOrElse(10L)
idleMaxAge = config.getLong("idleMaxAgeInSeconds").getOrElse(idleMaxAge) * 60
idleMaxAge = config.getMilliseconds("idleMaxAge").getOrElse(idleMaxAge) * 1000
idleMaxAge.toString
}
I wonder if there is some way of supporting the latest HIkariCP version with play 2.2.x?
com.edulify#play-hirakicp_2.10;1.0.0: not found
Having evolution file with:
SELECT 1;
SELECT 2...30;
SELECT 31;
And running with:
JAVA_OPTS="-DapplyEvolutions.default=true" sbt "start 9000"
Gives error:
java.lang.ArrayIndexOutOfBoundsException: 32
at com.zaxxer.hikari.util.FastList.get(FastList.java:82)
at com.zaxxer.hikari.proxy.ConnectionProxy.close(ConnectionProxy.java:295)
at play.api.db.evolutions.Evolutions$.applyScript(Evolutions.scala:293)
at play.api.db.evolutions.EvolutionsPlugin$$anonfun$onStart$1$$anonfun$apply$1.apply$mcV$sp(Evolutions.scala:496)
at play.api.db.evolutions.EvolutionsPlugin.withLock(Evolutions.scala:531)
at play.api.db.evolutions.EvolutionsPlugin$$anonfun$onStart$1.apply(Evolutions.scala:485)
at play.api.db.evolutions.EvolutionsPlugin$$anonfun$onStart$1.apply(Evolutions.scala:483)
at scala.collection.immutable.List.foreach(List.scala:318)
at play.api.db.evolutions.EvolutionsPlugin.onStart(Evolutions.scala:483)
at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:91)
at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:91)
at scala.collection.immutable.List.foreach(List.scala:318)
at play.api.Play$$anonfun$start$1.apply$mcV$sp(Play.scala:91)
at play.api.Play$$anonfun$start$1.apply(Play.scala:91)
at play.api.Play$$anonfun$start$1.apply(Play.scala:91)
at play.utils.Threads$.withContextClassLoader(Threads.scala:21)
at play.api.Play$.start(Play.scala:90)
at play.core.StaticApplication.(ApplicationProvider.scala:55)
at play.core.server.NettyServer$.createServer(NettyServer.scala:244)
at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:280)
at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:275)
at scala.Option.map(Option.scala:145)
at play.core.server.NettyServer$.main(NettyServer.scala:275)
at play.core.server.NettyServer.main(NettyServer.scala)
This has been fixed with HikariCP 2.0.1 (brettwooldridge/HikariCP#107 - brettwooldridge/HikariCP@19eaea9) and normally I would just use newer version of package, but for Hikari 2.x you need to use package HikariCP-java6 if support for JRE 7.0 is needed. HikariCP is only for JRE 8.0
Is there a way to define the hikariCp "metricRegistry" configuration with this plugin ?
And if so, which is the prefered way ?
Hi,
Are you planning on distributing the plugin via a public Maven repo?
Thanks,
Steve
I've been using this in a Play 2.3.10 application and I noticed that the pools were being initialised twice - using twice as many connections as I anticipated. I've not really been able to figure out why, but removing the 200:com.edulify.play.hikaricp.HikariCPPlugin
entry from the play.plugins file seems to have stopped the duplication and resolved my problem but it seems contrary to the instructions. Have you any ideas about what might be going on?
Thanks
Alan
I am using Play 2.2.x, Scala 2.10.4 and play-hikaricp 1.0.0 (on 1.0.0 since that is what you I should use with Play 2.2 and I am not in a position to upgrade play now) and I am including config files using db.foo.hikaricp.file
(my database is not under default but under foo)
When I do play run
, it works fine. If I do play start
, I get this stacktrace:
Play server process ID is 78193
2014-09-26 14:46:30,869 [main] [info] application - Starting HikariCP connection pool...
2014-09-26 14:46:33,825 [main] [info] application - Loading Hikari configuration from Play configuration.
2014-09-26 14:46:33,846 [main] [info] application - Loading from file configured by db.default.hikaricp.file that is Some(conf/db/merlin/TickerLife/nydev.properties)
2014-09-26 14:46:33,847 [main] [info] application - Loading Hikari configuration from conf/db/merlin/TickerLife/nydev.properties
2014-09-26 14:46:33,878 [main] [info] application - Properties: {dataSource.password=**secret stuff**, dataSource.user=**not putting here****, dataSource.url=jdbc:sqlserver:/localhost:1433, dataSourceClassName=com.microsoft.sqlserver.jdbc.SQLServerDataSource}
2014-09-26 14:46:36,905 [main] [info] application - Loading Hikari configuration from Play configuration.
Oops, cannot start the server.
java.util.NoSuchElementException: None.get
at scala.None$.get(Option.scala:313)
at scala.None$.get(Option.scala:311)
at com.edulify.play.hikaricp.HikariCPConfig.mapFromPlayConfiguration(HikariCPConfig.scala:63)
at com.edulify.play.hikaricp.HikariCPConfig.getHikariConfig(HikariCPConfig.scala:31)
at com.edulify.play.hikaricp.HirakiCPDBApi$$anonfun$1.apply(HirakiCPDBApi.scala:34)
at com.edulify.play.hikaricp.HirakiCPDBApi$$anonfun$1.apply(HirakiCPDBApi.scala:32)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.immutable.Set$Set3.foreach(Set.scala:115)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
at scala.collection.AbstractSet.scala$collection$SetLike$$super$map(Set.scala:47)
at scala.collection.SetLike$class.map(SetLike.scala:93)
at scala.collection.AbstractSet.map(Set.scala:47)
at com.edulify.play.hikaricp.HirakiCPDBApi.<init>(HirakiCPDBApi.scala:32)
at com.edulify.play.hikaricp.HikariCPPlugin.hirakiCPDBApi$lzycompute(HikariCPPlugin.scala:31)
at com.edulify.play.hikaricp.HikariCPPlugin.hirakiCPDBApi(HikariCPPlugin.scala:31)
at com.edulify.play.hikaricp.HikariCPPlugin.onStart(HikariCPPlugin.scala:37)
at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:88)
at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:88)
at scala.collection.immutable.List.foreach(List.scala:318)
at play.api.Play$$anonfun$start$1.apply$mcV$sp(Play.scala:88)
at play.api.Play$$anonfun$start$1.apply(Play.scala:88)
at play.api.Play$$anonfun$start$1.apply(Play.scala:88)
at play.utils.Threads$.withContextClassLoader(Threads.scala:18)
at play.api.Play$.start(Play.scala:87)
at play.core.StaticApplication.<init>(ApplicationProvider.scala:52)
at play.core.server.NettyServer$.createServer(NettyServer.scala:243)
at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:279)
at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:274)
at scala.Option.map(Option.scala:145)
at play.core.server.NettyServer$.main(NettyServer.scala:274)
at play.core.server.NettyServer.main(NettyServer.scala)
Looks like it is still looking for configs in the .conf files. (To be clear, I have 2 databases under db.foo1 and db.foo2).
I'd like to use Hickaricp with Slick in play 2.3.3. I've configured the app regarding the instruction:
Step1
"com.edulify" %% "play-hikaricp" % "1.5.0",
"com.typesafe.play" %% "play-slick" % "0.8.0" exclude("com.jolbox","bonecp"),
"mysql" % "mysql-connector-java" % "5.1.32",
Step 2: Disable default dbplugin
Step3:
200:com.edulify.play.hikaricp.HikariCPPlugin
1500:com.typesafe.plugin.CommonsMailerPlugin
Step4:
db.default.hikaricp.file="conf/hikaricp.properties"
dbplugin=disabled
# Slick Evolutions
# ~~~~~
slick.default="models.*"
with hikaricp.properties:
dataSourceClassName=com.mysql.jdbc.jdbc2.optional.MysqlDataSource
dataSource.user=logex
dataSource.url=jdbc:mysql://localhost:3306/logex
dataSource.password=
#maxLifetime=900000
#idleTimeout=300000
#maximumPoolSize=20
#minimumIdle=5
However, when I'm running the app I get the following error:
Configuration error: Configuration error[Slick error : jdbc driver not defined in application.conf for db.default.driver key
I have to specify in application.conf following to make app working:
db.default.driver=com.mysql.jdbc.Driver
db.default.url="jdbc:mysql://localhost:3306/logex"
But it seem that Slick is not using Hikaricp and use old BoneCP with play. I'm wondering how would be a proper way to customize slick with hikaricp?
When accessing the datasource through JNDI (for example using JPA), logSql
seems to be ignored and no logging happens. Apparently, the datasource that is bound to JNDI is always the one without logging:
https://github.com/edulify/play-hikaricp.edulify.com/blob/master/app/com/edulify/play/hikaricp/HikariCPDBApi.scala#L53
Config translation was removed at ffcbc78. However I think it causes duplicated configuration if we use play-hikaricp with other plugins such as flyway-play because they expect default Play2 configuration.
# for play-hikaricp
dbplugin=disabled
db.default.driverClassName=com.mysql.jdbc.Driver
db.default.jdbcUrl="jdbc:mysql://localhost:3306/test"
db.default.username=root
db.default.password=""
# for flyway-play
db.default.driver=com.mysql.jdbc.Driver
db.default.url="jdbc:mysql://localhost:3306/test"
db.default.user=root
Therefore I think it's useful to provide translation for basic JDBC connection settings.
Hi, I am using Play 2.3.2 and scala 2.11.1 and HikariCP version 1.4.1.
conf/application.conf:
dbplugin=disabled
db {
default {
driverClassName=com.mysql.jdbc.Driver
jdbcUrl="jdbc:mysql://localhost/geppetto_admin"
username=root
password="root"
}
}
Error:
play.api.UnexpectedException: Unexpected exception[NoSuchElementException: None.get]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(ApplicationProvider.scala:151) ~[play_2.11-2.3.2.jar:2.3.2]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(ApplicationProvider.scala:115) ~[play_2.11-2.3.2.jar:2.3.2]
at scala.Option.map(Option.scala:145) ~[scala-library-2.11.2.jar:na]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1.apply(ApplicationProvider.scala:115) ~[play_2.11-2.3.2.jar:2.3.2]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1.apply(ApplicationProvider.scala:113) ~[play_2.11-2.3.2.jar:2.3.2]
Caused by: java.util.NoSuchElementException: None.get
at scala.None$.get(Option.scala:322) ~[scala-library-2.11.2.jar:na]
at scala.None$.get(Option.scala:320) ~[scala-library-2.11.2.jar:na]
at com.edulify.play.hikaricp.HikariCPConfig.mapFromPlayConfiguration(HikariCPConfig.scala:68) ~[play-hikaricp_2.11-1.4.1.jar:1.4.1]
at com.edulify.play.hikaricp.HikariCPConfig.getHikariConfig(HikariCPConfig.scala:35) ~[play-hikaricp_2.11-1.4.1.jar:1.4.1]
at com.edulify.play.hikaricp.HirakiCPDBApi$$anonfun$1.apply(HirakiCPDBApi.scala:34) ~[play-hikaricp_2.11-1.4.1.jar:1.4.1]
Is there a config key I can add to my conf file which would disable this particular play plugin?
I know you added hikari.enabled
in 1.5.0 (5795f68), but what about older versions (since I am on play 2.2.x).
it would be great if the website could be synch'd to the project page properties documentation. Misconfiguration is leading to issues being opened against HikariCP or asked in the Google group.
I'm using Play framework 2.3.5 and I've followed your instruction to set up this plugin but my application continuously show me this error.
[info] Updating {file:/Users/xxxxxxxx/workspace/dottegi_api/}root...
[info] Resolving com.edulify#play-hikaricp_2.11;1.5.0 ...
[warn] module not found: com.edulify#play-hikaricp_2.11;1.5.0
[warn] ==== local: tried
[warn] /Users/xxxxxxxx/.ivy2/local/com.edulify/play-hikaricp_2.11/1.5.0/ivys/ivy.xml
[warn] ==== activator-local: tried
[warn] file:/Users/xxxxxxxx/workspace/activator/repository/com.edulify/play-hikaricp_2.11/1.5.0/ivys/ivy.xml
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/com/edulify/play-hikaricp_2.11/1.5.0/play-hikaricp_2.11-1.5.0.pom
[warn] ==== typesafe-releases: tried
[warn] http://repo.typesafe.com/typesafe/releases/com/edulify/play-hikaricp_2.11/1.5.0/play-hikaricp_2.11-1.5.0.pom
[warn] ==== typesafe-ivy-releasez: tried
[warn] http://repo.typesafe.com/typesafe/ivy-releases/com.edulify/play-hikaricp_2.11/1.5.0/ivys/ivy.xml
[warn] ==== Typesafe Releases Repository: tried
[warn] http://repo.typesafe.com/typesafe/releases/com/edulify/play-hikaricp_2.11/1.5.0/play-hikaricp_2.11-1.5.0.pom
[info] Resolving jline#jline;2.11 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.edulify#play-hikaricp_2.11;1.5.0: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[trace] Stack trace suppressed: run last *:update for the full output.
error sbt.ResolveException: unresolved dependency: com.edulify#play-hikaricp_2.11;1.5.0: not found
The other settings are as follows.
plugins.sbt>
// Comment to get more information during initialization
logLevel := Level.Warn
resolvers += Resolver.url("Edulify Repository", url("http://edulify.github.io/modules/releases/"))(Resolver.ivyStylePatterns)
// The Typesafe repository
resolvers ++= Seq(
"Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/",
Resolver.url("jets3t", url("http://www.jets3t.org/maven2"))(Resolver.ivyStylePatterns)
)
// Use the Play sbt plugin for Play projects
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.3.5")
build.sbt>
scalaVersion := "2.11.1"
incOptions := incOptions.value.withNameHashing(true)
libraryDependencies ++= Seq(
....
"org.apache.httpcomponents" % "httpmime" % "4.3.5",
"com.edulify" % "play-hikaricp" % "1.5.0",
javaCore,
javaJdbc,
cache,
javaWs
)
play.plugins>
200:com.edulify.play.hikaricp.HikariCPPlugin
1500:com.unionpool.api.plugins.S3Plugin
1500:com.typesafe.plugin.CommonsMailerPlugin
Something wrong with my configurations?
Why the framework doesn't try to find the plugin in your repository?
I had a problem loading the configuration file of Hikari. This only happens when I set up with Shell, not the play console.
The configuration suggest adding in the application.conf
db.default.hikaricp.file = "conf/hikaricp.prod.properties"
Which is fine, but via shell I get an error stating:
[Loading from file configured by db.default.hikaricp.file That Is Some ("conf/hikaricp.prod.properties")]
If you strip the quotes to the configuration file, then it works fine for command line and Shell.
=> db.default.hikaricp.file = conf/hikaricp.prod.properties
I'm looking a way to specify the connection using JNDI so it can be used in my persistance.xml
<non-jta-data-source>DefaultDS</non-jta-data-source>
I tried Googling for sometime now but couldn't find a good reference.
I just want to know is there any straight forward way of doing this
Thanks.
When HikariCP is configured through play application.conf
, a warning is always displayed in the console.
[warn] c.z.h.HikariConfig - The jdbcConnectionTest property is now deprecated, see the
documentation for connectionTestQuery
This warning is triggered when the jdbc4ConnectionTest
property is setted
It's not possible to remove this warning by tweaking play configuration, due to this line which always set this property.
I am trying to to debug my communication link failure problem. I am not seeing any hikari related log on the application.log and I already set the logger.root = TRACE. I assume the hikari is just not enabled. What is the best way to enable hikari on the log file?
Hi,
http://edulify.github.io/modules/releases/ delivers a 404 error.
Is it normal?
How can I add the CP plugin as dependency?
Yann
... and I can't switch to 2.0.x as the application must run with JRE7
I am using Play 2.2.2 version and I followed the instruction details as specified in Readme.
My scala version being 2.10, still I got the following error.
com.edulify#play-hirakicp_2.10;1.0.0: not found
Also got anoother error which is
com.edulify.play.hikaricp.HikariCPConfig.maxPoolSize(HikariCPConfig.scala:81)
<pre><span class="line"> </span><span class="code"> com.edulify.play.hikaricp.HikariCPConfig.mapFromPlayConfiguration(HikariCPConfig.scala:65)</span></pre>
<pre><span class="line"> </span><span class="code"> com.edulify.play.hikaricp.HikariCPConfig.getHikariConfig(HikariCPConfig.scala:31)</span></pre>
<pre><span class="line"> </span><span class="code"> com.edulify.play.hikaricp.HirakiCPDBApi$$anonfun$1.apply(HirakiCPDBApi.scala:34)</span></pre>
<pre><span class="line"> </span><span class="code"> com.edulify.play.hikaricp.HirakiCPDBApi$$anonfun$1.apply(HirakiCPDBApi.scala:32)</span></pre>
Any help appreciated.
I'm trying out this plugin and noticed that the preferred way to use it is to reference a properties file in the app's .conf file. In our particular application, we have references to many databases (over 16). I feel that defining a property file for each database is a bit messy and will lead to many files. Ideally, I'd like to have the configuration for our databases all defined in one file (production.conf) using the HOCON syntax.
I could use the Play way of defining the config, but the issue is that I'm limited to what Play defines. Why be constrained to what Play defines? Would it be possible to allow using the actual Hikari properties, and just pass them to the HikariConfig
object as is (could be done by getting the property names of the hikari's hocon subtree dynamically).
e.g.
db.default.hikaricp {
dataSourceClassName="org.postgresql.ds.PGSimpleDataSource"
dataSource.user=test
dataSource.password=secret
dataSource.databaseName=mydb
dataSource.serverName=localhost
}
I recently submitted this pull request:
#60
I made this change hoping that I would be able to use it, but there hasn't been a release since. Can you please make a release?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.