hive-solr icon indicating copy to clipboard operation
hive-solr copied to clipboard

SemanticException Cannot find class "com.lucidworks.hadoop.hive.LWStorageHandler"

Open deepdoradla opened this issue 7 years ago • 5 comments

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 avatar May 04 '17 18:05 deepdoradla

@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.

ctargett avatar May 04 '17 18:05 ctargett

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!

JAYMIN1991 avatar Nov 11 '17 06:11 JAYMIN1991

@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)

acesar avatar Nov 13 '17 13:11 acesar

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

udossa avatar Aug 23 '18 16:08 udossa

Hi All, Is this issue solved or any alternate solution?

raviceg avatar Jul 05 '19 06:07 raviceg