Error description: Direct start Spark-shell,pia, error, has been so started, ah, a little wrong. When you are in a bad mood, really want to delete it, and then the next version to use. But think about if the download is also this appearance, then I am not a waste of time, and do the repetitive things, lend your money, although I do not have a wife .... Tu, or meditation looked at the error, suddenly remembered that some time ago using spark SQL from the hive to take data from, but my hive-site.xml and driver package has been tested to the corresponding directory, how to give me the whole such a, I estimate is not configured a good path problem. Then I immediately specified the driver package that Spark-sql needed when I started Spark-shell, because Spark-sql was started when the Spark-shell started. Error logs and resolutions are as follows:
caused by:org.datanucleus.store.rdbms.connectionpool.DatastoreDriverNotFoundException:The specified datastore Driver ("Com.mysql.jdbc.Driver") is not found in the CLASSPATH. Please check your CLASSPATH specification, and the name of the driver.
At Org.datanucleus.store.rdbms.connectionpool.AbstractConnectionPoolFactory.loadDriver ( ABSTRACTCONNECTIONPOOLFACTORY.JAVA:58)
At Org.datanucleus.store.rdbms.connectionpool.DBCPConnectionPoolFactory.createConnectionPool ( DBCPCONNECTIONPOOLFACTORY.JAVA:50)
At Org.datanucleus.store.rdbms.ConnectionFactoryImpl.generateDataSources (connectionfactoryimpl.java:238)
... 127 more
Workaround:
[Root@hadoop0 bin]#./spark-shell--driver-class-path/usr/local/spark/lib/mysql-connector-java-5.1.18-bin.jar