Support Questions

Find answers, ask questions, and share your expertise

User class threw exception: java.lang.NoSuchFieldError

avatar
Explorer

I am using HttpClient-4.5.3.jar in my bundle jar but Cloudera environment has HttpClient-4.2.5.jar. because of this I am getting the below error. Please suggest How can I prioritize my classpath or can avoid loading of Cloudera environment jars to yarn.

 

 

 

 

 

18/10/30 01:24:00 ERROR ApplicationMaster: User class threw exception: java.lang.NoSuchFieldError: INSTANCE
java.lang.NoSuchFieldError: INSTANCE
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.<clinit>(SSLConnectionSocketFactory.java:146)
at org.apache.solr.client.solrj.impl.HttpClientUtil$DefaultSchemaRegistryProvider.getSchemaRegistry(HttpClientUtil.java:210)
at org.apache.solr.client.solrj.impl.HttpClientUtil.createPoolingConnectionManager(HttpClientUtil.java:228)
at org.apache.solr.client.solrj.impl.HttpClientUtil.createClient(HttpClientUtil.java:223)
at org.apache.solr.client.solrj.impl.CloudSolrClient.<init>(CloudSolrClient.java:276)
at org.apache.solr.client.solrj.impl.CloudSolrClient$Builder.build(CloudSolrClient.java:1525)
at com.subex.roc.kafka2hivesolr.logmetriccollection.TaskLogAndMetricCollectionFrameImpl.getCloudSolrClient(TaskLogAndMetricCollectionFrameImpl.java:355)
at com.subex.roc.kafka2hivesolr.logmetriccollection.TaskLogAndMetricCollectionFrameImpl.execute(TaskLogAndMetricCollectionFrameImpl.java:124)
at com.subex.roc.kafka2hivesolr.logmetriccollection.TaskLogAndMetricCollectionFrameImpl.execute(TaskLogAndMetricCollectionFrameImpl.java:53)
at com.subex.roc.spark.fw.stream.StreamGroupingFunction.call(StreamGroupingFunction.java:99)
at com.subex.roc.spark.fw.stream.StreamingExecutor.execute(StreamingExecutor.java:44)
at com.subex.roc.spark.Main.launch(Main.java:162)
at com.subex.roc.spark.Main.main(Main.java:86)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.spark.deploy.yarn.ApplicationMaster$$anon$3.run(ApplicationMaster.scala:701)
18/10/30 01:24:00 INFO ApplicationMaster: Final app status: FAILED, exitCode: 15, (reason: User class threw exception: java.lang.NoSuchFieldError: INSTANCE)
18/10/30 01:24:00 INFO AnnotationConfigApplicationContext: Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@1d2b09c7: startup date [Tue Oct 30 01:22:36 IST 2018]; root of context hierarchy
18/10/30 01:24:00 INFO SparkContext: Invoking stop() from shutdown hook

 

 

 

 

3 REPLIES 3

avatar
New Contributor

The same issue, please advise

avatar
New Contributor

Facing the same error. Does someone already realize how to solve it?

avatar
Super Guru

What's the version of your Cloudera cluster?

--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.