Search code examples
apache-sparkmobius

SparkCLR java.sql.SQLException: No suitable driver


Mobius 1.6 Connect Oracle with the following command

C:\spark-clr_2.10-1.6.200\runtime\scripts\sparkclr-submit.cmd --master local --jars C:\oracle\lib\ojdbc7.jar --exe WinFormMobius.exe D:\Mobius\Debug

[2016-09-29T08:31:24.3019737Z] [MyPCName] [Error] [JvmBridge] java.sql.SQLException: No suitable driver at java.sql.DriverManager.getDriver(DriverManager.java:278) at org.apache.spark.sql.execution.datasources.jdbc.JdbcUtils$$anonfun$2.apply(JdbcUtils.scala:50)

I have use --jars to include oracle driver, but seems not work


Solution

  • Thanks for @skaarthik suggestion. The C# Code is

    var properties = new Dictionary<string, string> { { @"driver", @"oracle.jdbc.driver.OracleDriver" } };