title: How to read properties file using org.apache.commons.configuration2?
body: <p>I'm trying to read properties file using org.apache.commons.configuration2 and getting error below please let me know where I'm doing wrong I'm taking help with given link <a href="https://commons.apache.org/proper/commons-configuration/userguide/quick_start.html" rel="nofollow noreferrer">https://commons.apache.org/proper/commons-configuration/userguide/quick_start.html</a></p>
  
  <pre><code>File:- xyz.properties
  
  driver = "oracle.jdbc.driver.OracleDriver"
  url = "jdbc:oracle:thin:@xxxx:1521/xxxx.xxxx"
  username = "xxx"
  password = "xxx"
  input_file = "C:\\Users\\xxx\\test\\src\\main\\resources\\xxxx.xlsx"
  
  
  code:- File.scala
  
  import org.apache.commons.configuration2.builder.fluent.{Configurations}
  
  object Configuration {
  
  def main(args: Array[String]): Unit = {
  
      val config = new Configurations();
      val configs = config.properties(new File("xyz.properties"));
  
  
      val inputFile = configs.getString("input_file")
  
      val userName = configs.getString("username")
      val password = configs.getString("password")
      val driver = configs.getString("driver")
      val url = configs.getString("url")
  
  
      println("Inside config" + inputFile )       
  }
  }
  
  Error :-
  Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/beanutils/BeanIntrospector
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:264)
      at com.sun.proxy.$Proxy0.&lt;clinit&gt;(Unknown Source)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:739)
      at org.apache.commons.configuration2.builder.fluent.Parameters.createParametersProxy(Parameters.java:294)
      at org.apache.commons.configuration2.builder.fluent.Parameters.fileBased(Parameters.java:185)
      at org.apache.commons.configuration2.builder.fluent.Configurations.fileParams(Configurations.java:602)
      at org.apache.commons.configuration2.builder.fluent.Configurations.fileParams(Configurations.java:614)
      at org.apache.commons.configuration2.builder.fluent.Configurations.fileBasedBuilder(Configurations.java:132)
      at org.apache.commons.configuration2.builder.fluent.Configurations.propertiesBuilder(Configurations.java:238)
      at org.apache.commons.configuration2.builder.fluent.Configurations.properties(Configurations.java:282)
      at com.rxcorp.italy.config.Configuration$.&lt;init&gt;(File.scala:8)
      at com.rxcorp.italy.config.Configuration$.&lt;clinit&gt;(Configuration.scala)
      at com.rxcorp.paneldataloading.ItalyPanelData$.main(File.scala:19)
  </code></pre>
  
  <p><strong>sbt file</strong></p>
  
  <pre><code>name := "xxx.xxxx.xxxxx"
  
  scalaVersion := "2.10.6"
  
  ivyScala := ivyScala.value map{ _.copy(overrideScalaVersion = true) }
  
  
  libraryDependencies ++= Seq("org.apache.spark" %% "spark-core" % "2.1.0",
    "com.databricks" %% "spark-csv" % "1.5.0",
  "org.apache.commons" % "commons-configuration2" % "2.1.1"  )
  </code></pre>