title: Spark executor is throwing error "java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver"
body: <p>I am trying to import a table from my oracle database using spark and here I am using Scala to import the table.
  My jdbc driver is ojdbc7.jar and it's added in both the parameter spark.driver.extraClassPath and spark.executor.extraClassPath in configuration file </p>
  
  <p><code>spark.driver.extraClassPath      :/usr/lib/hadoop-lzo/lib/*:/usr/lib/hadoop/hadoop-aws.jar:/usr/share/aws/aws-java-sdk/*:/usr/share/aws/emr/emrfs/conf:/usr/s
  hare/aws/emr/emrfs/lib/*:/usr/share/aws/emr/emrfs/auxlib/*:/usr/share/aws/emr/security/conf:/usr/share/aws/emr/security/lib/*:/home/hadoop/ojdbc7.jar
  spark.driver.extraLibraryPath    /usr/lib/hadoop/lib/native:/usr/lib/hadoop-lzo/lib/native
  spark.executor.extraClassPath    :/usr/lib/hadoop-lzo/lib/*:/usr/lib/hadoop/hadoop-aws.jar:/usr/share/aws/aws-java-sdk/*:/usr/share/aws/emr/emrfs/conf:/usr/s
  hare/aws/emr/emrfs/lib/*:/usr/share/aws/emr/emrfs/auxlib/*:/usr/share/aws/emr/security/conf:/usr/share/aws/emr/security/lib/*:/home/hadoop/ojdbc7.jar
  spark.executor.extraLibraryPath  /usr/lib/hadoop/lib/native:/usr/lib/hadoop-lzo/lib/native
  </code></p>
  
  <p>I can successfully import the table. I can print the schema of the table. But while performing any operations like Count,show() it throws below error </p>
  
  <p>`</p>
  
  <blockquote>
    <p>Caused by: java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver 
    at java.lang.ClassLoader.findClass(ClassLoader.java:530)   at
    org.apache.spark.util.ParentClassLoader.findClass(ParentClassLoader.scala:26)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)   at
    org.apache.spark.util.ParentClassLoader.loadClass(ParentClassLoader.scala:34)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)   at
    org.apache.spark.util.ParentClassLoader.loadClass(ParentClassLoader.scala:30)
    at
    org.apache.spark.repl.ExecutorClassLoader.findClass(ExecutorClassLoader.scala:77)
    ... 21 more</p>
  </blockquote>
  
  <p>`</p>