title: Akka ConfigException$WrongType: myconf has type STRING rather than OBJECT
body: <p>I am trying to read external conf / property file in the Akka.
  And I am referring this <a href="http://doc.akka.io/docs/akka/2.4.7/general/configuration.html#configuration" rel="nofollow noreferrer">post</a></p>
  
  <p>I have only one configuration i need to add more properties  in myappConfiguration.properties. I can see properties files is able to load but not able to the read the configuration. </p>
  
  <p><strong>myappConfiguration.properties</strong> content is as follows. </p>
  
  <pre><code>myconf {
      directory : "D:\\Git\\Java_Test_WS\\file.reader\\"
  }
  </code></pre>
  
  <p>I am getting bellow exception, Exception is clearly telling some problem of types but i did not understand what I should write.</p>
  
  <pre><code>Exception in thread "main" com.typesafe.config.ConfigException$WrongType: myappConfiguration.properties: myconf has type STRING rather than OBJECT
      at com.typesafe.config.impl.SimpleConfig.findKeyOrNull(SimpleConfig.java:159)
      at com.typesafe.config.impl.SimpleConfig.findKey(SimpleConfig.java:145)
      at com.typesafe.config.impl.SimpleConfig.findOrNull(SimpleConfig.java:172)
      at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:184)
      at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:189)
      at com.typesafe.config.impl.SimpleConfig.getObject(SimpleConfig.java:258)
      at com.typesafe.config.impl.SimpleConfig.getConfig(SimpleConfig.java:264)
      at com.typesafe.config.impl.SimpleConfig.getConfig(SimpleConfig.java:37)
      at com.myapp.file.reader.AkkaBaseEventReader.main(AkkaBaseEventReader.java:27)
  </code></pre>
  
  <p>Below is the Java code where I am trying to read that configuration entry. and I am getting exception in line number 27 with code :</p>
  
  <pre><code>Config config = system.settings().config().getConfig("myconf.directory");
  </code></pre>
  
  <p>Complete Code:</p>
  
  <pre><code>public class AkkaBaseEventReader implements ApplicationConstant {
  
      public static void main(String[] args) throws IOException {
  
          System.setProperty("config.file","myappConfiguration.properties");
  
          ActorSystem system = ActorSystemImpl.create("FileReaderForassignment");
          final ActorRef reader = system.actorOf(EventScannerActor.props(),"FileReader");
  
          System.out.println(system.settings());
  
          Config config = system.settings().config().getConfig("myconf.directory");       
  
      }
  }
  </code></pre>
  
  <p>Below is my <strong>pom.xml</strong>  that will show what version of Akka I am using :</p>
  
  <pre><code>&lt;properties&gt;
          &lt;akka.version&gt;2.4.9&lt;/akka.version&gt;
          &lt;maven-dependency-plugin.version&gt;3.0.0&lt;/maven-dependency-plugin.version&gt;
          &lt;maven.compiler.plugin&gt;3.6.1&lt;/maven.compiler.plugin&gt;
          &lt;java.compiler.target&gt;1.8&lt;/java.compiler.target&gt;
          &lt;java.compiler.source&gt;1.8&lt;/java.compiler.source&gt;
      &lt;/properties&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.typesafe.akka&lt;/groupId&gt;
              &lt;artifactId&gt;akka-actor_2.11&lt;/artifactId&gt;
              &lt;version&gt;${akka.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.typesafe.akka&lt;/groupId&gt;
              &lt;artifactId&gt;akka-http-core_2.11&lt;/artifactId&gt;
              &lt;version&gt;${akka.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.typesafe.akka&lt;/groupId&gt;
              &lt;artifactId&gt;akka-http-experimental_2.11&lt;/artifactId&gt;
              &lt;version&gt;${akka.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.typesafe.akka&lt;/groupId&gt;
              &lt;artifactId&gt;akka-http-jackson-experimental_2.11&lt;/artifactId&gt;
              &lt;version&gt;${akka.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt;
              &lt;version&gt;${maven-dependency-plugin.version}&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;!-- This will download source so easy to see API and java doc. --&gt;
                  &lt;artifactId&gt;maven-source-plugin&lt;/artifactId&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;attach-sources&lt;/id&gt;
                          &lt;phase&gt;verify&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;jar&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
              &lt;!-- Java 8 compiler plugin --&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${maven.compiler.plugin}&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;${java.compiler.source}&lt;/source&gt;
                      &lt;target&gt;${java.compiler.target}&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Thanks in advance for any kind of help and information. </p>