Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

adding multiple jars

Highlighted

adding multiple jars

New Contributor

How can I add multiple jars to --driver-class-path. It works when I add 1 jar file, but does not work when I try to add multiple jars using a comma separated format.

Here is the shell command I am using. It does not pick up the second jar file.

pyspark2 --driver-class-path /home/jar/noarch-aster-jdbc-driver.jar,/home/jar/sqljdbc42.jar --jars /home/jar/noarch-aster-jdbc-driver.jar,/home/jar/sqljdbc42.jar

??

Thanks.

3 REPLIES 3

Re: adding multiple jars

@A C, separator for --driver-class-path will be ":" instead of ",". Do update the command and rerun the pyspark shell.

let know if this helps.

Re: adding multiple jars

New Contributor

Have you tried with colons?

pyspark2 --driver-class-path /home/jar/noarch-aster-jdbc-driver.jar:/home/jar/sqljdbc42.jar --jars /home/jar/noarch-aster-jdbc-driver.jar,/home/jar/sqljdbc42.jar

Re: adding multiple jars

New Contributor

I don't know if this has anything to do with different pyspark version. I have version 2.3.0. Finally, this format worked for me.

pyspark2 --driver-class-path "/home/jar/*" --jars /home/jar/noarch-aster-jdbc-driver.jar,/home/jar/sqljdbc42.jar

Don't have an account?
Coming from Hortonworks? Activate your account here