Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 911857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T17:16:55+00:00 2026-05-15T17:16:55+00:00

I am using apache http commons 4.I have added both httpcore-4.0.1.jar and httpclient-4.0.1.jar in

  • 0

I am using apache http commons 4.I have added both httpcore-4.0.1.jar and httpclient-4.0.1.jar in the classpath of netbeans. I am getting error:
java.lang.NoClassDefFoundError: org/apache/http/impl/client/DefaultHttpClient

My Code is as follows. Please help.

import org.apache.http.client.HttpClient;
import org.apache.http.client.ResponseHandler;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.BasicResponseHandler;
import org.apache.http.impl.client.DefaultHttpClient;

public class HttpClientManager {
    public HttpClient httpclient;
    public HttpClientManager() {
        this.init();
    }

    public void init() {
        try {
            httpclient = new DefaultHttpClient();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public void getCourseList() {
        String url = "http://exnet.in.th/api.php?username=demoinst&ha=2b62560&type=instructor";
        HttpGet httpget = new HttpGet(url);

        ResponseHandler<String> responseHandler = new BasicResponseHandler();
        try {
            String responseBody = httpclient.execute(httpget, responseHandler);
            System.out.println(responseBody);

        } catch (Exception e) {
        }    
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T17:16:56+00:00Added an answer on May 15, 2026 at 5:16 pm

    This exception happened because of Felix did not find the actual class as it was not included the import.
    Thanks all for answering this.

    OK I got it work by adding path of DefaultHttpClient to felix.properties –

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Apache Tomcat 6.0.26 with java servlets and JSPs. Whenever I'm trying to
I am trying out click-once on my local machine using Apache 2.2. I have
I have a Pylons app that I'm trying to set up using Apache and
I am trying to configure SSL on my localhost using apache and phusion passenger.
PROBLEM When using Imagick::newPseudoImage to create a radial gradient, this error appears in the
I have a multisite Drupal installation with about 20 urls pointing to the same
I'm trying to parse the title from the following webpage: http://kid37.blogger.de/stories/1670573/ When I use
I've been writing PHP applications using PHP for a while in WAMP. Now I'm
I need to load very large ontology represented as N-triples file(1gb) to the openrdf
[edit] I've removed my convoluted and badly malformed question so that it doesn't detract

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.