Hi Jim, There is a missing -- in your command before --driver-class-path. The extra -- tells PIO that the following arguments should go to the underlying Spark.
pio import --appid 3 --input data/stopwords.json -- --driver-class-path /usr/lib/jvm/postgresql-9.4-1204-jdbc41.jar Regards, Donald On Monday, October 17, 2016, Jim Miller <jemiller1...@gmail.com> wrote: > Guys, > > I tried “pio import --appid 3 --input data/stopwords.json” but with the > following error: > > vagrant:apache-predictionio-0.10.0-incubating/ $ pio import --appid 3 > --input data/stopwords.json [20:05:53] > [INFO] [Runner$] Submission command: /home/vagrant/apache- > predictionio-0.10.0-incubating/vendors/spark-1.5. > 1-bin-hadoop2.6/bin/spark-submit --class > org.apache.predictionio.tools.imprt.FileToEvents > --files file:/home/vagrant/apache-predictionio-0.10.0- > incubating/conf/log4j.properties --driver-class-path /home/vagrant/apache- > predictionio-0.10.0-incubating/conf:/home/vagrant/ > apache-predictionio-0.10.0-incubating/lib/postgresql-9.4- > 1204.jdbc41.jar:/home/vagrant/apache-predictionio-0.10.0- > incubating/lib/mysql-connector-java-5.1.37.jar file:/home/vagrant/apache- > predictionio-0.10.0-incubating/assembly/pio-assembly-0.10.0-incubating.jar > --appid 3 --input data/stopwords.json --env PIO_ENV_LOADED=1,PIO_STORAGE_ > REPOSITORIES_METADATA_NAME=pio_meta,PIO_FS_BASEDIR=/home/ > vagrant/.pio_store,PIO_STORAGE_SOURCES_ELASTICSEARCH_ > HOSTS=localhost,PIO_HOME=/home/vagrant/apache-predictionio-0.10.0- > incubating,PIO_FS_ENGINESDIR=/home/vagrant/.pio_store/ > engines,PIO_STORAGE_SOURCES_PGSQL_URL=jdbc:postgresql:// > localhost/pio,PIO_STORAGE_SOURCES_ELASTICSEARCH_TYPE= > elasticsearch,PIO_STORAGE_REPOSITORIES_METADATA_SOURCE=PGSQL,PIO_STORAGE_ > REPOSITORIES_MODELDATA_SOURCE=PGSQL,PIO_STORAGE_ > REPOSITORIES_EVENTDATA_NAME=pio_event,PIO_STORAGE_SOURCES_ > PGSQL_PASSWORD=pio,PIO_STORAGE_SOURCES_ELASTICSEARCH_ > HOME=/home/vagrant/apache-predictionio-0.10.0-incubating/vendors/ > elasticsearch-1.4.4,PIO_STORAGE_SOURCES_PGSQL_TYPE= > jdbc,PIO_FS_TMPDIR=/home/vagrant/.pio_store/tmp,PIO_STORAGE_SOURCES_PGSQL_ > USERNAME=pio,PIO_STORAGE_REPOSITORIES_MODELDATA_NAME= > pio_model,PIO_STORAGE_REPOSITORIES_EVENTDATA_SOURCE= > PGSQL,PIO_CONF_DIR=/home/vagrant/apache-predictionio-0. > 10.0-incubating/conf,PIO_STORAGE_SOURCES_ELASTICSEARCH_PORTS=9300 > [WARN] [Utils] Your hostname, imhotep-dev-host resolves to a loopback > address: 127.0.1.1; using 10.0.2.15 instead (on interface eth0) > [WARN] [Utils] Set SPARK_LOCAL_IP if you need to bind to another address > [INFO] [Remoting] Starting remoting > [INFO] [Remoting] Remoting started; listening on addresses :[akka.tcp:// > sparkDriver@10.0.2.15:48913] > [WARN] [MetricsSystem] Using default name DAGScheduler for source because > spark.app.id is not set. > Exception in thread "main" java.sql.SQLException: No suitable driver found > for jdbc:postgresql://localhost/pio > > > On stackoverflow.com I found this solution: > > pio import --appid 3 --input data/stopwords.json --driver-class-path > /usr/lib/jvm/postgresql-9.4-1204-jdbc41.jar > > which resulting in this error: > vagrant:apache-predictionio-0.10.0-incubating/ $ pio import --appid 3 > --input data/stopwords.json --driver-class-path > /usr/lib/jvm/postgresql-9.4-1204-jdbc41.jar > [20:44:54] > Error: Unknown option --driver-class-path > Error: Unknown argument '/usr/lib/jvm/postgresql-9.4-1204-jdbc41.jar' > Try -- for more information. > Usage: pio import --appid <value> --input <value> [--channel <value>] > > Thanks for any help! > > Jim > > > -- > Jim Miller >