Discussion:
Versions and osgi and async and such
Benson Margulies
2016-09-14 12:13:33 UTC
Permalink
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/Object;)V
at
org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase.ensureRunning(CloseableHttpAsyncClientBase.java:90)
at
org.apache.http.impl.nio.client.InternalHttpAsyncClient.execute(InternalHttpAsyncClient.java:123)
at
org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(CloseableHttpAsyncClient.java:75)
at
org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(CloseableHttpAsyncClient.java:108)
at
org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(CloseableHttpAsyncClient.java:92)
Stefan Magnus Landrø
2016-09-14 12:52:16 UTC
Permalink
are you using the correct core version?

Sendt fra min iPhone
Post by Benson Margulies
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 ...
org.apache.http.util.Asserts.check(ZLjava/lang/String;Ljava/lang/Object;)V
at
org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase.ensureRunning(CloseableHttpAsyncClientBase.java:90)
at
org.apache.http.impl.nio.client.InternalHttpAsyncClient.execute(InternalHttpAsyncClient.java:123)
at
org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(CloseableHttpAsyncClient.java:75)
at
org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(CloseableHttpAsyncClient.java:108)
at
org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(CloseableHttpAsyncClient.java:92)
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-***@hc.apache.org
For additional commands, e-mail: httpclient-users-***@hc.apache.org
Benson Margulies
2016-09-14 13:41:04 UTC
Permalink
I wasn't. There's a servicemix OSGi jar that embeds an old copy of core
that snuck into the classpath.

On Wed, Sep 14, 2016 at 8:52 AM, Stefan Magnus LandrÞ <
Post by Stefan Magnus Landrø
are you using the correct core version?
Sendt fra min iPhone
Den 14. sep. 2016 kl. 14.13 skrev Benson Margulies <
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 ...
org.apache.http.util.Asserts.check(ZLjava/lang/String;
Ljava/lang/Object;)V
at
org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase.
ensureRunning(CloseableHttpAsyncClientBase.java:90)
at
org.apache.http.impl.nio.client.InternalHttpAsyncClient.execute(
InternalHttpAsyncClient.java:123)
at
org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(
CloseableHttpAsyncClient.java:75)
at
org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(
CloseableHttpAsyncClient.java:108)
at
org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(
CloseableHttpAsyncClient.java:92)
---------------------------------------------------------------------
Khare, Aparna
2018-04-10 09:53:15 UTC
Permalink
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

-----Original Message-----
From: Benson Margulies [mailto:***@gmail.com]
Sent: Wednesday, September 14, 2016 5:44 PM
To: HttpClient User Discussion <httpclient-***@hc.apache.org>
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/Object;)V
at
org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase.ensureRunning(CloseableHttpAsyncClientBase.java:90)
at
org.apache.http.impl.nio.client.InternalHttpAsyncClient.execute(InternalHttpAsyncClient.java:123)
at
org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(CloseableHttpAsyncClient.java:75)
at
org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(CloseableHttpAsyncClient.java:108)
at
org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(CloseableHttpAsyncClient.java:92)
B�KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB��[��X��ܚX�KK[XZ[��Y[� ]\�\��][��X��ܚX�P˘\X�K�ܙ�B��܈Y][ۘ[��[X[
Oleg Kalnichevski
2018-04-10 12:51:35 UTC
Permalink
Post by Khare, Aparna
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.
Post by Khare, Aparna
-----Original Message-----
Sent: Wednesday, September 14, 2016 5:44 PM
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 ...
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: httpclient-users-***@hc.apache.org
For additional commands, e-mail: httpclient-users-***@hc.apache.org
Khare, Aparna
2018-04-12 08:15:16 UTC
Permalink
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:***@apache.org]
Sent: Tuesday, April 10, 2018 6:22 PM
To: HttpClient User Discussion <httpclient-***@hc.apache.org>
Subject: Re: Versions and osgi and async and such
Post by Khare, Aparna
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.
Post by Khare, Aparna
-----Original Message-----
Sent: Wednesday, September 14, 2016 5:44 PM
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 ...
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: httpclient-users-***@hc.apache.org
For additional commands, e-mail: httpclient-users-***@hc.apache.org

Т���������������������������������������������������������������������ХF�V�7V'67&�&R�R���â�GG6ƖV�B�W6W'2�V�7V'67&�&T�2�6�R��&pФf�"FF�F����6���
Oleg Kalnichevski
2018-04-12 09:40:10 UTC
Permalink
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  
org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.<init>(Lo
rg/apache/http/impl/nio/reactor/IOReactorConfig;Ljava/util/concurrent
/ThreadFactory;)V
org.apache.http.impl.nio.client.IOReactorUtils.create(IOReactor
Utils.java:43)
org.apache.http.impl.nio.client.HttpAsyncClientBuilder.build(Ht
tpAsyncClientBuilder.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
There still must be an older version of HttpCore on your classpath.

Oleg

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