You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Oliver Zemann <ol...@googlemail.com> on 2011/11/02 08:43:37 UTC
Constructor of DefaultHttpClient (OSGi) blocks
Hi,
i use the OSGi version of HttpClient in my OSGi application.
But when i try to create a new instance of DefaultHttpClient it blocks.
The stacktrace i got from netbeans:
"Thread-6"
java.lang.Object.wait(Object.java)
EDU.oswego.cs.dl.util.concurrent.LinkedQueue.poll
EDU.oswego.cs.dl.util.concurrent.PooledExecutor.getTask
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run
java.lang.Thread.run(Thread.java:679)
i'm using:
netbeans 7.0.1
apache felix 4.0.1
current HttpClient/HttpCommons (OSGi version)
java version "1.6.0_23"
OpenJDK Runtime Environment (IcedTea6 1.11pre) (6b23~pre10-0ubuntu5)
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
(but it also happens under windows with oracle's/sun's jdk)
the code:
String link =
"http://api.jamendo.com/get2/id+name+album_name+artist_name+duration/track/json/track_album+album_artist?order=searchweight_desc&n=all&searchquery="
+ searchString;
HttpGet get = new HttpGet(link);
System.out.println("before");
DefaultHttpClient client = new DefaultHttpClient();
System.out.println("after");
any hint in how to get more informations would be nice, because i'm new
to osgi and already got heavy problems with apache commons logging.
thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org
Re: Constructor of DefaultHttpClient (OSGi) blocks
Posted by Oleg Kalnichevski <ol...@apache.org>.
On Wed, 2011-11-02 at 08:43 +0100, Oliver Zemann wrote:
> Hi,
>
> i use the OSGi version of HttpClient in my OSGi application.
> But when i try to create a new instance of DefaultHttpClient it blocks.
> The stacktrace i got from netbeans:
>
> "Thread-6"
> java.lang.Object.wait(Object.java)
> EDU.oswego.cs.dl.util.concurrent.LinkedQueue.poll
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor.getTask
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run
> java.lang.Thread.run(Thread.java:679)
>
Oliver
I do not see any HttpClient classes in the stack trace. I do not think
this problem is HttpClient related. It doesn't even use
EDU.oswego.concurrent.
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org