Exception while getting string from conf file in Play 2 with Scala
<p>I am trying to get a file path from conf, this is my conf file:</p>

<p>uploadedFilePath.conf</p>

<pre><code>file.path="public/img/"
</code></pre>

<p>This is how I am getting path from conf file in my code:</p>

<pre><code>     val conf = ConfigFactory.load()
     var path : String = conf.getString("file.path")
</code></pre>

<p>I am getting exception on second line </p>

<blockquote>
  <p>09:58:11.527 108649 [application-akka.actor.default-dispatcher-10]
  PlayDefaultUpstreamHandler ERROR - Cannot invoke the action
  com.typesafe.config.ConfigException$WrongType: system properties: path
  has type OBJECT rather than STRING
          at com.typesafe.config.impl.SimpleConfig.findKeyOrNull(SimpleConfig.java:159)
  ~[com.typesafe.config-1.3.0.jar:na]
          at com.typesafe.config.impl.SimpleConfig.findOrNull(SimpleConfig.java:170)
  ~[com.typesafe.config-1.3.0.jar:na]
          at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:184)
  ~[com.typesafe.config-1.3.0.jar:na]
          at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:189)
  ~[com.typesafe.config-1.3.0.jar:na]
          at com.typesafe.config.impl.SimpleConfig.getString(SimpleConfig.java:246)
  ~[com.typesafe.config-1.3.0.jar:na]</p>
</blockquote>

<p>I am do not know what I am doing wrong.</p>