hive-solr
hive-solr copied to clipboard
SemanticException Cannot find class "com.lucidworks.hadoop.hive.LWStorageHandler"
I am trying to do the following and I am getting "FAILED: SemanticException Cannot find class 'com.lucidworks.hadoop.hive.LWStorageHandler'"
create external table IF NOT EXISTS movies_solr2(movieId INT, title STRING, genres STRING) STORED BY 'com.lucidworks.hadoop.hive.LWStorageHandler' LOCATION '/user/deep4u/solr/movielens_movies/' TBLPROPERTIES('solr.zkhost' = 'data1.cloudwick.com:2181,data2.cloudwick.com.com:2181,data3.cloudwick.com:2181/solr','solr.collection' = 'movies','solr.query' = '*:*');
The jar I am using is solr-hive-serde-3.0.0.jar. Is this a known problem with 3.0.0 jars?
Any help would be greatly appreciated.
@deepdoradla Did you add the jar? From the hive prompt: ADD JAR solr-hive-serde-3.0.0.jar;
.
Also, I don't believe we've ever tested this with IF NOT EXISTS, but I would think it would give a better error than it can't find the class if that was the problem.
Hello, i tried below command for solr external table data. its return same error "FAILED: SemanticException Cannot find class 'com.lucidworks.hadoop.hive.LWStorageHandler'".
Command of Hive:
CREATE EXTERNAL TABLE solr_coldemo (id STRING, cat_s STRING, title_s STRING, price_f FLOAT, in_stock_b BOOLEAN, author_s STRING, series_s STRING, seq_i INT, genre_s STRING) STORED BY 'com.lucidworks.hadoop.hive.LWStorageHandler' LOCATION '/tmp/solr' TBLPROPERTIES('solr.server.url' = 'http://192.168.1.72:8984/solr','solr.collection' = 'collection1','solr.query' = ':');
Help me for same.
Thanks in advance!
@deepdoradla @jaymin009 Please share the build commands that you follow.
The command: ./gradlew clean shadowJar --info
creates a uber jar with all dependencies needed.
The exception:
"FAILED: SemanticException Cannot find class 'com.lucidworks.hadoop.hive.LWStorageHandler'"
Usually means that the uber jar is missing some dependencies (build issues)
Hello I have the same issue, here are the commands I follow to build the Jar:
git clone --recursive https://github.com/lucidworks/hive-solr
gradlew clean shadowJar --info
Hi All, Is this issue solved or any alternate solution?