java.lang.NoSuchFieldError: INSTANCE

前端 未结 4 1900
醉酒成梦
醉酒成梦 2020-11-30 13:33

When trying to submit my topology through StormSubmitter, I am getting -

Caused by: java.lang.NoSuchFieldError: INSTANCE  
at org.apache.http.impl.io.Defaul         


        
4条回答
  •  盖世英雄少女心
    2020-11-30 14:04

    Harsh is right its in the storm class path.

    So what I did to make this work was remove the httpclient and httpcore that comes with storm and replaced them with newer version 4.3.3 and 4.3.2 respectively. This changes the classpath the works/nimbus/supervisor uses to start. You can run storm classpath and it print the class path out.

    [nimbus ~]$ storm classpath
    ...../storm-0.8.2/lib/httpclient-4.3.3.jar:..../storm-0.8.2/lib/httpcore-4.3.2.jar.....
    

    I am not sure this is a very good work around, I am not sure what part of storm uses this jar.

    if you look at the python storm code you see that it will put all jars in the storm root and storm/lib

    def get_classpath(extrajars):
        ret = get_jars_full(STORM_DIR)
        ret.extend(get_jars_full(STORM_DIR + "/lib"))
        ret.extend(extrajars)
        return normclasspath(":".join(ret))
    

提交回复
热议问题