java.lang.NoSuchFieldError: INSTANCE

GitHub | angelo337 | 3 months ago
  1. 0

    Exception in thread "main" java.lang.NoSuchFieldError: INSTANCE

    Stack Overflow | 5 months ago | Chuchoo
    java.lang.NoSuchFieldError: INSTANCE
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    I am trying to write a simple WebService Testing using HTTPClient. I have all my jars loaded up but get the above error message. I am getting the above error stacktrace. {code:title=RESTTester.java|borderStyle=solid} package HTTPClientTest; import java.io.IOException; import org.apache.http.HttpResponse; import org.apache.http.HttpStatus; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpUriRequest; import org.apache.http.impl.client.HttpClientBuilder; import org.junit.Assert; public class RESTTester { public static void main (String args[]) { String restURL_XML = "http://parabank.parasoft.com/parabank/services/bank/customers/12212/"; try { testStatusCode(restURL_XML); } catch (ClientProtocolException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } public static void testStatusCode(String restURL) throws ClientProtocolException, IOException { HttpUriRequest request = new HttpGet(restURL); HttpResponse httpResponse = HttpClientBuilder.create().build().execute(request); Assert.assertEquals(httpResponse.getStatusLine().getStatusCode(),HttpStatus.SC_OK); } } {code} {code} Exception in thread "main" java.lang.NoSuchFieldError: INSTANCE at org.apache.http.conn.ssl.SSLConnectionSocketFactory.<clinit>(SSLConnectionSocketFactory.java:144) at org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:966) at HTTPClientTest.RESTTester.testStatusCode(RESTTester.java:37) at HTTPClientTest.RESTTester.main(RESTTester.java:22) {code}

    Apache's JIRA Issue Tracker | 5 months ago | Sugat Sapkota
    java.lang.NoSuchFieldError: INSTANCE
  4. 0

    NoSuchFieldError: INSTANCE] with root cause

    GitHub | 2 years ago | johnanthony3
    java.lang.NoSuchFieldError: INSTANCE

    7 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NoSuchFieldError

      INSTANCE

      at org.apache.http.conn.ssl.SSLConnectionSocketFactory.<clinit>()
    2. Apache HttpClient
      HttpClientBuilder.build
      1. org.apache.http.conn.ssl.SSLConnectionSocketFactory.<clinit>(SSLConnectionSocketFactory.java:144)
      2. org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:966)
      2 frames
    3. com.norconex.collector
      AbstractCrawler.startExecution
      1. com.norconex.collector.http.client.impl.GenericHttpClientFactory.createHTTPClient(GenericHttpClientFactory.java:306)
      2. com.norconex.collector.http.crawler.HttpCrawler.initializeHTTPClient(HttpCrawler.java:442)
      3. com.norconex.collector.http.crawler.HttpCrawler.prepareExecution(HttpCrawler.java:116)
      4. com.norconex.collector.core.crawler.AbstractCrawler.doExecute(AbstractCrawler.java:204)
      5. com.norconex.collector.core.crawler.AbstractCrawler.startExecution(AbstractCrawler.java:179)
      5 frames
    4. com.norconex.jef4
      JobSuite.execute
      1. com.norconex.jef4.job.AbstractResumableJob.execute(AbstractResumableJob.java:49)
      2. com.norconex.jef4.suite.JobSuite.runJob(JobSuite.java:350)
      3. com.norconex.jef4.suite.JobSuite.doExecute(JobSuite.java:300)
      4. com.norconex.jef4.suite.JobSuite.execute(JobSuite.java:172)
      4 frames
    5. com.norconex.collector
      HttpCollector.main
      1. com.norconex.collector.core.AbstractCollector.start(AbstractCollector.java:120)
      2. com.norconex.collector.core.AbstractCollectorLauncher.launch(AbstractCollectorLauncher.java:80)
      3. com.norconex.collector.http.HttpCollector.main(HttpCollector.java:75)
      3 frames