• Post Reply Bookmark Topic Watch Topic
  • New Topic

package org.apache.commons.httpclient does not exist  RSS feed

 
ajay yaduwanshi
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

I am getting the below error message while I am trying to compile my source code from netbean IDE 5.0

Compiling 1 source file to E:\MC\WeatherAPI\build\classes
E:\MC\WeatherAPI\src\weatherapi\YahooWebServiceParseResults.java:23: package org.apache.commons.httpclient does not exist
import org.apache.commons.httpclient.HttpClient;
E:\MC\WeatherAPI\src\weatherapi\YahooWebServiceParseResults.java:24: package org.apache.commons.httpclient does not exist
import org.apache.commons.httpclient.HttpStatus;
E:\MC\WeatherAPI\src\weatherapi\YahooWebServiceParseResults.java:25: package org.apache.commons.httpclient.methods does not exist
import org.apache.commons.httpclient.methods.GetMethod;
E:\MC\WeatherAPI\src\weatherapi\YahooWebServiceParseResults.java:36: cannot find symbol
symbol : class HttpClient
location: class YahooWebServiceParseResults
HttpClient client = new HttpClient();
E:\MC\WeatherAPI\src\weatherapi\YahooWebServiceParseResults.java:36: cannot find symbol
symbol : class HttpClient
location: class YahooWebServiceParseResults
HttpClient client = new HttpClient();
E:\MC\WeatherAPI\src\weatherapi\YahooWebServiceParseResults.java:37: cannot find symbol
symbol : class GetMethod
location: class YahooWebServiceParseResults
GetMethod method = new GetMethod(request);
E:\MC\WeatherAPI\src\weatherapi\YahooWebServiceParseResults.java:37: cannot find symbol
symbol : class GetMethod
location: class YahooWebServiceParseResults
GetMethod method = new GetMethod(request);
E:\MC\WeatherAPI\src\weatherapi\YahooWebServiceParseResults.java:42: cannot find symbol
symbol : variable HttpStatus
location: class YahooWebServiceParseResults
if (statusCode != HttpStatus.SC_OK) {


Please help me resolve it.

Waitng for your response.

Thanks & regards

Ajay Singh Yaduwanshi
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to download and/or install the given package (Apache HttpClient), and add it to your project's build path.
 
ajay yaduwanshi
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your valuable suggestion, It help me to get out of my problem, However I am again facing some problem.As

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.apache.commons.httpclient.HttpClient.<clinit>(HttpClient.java:66)
at WeatherAPI.YahooWebServiceParseResults.main(YahooWebServiceParseResults.java:38)
Java Result: 1
I am trying to connect to yahoo weatherAPI server.

Please help me this.

Thanks & Regards

Ajay Singh Yaduwanshi
 
ajay yaduwanshi
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ernest the issue got resloved only needs to put packages/jar file in library .
Once again thanks a lot

best
Ajay Singh Yaduwanshi
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!