'Class com.mapd.jdbc.MapDDriver not found' when running mapd_jdbc_example.py


#1

I keep getting the error java.lang.RuntimeExceptionPyRaisable: java.lang.RuntimeException: Class com.mapd.jdbc.MapDDriver not found when trying to run mapd_jdbc_sample.py in the default location

I did make sure that the mapdjdbc-1.0-SNAPSHOT-jar-with-dependencies.jar file is in the same folder (copied so its in the original location as well).

Am I missing something? I’m following the instructions here

EDIT:
Just tried running it from the command line and it worked. I’ve been running it from Spyder using Python 3 from Anaconda. Is this a known issue with Anaconda?


#2

Hi v1nsai,

Could you verify that Spyder’s working directory is set to use the same as the file? One way to check is under Run -> Configuration per file... - the mapdjdbc-1.0-SNAPSHOT-jar-with-dependencies.jar file needs to be in the working directory. You could also try setting the full path to the jar file in mapd_jdbc.py.

Alternatively we have a native Python connector under development named pymapd, installable with pip and conda (via conda-forge). Documentation is at https://www.mapd.com/docs/latest/mapd-core-guide/pymapd/ and http://pymapd.readthedocs.io/en/latest/


#3

Actually I realized earlier today that when I set the working directory first that everything worked, so running outside of Spyder worked since it was already in the directory.

I’ll check out pymapd though thanks!