Support Questions

Find answers, ask questions, and share your expertise
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

User class threw exception: java.lang.NoSuchFieldError

New Contributor

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>(
at org.apache.solr.client.solrj.impl.HttpClientUtil$DefaultSchemaRegistryProvider.getSchemaRegistry(
at org.apache.solr.client.solrj.impl.HttpClientUtil.createPoolingConnectionManager(
at org.apache.solr.client.solrj.impl.HttpClientUtil.createClient(
at org.apache.solr.client.solrj.impl.CloudSolrClient.<init>(
at org.apache.solr.client.solrj.impl.CloudSolrClient$
at com.subex.roc.kafka2hivesolr.logmetriccollection.TaskLogAndMetricCollectionFrameImpl.getCloudSolrClient(
at com.subex.roc.kafka2hivesolr.logmetriccollection.TaskLogAndMetricCollectionFrameImpl.execute(
at com.subex.roc.kafka2hivesolr.logmetriccollection.TaskLogAndMetricCollectionFrameImpl.execute(
at com.subex.roc.spark.Main.launch(
at com.subex.roc.spark.Main.main(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.apache.spark.deploy.yarn.ApplicationMaster$$anon$
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






New Contributor

The same issue, please advise

New Contributor

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

Master Collaborator

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.
Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.