title: How to specify Trust store and trust store type for Spark JDBC connection
body: <p>I am new to Spark and we are currently using the spark-java to create orc files from Oracle database. I was able to configure the connection with </p>
  
  <pre><code>sqlContext.read().jdbc(url,table,props)
  </code></pre>
  
  <p>However, I couldn't find any way in the properties to specify the trustStore or trustStoreType. Can someone help me about how to specify these properties?</p>
  
  <p>I already tried populating the properties as</p>
  
  <pre><code> props.put("trustStore", "&lt;PATH_TO_SSO&gt;");
   props.put("trustStoreType", "sso");
  </code></pre>
  
  <p>But it didn't work for me</p>
  
  <p>Update1:
  I have tried what user8371915 has suggested and also placed the sso file in both my executor nodes. I am still getting the following exception (abridged version)</p>
  
  <pre><code>oracle.net.ns.NetException: The Network Adapter could not establish the connection
      at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:470)
      at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:506)
      at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:595)
      at oracle.net.ns.NSProtocol.connect(NSProtocol.java:230)
      at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1452)
      at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:496)
      ... 23 more
  Caused by: oracle.net.ns.NetException: Unable to initialize ssl context.
      at oracle.net.nt.CustomSSLSocketFactory.getSSLSocketFactory(CustomSSLSocketFactory.java:325)
      at oracle.net.nt.TcpsNTAdapter.connect(TcpsNTAdapter.java:117)
      at oracle.net.nt.ConnOption.connect(ConnOption.java:159)
      at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:428)
      ... 28 more
  Caused by: oracle.net.ns.NetException: Unable to initialize the trust store.
      at oracle.net.nt.CustomSSLSocketFactory.getTrustManagerArray(CustomSSLSocketFactory.java:413)
      at oracle.net.nt.CustomSSLSocketFactory.getSSLSocketFactory(CustomSSLSocketFactory.java:309)
      ... 31 more
  Caused by: java.security.KeyStoreException: sso not found
      at java.security.KeyStore.getInstance(KeyStore.java:851)
      at oracle.net.nt.CustomSSLSocketFactory.getTrustManagerArray(CustomSSLSocketFactory.java:401)
      ... 32 more
  Caused by: java.security.NoSuchAlgorithmException: sso KeyStore not available
      at sun.security.jca.GetInstance.getInstance(GetInstance.java:159)
      at java.security.Security.getImpl(Security.java:695)
      at java.security.KeyStore.getInstance(KeyStore.java:848)
      ... 33 more
  </code></pre>