hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Albretch Mueller <lbrt...@gmail.com>
Subject missing library ...
Date Sat, 13 Oct 2012 22:44:04 GMT
~
 Well, I am not sure what is causing my errors. After downloading
httpcomponents- asyncclient, client and core:
~
$ ls -l *.tar.gz
-rw-r--r-- 1 knoppix knoppix   73970 Sep 27 19:35
httpcomponents-asyncclient-4.0-beta3-src.tar.gz
-rw-r--r-- 1 knoppix knoppix 1530137 Jun 29 20:52
httpcomponents-client-4.2.1-src.tar.gz
-rw-r--r-- 1 knoppix knoppix 1225967 Sep 21 16:14
httpcomponents-core-4.2.2-src.tar.gz
~
 and compiling all components using:
~
$ mvn --version
Apache Maven 3.0.4 (rNON-CANONICAL_2012-10-13_11-40_knoppix;
2012-10-13 11:40:12+0000)
Maven home: /media/sdb1/inst/sw/apache-maven-3.0.4
Java version: 1.7.0_07, vendor: Oracle Corporation
Java home: /media/sdb1/inst/sw/jdk1.7.0_07/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.3.7", arch: "i386", family: "unix"
~
$ wc -l *.log
     87 hc_asyncclient-4.0-beta3_mvn_antrun.log
     78 hc_asyncclient-4.0-beta3_mvn_docbkx_generate.log
     38 hc_asyncclient-4.0-beta3_mvn_javadoc.log
    506 hc_asyncclient-4.0-beta3_mvn_package_assembly.log
    247 hc_asyncclient-4.0-beta3_mvn_package.log
    225 hc_asyncclient-4.0-beta3_mvn_test.log
    111 hc_client-4.2.1_mvn_antrun.log
     98 hc_client-4.2.1_mvn_docbkx_generate.log
     62 hc_client-4.2.1_mvn_javadoc.log
    999 hc_client-4.2.1_mvn_package_assembly.log
    603 hc_client-4.2.1_mvn_package.log
    606 hc_client-4.2.1_mvn_test.log
    152 hc_core-4.2.2_mvn_antrun.log
    234 hc_core-4.2.2_mvn_docbkx_generate.log
     38 hc_core-4.2.2_mvn_javadoc.log
    834 hc_core-4.2.2_mvn_package_assembly.log
    515 hc_core-4.2.2_mvn_package.log
    550 hc_core-4.2.2_mvn_test.log
   5983 total
~
$ cat *.log | grep -in "\[INFO\] BUILD SUCCESS"
82:[INFO] BUILD SUCCESS
160:[INFO] BUILD SUCCESS
198:[INFO] BUILD SUCCESS
704:[INFO] BUILD SUCCESS
951:[INFO] BUILD SUCCESS
1176:[INFO] BUILD SUCCESS
1287:[INFO] BUILD SUCCESS
1385:[INFO] BUILD SUCCESS
1447:[INFO] BUILD SUCCESS
2446:[INFO] BUILD SUCCESS
3049:[INFO] BUILD SUCCESS
3655:[INFO] BUILD SUCCESS
3807:[INFO] BUILD SUCCESS
4041:[INFO] BUILD SUCCESS
4079:[INFO] BUILD SUCCESS
4913:[INFO] BUILD SUCCESS
5428:[INFO] BUILD SUCCESS
5977:[INFO] BUILD SUCCESS
~
 on:
~
$ java -version
java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM) Client VM (build 23.3-b01, mixed mode)
~
 setting up my classpath:
~
$ echo $CLASSPATH
/media/sdb1/inst/sw/JUtils/jars/hc/httpcore-4.2.2.jar:/media/sdb1/inst/sw/JUtils/jars/hc/httpclient-4.2.1.jar:/media/sdb1/inst/srcs/hc/httpcomponents-client-4.2.1/httpclient-osgi/target/org.apache.httpcomponents.httpclient_4.2.1.jar:/media/sdb1/inst/sw/JUtils:.
~
 I am getting the following errors:
~
$ javac -encoding utf8
RedirectHttpServer00.javaRedirectHttpServer00.java:52: error: cannot
find symbol
import org.apache.http.impl.DefaultHttpParams;
                           ^
  symbol:   class DefaultHttpParams
  location: package org.apache.http.impl
RedirectHttpServer00.java:55: error: cannot find symbol
import org.apache.http.message.HttpGet;
                              ^
  symbol:   class HttpGet
  location: package org.apache.http.message
RedirectHttpServer00.java:62: error: cannot find symbol
import org.apache.http.protocol.HttpExecutionContext;
                               ^
  symbol:   class HttpExecutionContext
  location: package org.apache.http.protocol
RedirectHttpServer00.java:177: error: cannot find symbol
   HttpParams params = new DefaultHttpParams(null);
                           ^
  symbol:   class DefaultHttpParams
  location: class HttpRedirectHandler
RedirectHttpServer00.java:192: error: constructor HttpRequestExecutor
in class HttpRequestExecutor cannot be applied to given types;
   HttpRequestExecutor httpexecutor = new HttpRequestExecutor(httpproc);
                                      ^
  required: no arguments
  found: BasicHttpProcessor
  reason: actual and formal argument lists differ in length
RedirectHttpServer00.java:193: error: cannot find symbol
   httpexecutor.setParams(params);
               ^
  symbol:   method setParams(HttpParams)
  location: variable httpexecutor of type HttpRequestExecutor
RedirectHttpServer00.java:195: error: cannot find symbol
   HttpContext context = new HttpExecutionContext(null);
                             ^
  symbol:   class HttpExecutionContext
  location: class HttpRedirectHandler
RedirectHttpServer00.java:197: error: cannot find symbol
   context.setAttribute(HttpExecutionContext.HTTP_TARGET_HOST, host);
                        ^
  symbol:   variable HttpExecutionContext
  location: class HttpRedirectHandler
RedirectHttpServer00.java:207: error: cannot find symbol
     HttpGet request = new HttpGet(target);
     ^
  symbol:   class HttpGet
  location: class HttpRedirectHandler
RedirectHttpServer00.java:207: error: cannot find symbol
     HttpGet request = new HttpGet(target);
                           ^
  symbol:   class HttpGet
  location: class HttpRedirectHandler
RedirectHttpServer00.java:272: error: cannot find symbol
   this.params = new DefaultHttpParams(null);
                     ^
  symbol:   class DefaultHttpParams
  location: class RequestListenerThread
RedirectHttpServer00.java:338: error: cannot find symbol
   HttpContext context = new HttpExecutionContext(null);
                             ^
  symbol:   class HttpExecutionContext
  location: class WorkerThread
Note: RedirectHttpServer00.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
12 errors
~
 based on your quickstart
~
 http://hc.apache.org/httpcomponents-client-ga/quickstart.html
~
 There should be 7 jars in total (components marked with (*) include
additional features and are optional) on the classpath.
    commons-logging-x.x.x.jar
    commons-codec-x.x.x.jar
    httpcore-x.x.x.jar
    httpclient-x.x.x.jar
~
 but maven didn't seem to have compiled commons-logging and commons-codec
~
$ ls -l | grep "^d"
drwxr-xr-x  7 knoppix knoppix    4096 Oct 13 16:43
httpcomponents-asyncclient-4.0-beta3
drwxr-xr-x 11 knoppix knoppix    4096 Oct 13 14:11 httpcomponents-client-4.2.1
drwxr-xr-x 10 knoppix knoppix    4096 Oct 13 16:05 httpcomponents-core-4.2.2
~
$ find . -type f -name "*.jar"
./httpcomponents-client-4.2.1/httpmime/target/httpmime-4.2.1-sources.jar
./httpcomponents-client-4.2.1/httpmime/target/httpmime-4.2.1.jar
./httpcomponents-client-4.2.1/httpclient-osgi/target/org.apache.httpcomponents.httpclient_4.2.1.jar
./httpcomponents-client-4.2.1/httpclient-osgi/target/org.apache.httpcomponents.httpclient_4.2.1-sources.jar
./httpcomponents-client-4.2.1/httpclient/target/httpclient-4.2.1.jar
./httpcomponents-client-4.2.1/httpclient/target/httpclient-4.2.1-tests.jar
./httpcomponents-client-4.2.1/httpclient/target/httpclient-4.2.1-sources.jar
./httpcomponents-client-4.2.1/httpclient-cache/target/httpclient-cache-4.2.1-sources.jar
./httpcomponents-client-4.2.1/httpclient-cache/target/httpclient-cache-4.2.1.jar
./httpcomponents-client-4.2.1/fluent-hc/target/fluent-hc-4.2.1.jar
./httpcomponents-client-4.2.1/fluent-hc/target/fluent-hc-4.2.1-sources.jar
./httpcomponents-asyncclient-4.0-beta3/httpasyncclient-osgi/target/org.apache.httpcomponents.httpasyncclient_4.0-beta3.jar
./httpcomponents-asyncclient-4.0-beta3/httpasyncclient-osgi/target/org.apache.httpcomponents.httpasyncclient_4.0-beta3-sources.jar
./httpcomponents-asyncclient-4.0-beta3/httpasyncclient-cache/target/httpasyncclient-cache-4.0-beta3-sources.jar
./httpcomponents-asyncclient-4.0-beta3/httpasyncclient-cache/target/httpasyncclient-cache-4.0-beta3.jar
./httpcomponents-asyncclient-4.0-beta3/httpasyncclient/target/httpasyncclient-4.0-beta3-sources.jar
./httpcomponents-asyncclient-4.0-beta3/httpasyncclient/target/httpasyncclient-4.0-beta3.jar
./httpcomponents-core-4.2.2/httpcore-ab/target/httpcore-ab-4.2.2.jar
./httpcomponents-core-4.2.2/httpcore-ab/target/httpcore-ab-4.2.2-sources.jar
./httpcomponents-core-4.2.2/httpcore-nio/target/httpcore-nio-4.2.2.jar
./httpcomponents-core-4.2.2/httpcore-nio/target/httpcore-nio-4.2.2-sources.jar
./httpcomponents-core-4.2.2/httpcore-osgi/target/org.apache.httpcomponents.httpcore_4.2.2-sources.jar
./httpcomponents-core-4.2.2/httpcore-osgi/target/org.apache.httpcomponents.httpcore_4.2.2.jar
./httpcomponents-core-4.2.2/httpcore/target/httpcore-4.2.2-sources.jar
./httpcomponents-core-4.2.2/httpcore/target/httpcore-4.2.2.jar
~
 What am I missing, not doing right?
~
 thanks
 lbrtchx

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message