edulify / play-hikaricp.edulify.com

HikariCP Plugin for Playframework 2.2.x and 2.3.x
http://edulify.github.io/play-hikaricp.edulify.com/
Apache License 2.0
82 stars 35 forks source link

[Play framwork] Cannot loading Configuration from application.conf #76

Open nitinmlvya opened 8 years ago

nitinmlvya commented 8 years ago

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]