Hi,
We tried and we are able to get our bundle up with the dependency of the
httpclient async.. This is not an OSGI but via writing to the bundle classpath
from pom.
<httpcore.version>4.4</httpcore.version>
<httpclient.version>4.5.4</httpclient.version>
<asyncclient.version>4.1.3</asyncclient.version>
<commons-logging.version>1.2</commons-logging.version>
<commons-io.version>2.4</commons-io.version>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpasyncclient</artifactId>
<version>${asyncclient.version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>${httpcore.version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore-nio</artifactId>
<version>${httpcore.version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>${httpclient.version}</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>${commons-logging.version}</version>
</dependency>
<dependency>
But when I run my service I'm getting
java.lang.NoSuchMethodError:
org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.<init>(Lorg/apache/http/impl/nio/reactor/IOReactorConfig;Ljava/util/concurrent/ThreadFactory;)V
org.apache.http.impl.nio.client.IOReactorUtils.create(IOReactorUtils.java:43)
org.apache.http.impl.nio.client.HttpAsyncClientBuilder.build(HttpAsyncClientBuilder.java:666)
org.apache.http.impl.nio.client.HttpAsyncClients.createDefault(HttpAsyncClients.java:60)
I tried moving to the different version of httpcore.. It still does not work.
Can some please help here
-----Original Message-----
From: Oleg Kalnichevski [mailto:[email protected]]
Sent: Tuesday, April 10, 2018 6:22 PM
To: HttpClient User Discussion <[email protected]>
Subject: Re: Versions and osgi and async and such
On Tue, 2018-04-10 at 09:53 +0000, Khare, Aparna wrote:
> Hi All ,
>
> We are also trying to use the lastest HTTPClient 4.5.5 with Asycn
> Httpclient ..
>
> When we try to bundle the latest Async HttpClient we are not able to
> start the application because of missing dependency.. we need to find
> the relevant OSGI jars httpclient-cache-4.5.3 etc which we could
> bundle
>
> Can someone guide here ...
>
> Thanks,
> Aparma
Aparma
You need to latest version of HttpCore 4.4.x OSGi bundle and HttpClient
4.5.x OSGi bundle.
http://hc.apache.org/downloads.cgi
Oleg.
>
> -----Original Message-----
> From: Benson Margulies [mailto:[email protected]]
> Sent: Wednesday, September 14, 2016 5:44 PM
> To: HttpClient User Discussion <[email protected]>
> Subject: Versions and osgi and async and such
>
> I am struggling to maintain some code that wants to use the latest
> 4.x
> version of http asynchronous client via OSGi.
>
> The latest async client is 4.1.2. I've had this working, but a small
> change
> has put me in a state where various things implode, so I'm trying to
> start
> over from first principles.
>
> When I use that as a dependency, I end up with ...
>
>
> java.lang.NoSuchMethodError:
> org.apache.http.util.Asserts.check(ZLjava/lang/String;Ljava/lang/Obje
> ct;)V
> at
> org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase.ensureRu
> nning(CloseableHttpAsyncClientBase.java:90)
> at
> org.apache.http.impl.nio.client.InternalHttpAsyncClient.execute(Inter
> nalHttpAsyncClient.java:123)
> at
> org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(Clos
> eableHttpAsyncClient.java:75)
> at
> org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(Clos
> eableHttpAsyncClient.java:108)
> at
> org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(Clos
> eableHttpAsyncClient.java:92)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]