java.lang.NoSuchFieldError: INSTANCE

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 05:23:49
K.C.

This is probably a dependency issue.

It's a very unclear error message but I found something similar here: Hibernate NoSuchFieldError INSTANCE but only with Struts 1?

I faced similar issue like this, In my class path there was two jar contains same class, httpcore-4.3 and apache-httpcomponents-httpcore, I have removed apache-httpcomponents-httpcore from class path solved the issue.

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

I had the below jar files in the path inside the plugin folder:
./var/lib/jenkins/plugins/build-pipeline-plugin/WEB-INF/lib/httpcore-4.2.1.jar
./var/lib/jenkins/plugins/git-client/WEB-INF/lib/httpcore-4.3.2.jar
./var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/httpcore-4.2.4.jar

After, I removed the below file, it worked for me
/var/lib/jenkins/plugins/build-pipeline-plugin/WEB-INF/lib/httpcore-4.2.1.jar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!