title: spark importing data from oracle - java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
body: <p>While trying to read data from oracle database using spark on AWS EMR,
  I am getting this error message:</p>
  
  <blockquote>
    <p>java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver.</p>
  </blockquote>
  
  <p>Can someone let me know if anyone faced this issue and how they resolved it?</p>
  
  <pre><code>pyspark --driver-class-path /home/hadoop/ojdbc7.jar --jars   /home/hadoop/ojdbc7.jar
  
  from pyspark import SparkContext, HiveContext, SparkConf
  
  from pyspark.sql import SQLContext
  
  sqlContext = SQLContext(sc)
  
  df = sqlContext.read.format("jdbc").options(url="jdbc:oracle:thin:user/pass@//10.200.100.142:1521/BMD", driver = "oracle.jdbc.driver.OracleDriver", 
  dbtable="S_0COORDER_TEXT_D").load()
  </code></pre>