You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by roni <ro...@gmail.com> on 2015/07/23 00:45:00 UTC

No suitable driver found for jdbc:mysql://

Hi All,
 I have a cluster with spark 1.4.
I am trying to save data to mysql but getting error

Exception in thread "main" java.sql.SQLException: No suitable driver found
for jdbc:mysql://<>.rds.amazonaws.com:3306/DAE_kmer?user=<>&password=<>


*I looked at - https://issues.apache.org/jira/browse/SPARK-8463
<https://issues.apache.org/jira/browse/SPARK-8463> and added the connector
jar to the same location as on Master using copy-dir script.*

*But I am still getting the same error. This sued to work with 1.3.*

*This is my command  to run the program - **$SPARK_HOME/bin/spark-submit
--jars
/root/spark/lib/mysql-connector-java-5.1.35/mysql-connector-java-5.1.35-bin.jar
--conf
spark.executor.extraClassPath=/root/spark/lib/mysql-connector-java-5.1.35/mysql-connector-java-5.1.35-bin.jar
--conf spark.executor.memory=55g --driver-memory=55g
--master=spark://ec2-52-25-191-999.us-west-2.compute.amazonaws.com:7077
<http://ec2-52-25-191-999.us-west-2.compute.amazonaws.com:7077>  --class
"saveBedToDB"  target/scala-2.10/adam-project_2.10-1.0.jar*

*What else can I Do ?*

*Thanks*

*-Roni*

Re: No suitable driver found for jdbc:mysql://

Posted by Rishi Yadav <ri...@infoobjects.com>.
try setting --driver-class-path

On Wed, Jul 22, 2015 at 3:45 PM, roni <ro...@gmail.com> wrote:

> Hi All,
>  I have a cluster with spark 1.4.
> I am trying to save data to mysql but getting error
>
> Exception in thread "main" java.sql.SQLException: No suitable driver found
> for jdbc:mysql://<>.rds.amazonaws.com:3306/DAE_kmer?user=<>&password=<>
>
>
> *I looked at - https://issues.apache.org/jira/browse/SPARK-8463
> <https://issues.apache.org/jira/browse/SPARK-8463> and added the connector
> jar to the same location as on Master using copy-dir script.*
>
> *But I am still getting the same error. This sued to work with 1.3.*
>
> *This is my command  to run the program - **$SPARK_HOME/bin/spark-submit
> --jars
> /root/spark/lib/mysql-connector-java-5.1.35/mysql-connector-java-5.1.35-bin.jar
> --conf
> spark.executor.extraClassPath=/root/spark/lib/mysql-connector-java-5.1.35/mysql-connector-java-5.1.35-bin.jar
> --conf spark.executor.memory=55g --driver-memory=55g
> --master=spark://ec2-52-25-191-999.us-west-2.compute.amazonaws.com:7077
> <http://ec2-52-25-191-999.us-west-2.compute.amazonaws.com:7077>  --class
> "saveBedToDB"  target/scala-2.10/adam-project_2.10-1.0.jar*
>
> *What else can I Do ?*
>
> *Thanks*
>
> *-Roni*
>