Message from discussion
java.lang.NoSuchMethodError: org.apache.http.conn.scheme.Sc heme
Received: by 10.50.47.199 with SMTP id f7mr8740919ign.5.1340647034611;
Mon, 25 Jun 2012 10:57:14 -0700 (PDT)
X-BeenThere: ektorp-discuss@googlegroups.com
Received: by 10.50.170.38 with SMTP id aj6ls2288393igc.2.gmail; Mon, 25 Jun
2012 10:57:14 -0700 (PDT)
Received: by 10.50.173.34 with SMTP id bh2mr8720831igc.0.1340647034244;
Mon, 25 Jun 2012 10:57:14 -0700 (PDT)
Received: by 10.50.100.229 with SMTP id fb5msigb;
Sun, 24 Jun 2012 20:37:57 -0700 (PDT)
Received: by 10.68.237.67 with SMTP id va3mr1179956pbc.9.1340595477593;
Sun, 24 Jun 2012 20:37:57 -0700 (PDT)
Date: Sun, 24 Jun 2012 20:37:56 -0700 (PDT)
From: adistantshipssm...@gmail.com
To: ektorp-discuss@googlegroups.com
Message-Id: <45e87743-7a7e-40e7-bc52-f14af7a6402b@googlegroups.com>
In-Reply-To: <CAE2t7boYmiM4sbL9SCVmnz5Rbxkr4g6m5LHRMCOs_5Xm0ysZ2g@mail.gmail.com>
References: <400b758c-d424-43f8-9319-c981b2787aa6@n12g2000yqh.googlegroups.com>
<CAC1pAWrHx972uSt9Dt-pgHEuHqbFwXXjcKKaGdpJ2vFVcaahQA@mail.gmail.com>
<2eccf9e1-1ddd-42f2-b74a-89726f8d87d4@n12g2000yqh.googlegroups.com>
<CAC1pAWpecNBxLoYHFSakfhevbCy4goBOunHxUu9RaSUx8KC1GQ@mail.gmail.com>
<1e9ada15-45f0-4e19-a55b-a432a1d10dcc@t11g2000yqk.googlegroups.com>
<dc94930b-4dbc-4885-b549-05adfac84f20@googlegroups.com>
<CAE2t7boYmiM4sbL9SCVmnz5Rbxkr4g6m5LHRMCOs_5Xm0ysZ2g@mail.gmail.com>
Subject: Re: java.lang.NoSuchMethodError: org.apache.http.conn.scheme.Scheme
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_1107_17733785.1340595476668"
------=_Part_1107_17733785.1340595476668
Content-Type: multipart/alternative;
boundary="----=_Part_1108_1452691.1340595476672"
------=_Part_1108_1452691.1340595476672
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
The exception is thrown by the build method when I instantiate
StdHttpClient.
authClient = new StdHttpClient.Builder()
.url("...")
.username("xxx")
.password("xx")
*.build();*
*
*
06-24 20:36:14.986: E/AndroidRuntime(22375): java.lang.NoSuchMethodError:
org.apache.http.conn.scheme.Scheme.<init>
06-24 20:36:14.986: E/AndroidRuntime(22375): at
org.ektorp.http.StdHttpClient$Builder.configureScheme(StdHttpClient.java:283)
06-24 20:36:14.986: E/AndroidRuntime(22375): at
org.ektorp.http.StdHttpClient$Builder.configureConnectionManager(StdHttpClient.java:235)
06-24 20:36:14.986: E/AndroidRuntime(22375): at
org.ektorp.http.StdHttpClient$Builder.configureClient(StdHttpClient.java:306)
06-24 20:36:14.986: E/AndroidRuntime(22375): at
org.ektorp.http.StdHttpClient$Builder.build(StdHttpClient.java:427)
06-24 20:36:14.986: E/AndroidRuntime(22375): at
com.yourteam.SignInInit.initializeTouchhDB(SignInInit.java:189)
06-24 20:36:14.986: E/AndroidRuntime(22375): at
com.yourteam.SignInInit.onActivityResult(SignInInit.java:68)
06-24 20:36:14.986: E/AndroidRuntime(22375): at
android.app.Activity.dispatchActivityResult(Activity.java:4053)
06-24 20:36:14.986: E/AndroidRuntime(22375): at
android.app.ActivityThread.deliverResults(ActivityThread.java:2970)
06-24 20:36:14.986: E/AndroidRuntime(22375): at
android.app.ActivityThread.handleSendResult(ActivityThread.java:3026)
06-24 20:36:14.986: E/AndroidRuntime(22375): at
android.app.ActivityThread.access$2000(ActivityThread.java:135)
06-24 20:36:14.986: E/AndroidRuntime(22375): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1071)
06-24 20:36:14.986: E/AndroidRuntime(22375): at
android.os.Handler.dispatchMessage(Handler.java:99)
06-24 20:36:14.986: E/AndroidRuntime(22375): at
android.os.Looper.loop(Looper.java:150)
06-24 20:36:14.986: E/AndroidRuntime(22375): at
android.app.ActivityThread.main(ActivityThread.java:4333)
06-24 20:36:14.986: E/AndroidRuntime(22375): at
java.lang.reflect.Method.invokeNative(Native Method)
06-24 20:36:14.986: E/AndroidRuntime(22375): at
java.lang.reflect.Method.invoke(Method.java:507)
06-24 20:36:14.986: E/AndroidRuntime(22375): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
06-24 20:36:14.986: E/AndroidRuntime(22375): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
06-24 20:36:14.986: E/AndroidRuntime(22375): at
dalvik.system.NativeStart.main(Native Method)
On Sunday, June 24, 2012 10:26:38 AM UTC-7, Marty Schoch wrote:
>
> Are you using the TouchDB-Android-Ektorp adapter, or are you using the
> HTTP Listener (TouchDB-Android-Listener) and connecting to that with
> AndroidHttpClient?
>
> marty
>
> On Sun, Jun 24, 2012 at 12:04 AM, wrote:
> > Marc,
> >
> > Running into the same error. Were you able to resolve it by changing
> your
> > Ektorp version? At the time of your posting I believe the stable release
> was
> > 1.2.1; I'm getting the error using 1.2.2. Fyi, I'm using TouchDB.
> >
> > Thanks,
> > Matt
> >
> > On Tuesday, October 11, 2011 3:53:20 AM UTC-7, Marc Esher wrote:
> >>
> >> Excellent. Thanks!
> >>
> >> On Oct 11, 2:58 am, Henrik Lundgren <carl.henrik.lundg...@gmail.com>
> >> wrote:
> >> > Your problem is related to the fact that android comes bundled with a
> >> > fork of http client 4.0.x.
> >> > Ektorp 1.2.1 has upgraded to 4.1.1 which is not compatoble with
> 4.0.x.
> >> > You could either try to use Ektorp 1.1.1 or the 1.2.2-SNAPSHOT that
> >> > comes with better android support.
> >> >
> >> > /H
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > On Tue, Oct 11, 2011 at 2:33 AM, Marc Esher <marc.es...@gmail.com>
> >> > wrote:
> >> > > Hi Henrik,
> >> >
> >> > > I'm hitting the same error, though in an Android project. I'm
> using
> >> > > ektorp 1.2.1, and I've tried httpclient 4.1.1 and 4.1.2.
> >> >
> >> > > It's throwing:
> >> >
> >> > > 10-10 20:23:22.201: ERROR/AndroidRuntime(6503):
> >> > >java.lang.NoSuchMethodError:
> org.apache.http.conn.scheme.Scheme.<init>
> >> > > 10-10 20:23:22.201: ERROR/AndroidRuntime(6503): at
> >> > > org.ektorp.http.StdHttpClient
> >> > > $Builder.configureScheme(StdHttpClient.java:289)
> >> > > 10-10 20:23:22.201: ERROR/AndroidRuntime(6503): at
> >> > > org.ektorp.http.StdHttpClient
> >> > > $Builder.configureConnectionManager(StdHttpClient.java:232)
> >> > > 10-10 20:23:22.201: ERROR/AndroidRuntime(6503): at
> >> > > org.ektorp.http.StdHttpClient
> >> > > $Builder.configureClient(StdHttpClient.java:312)
> >> > > 10-10 20:23:22.201: ERROR/AndroidRuntime(6503): at
> >> > > org.ektorp.http.StdHttpClient$Builder.build(StdHttpClient.java:433)
> >> >
> >> > > Prior to that, I get this rather nasty business (below). I'm new to
> >> > > Android dev so perhaps this is all run of the mill.
> >> >
> >> > > Thoughts?
> >> >
> >> > > Thanks!
> >> >
> >> > > Marc
> >> >
> >> > > 10-10 20:23:22.107: INFO/dalvikvm(6503): Could not find method
> >> > > org.apache.http.conn.ssl.SSLSocketFactory.<init>, referenced from
> >> > > method org.ektorp.http.StdHttpClient$Builder.configureScheme
> >> > > 10-10 20:23:22.107: WARN/dalvikvm(6503): VFY: unable to resolve
> direct
> >> > > method 3603: Lorg/apache/http/conn/ssl/SSLSocketFactory;.<init>
> >> > > (Ljavax/net/ssl/SSLContext;Lorg/apache/http/conn/ssl/
> >> > > X509HostnameVerifier;)V
> >> > > 10-10 20:23:22.107: DEBUG/dalvikvm(6503): VFY: replacing opcode
> 0x70
> >> > > at 0x002a
> >> > > 10-10 20:23:22.115: INFO/dalvikvm(6503): Could not find method
> >> > > org.apache.http.conn.scheme.Scheme.<init>, referenced from method
> >> > > org.ektorp.http.StdHttpClient$Builder.configureScheme
> >> > > 10-10 20:23:22.115: WARN/dalvikvm(6503): VFY: unable to resolve
> direct
> >> > > method 3534: Lorg/apache/http/conn/scheme/Scheme;.<init>
> (Ljava/lang/
> >> > > String;ILorg/apache/http/conn/scheme/SchemeSocketFactory;)V
> >> > > 10-10 20:23:22.115: DEBUG/dalvikvm(6503): VFY: replacing opcode
> 0x70
> >> > > at 0x0037
> >> > > 10-10 20:23:22.123: INFO/dalvikvm(6503): Could not find method
> >> > > org.apache.http.conn.ssl.SSLSocketFactory.<init>, referenced from
> >> > > method org.ektorp.http.StdHttpClient$Builder.configureScheme
> >> > > 10-10 20:23:22.123: WARN/dalvikvm(6503): VFY: unable to resolve
> direct
> >> > > method 3601: Lorg/apache/http/conn/ssl/SSLSocketFactory;.<init>
> >> > > (Ljavax/net/ssl/SSLContext;)V
> >> > > 10-10 20:23:22.123: DEBUG/dalvikvm(6503): VFY: replacing opcode
> 0x70
> >> > > at 0x003d
> >> > > 10-10 20:23:22.130: INFO/dalvikvm(6503): Could not find method
> >> > > org.apache.http.conn.scheme.Scheme.<init>, referenced from method
> >> > > org.ektorp.http.StdHttpClient$Builder.configureScheme
> >> > > 10-10 20:23:22.130: WARN/dalvikvm(6503): VFY: unable to resolve
> direct
> >> > > method 3534: Lorg/apache/http/conn/scheme/Scheme;.<init>
> (Ljava/lang/
> >> > > String;ILorg/apache/http/conn/scheme/SchemeSocketFactory;)V
> >> > > 10-10 20:23:22.130: DEBUG/dalvikvm(6503): VFY: replacing opcode
> 0x70
> >> > > at 0x0072
> >> > > 10-10 20:23:22.130: DEBUG/dalvikvm(6503): VFY: dead code
> 0x002d-002e
> >> > > in Lorg/ektorp/http/StdHttpClient$Builder;.configureScheme ()Lorg/
> >> > > apache/http/conn/scheme/Scheme;
> >> > > 10-10 20:23:22.130: DEBUG/dalvikvm(6503): VFY: dead code
> 0x0040-0040
> >> > > in Lorg/ektorp/http/StdHttpClient$Builder;.configureScheme ()Lorg/
> >> > > apache/http/conn/scheme/Scheme;
> >> > > 10-10 20:23:22.130: DEBUG/dalvikvm(6503): VFY: dead code
> 0x0075-0075
> >> > > in Lorg/ektorp/http/StdHttpClient$Builder;.configureScheme ()Lorg/
> >> > > apache/http/conn/scheme/Scheme;
> >> > > 10-10 20:23:22.146: ERROR/dalvikvm(6503): Could not find class
> >> > > 'org.apache.http.impl.client.cache.CacheConfig', referenced from
> >> > > method org.ektorp.http.StdHttpClient$Builder.build
> >> > > 10-10 20:23:22.146: WARN/dalvikvm(6503): VFY: unable to resolve
> new-
> >> > > instance 737 (Lorg/apache/http/impl/client/cache/CacheConfig;) in
> >> > > Lorg/
> >> > > ektorp/http/StdHttpClient$Builder;
> >> > > 10-10 20:23:22.146: DEBUG/dalvikvm(6503): VFY: replacing opcode
> 0x22
> >> > > at 0x0009
> >> > > 10-10 20:23:22.146: DEBUG/dalvikvm(6503): VFY: dead code
> 0x000b-001c
> >> > > in Lorg/ektorp/http/StdHttpClient$Builder;.build
> ()Lorg/ektorp/http/
> >> > > HttpClient;
> >> > > 10-10 20:23:22.154: INFO/dalvikvm(6503): Could not find method
> >> > > org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager.<init>,
> >> > > referenced from method org.ektorp.http.StdHttpClient
> >> > > $Builder.configureConnectionManager
> >> > > 10-10 20:23:22.154: WARN/dalvikvm(6503): VFY: unable to resolve
> direct
> >> > > method 4385: Lorg/apache/http/impl/conn/tsccm/
> >> > > ThreadSafeClientConnManager;.<init> (Lorg/apache/http/conn/scheme/
> >> > > SchemeRegistry;)V
> >> > > 10-10 20:23:22.162: DEBUG/dalvikvm(6503): VFY: replacing opcode
> 0x70
> >> > > at 0x0012
> >> > > 10-10 20:23:22.162: DEBUG/dalvikvm(6503): VFY: dead code
> 0x0015-0020
> >> > > in
> Lorg/ektorp/http/StdHttpClient$Builder;.configureConnectionManager
> >> > > (Lorg/apache/http/params/HttpParams;)Lorg/apache/http/conn/
> >> > > ClientConnectionManager;
> >> > > 10-10 20:23:22.177: DEBUG/AndroidRuntime(6503): Shutting down VM
> >> > > 10-10 20:23:22.177: WARN/dalvikvm(6503): threadid=1: thread exiting
> >> > > with uncaught exception (group=0x400208b0)
> >> > > 10-10 20:23:22.201: ERROR/AndroidRuntime(6503): FATAL EXCEPTION:
> main
> >> > > 10-10 20:23:22.201: ERROR/AndroidRuntime(6503):
> >> > >java.lang.NoSuchMethodError:
> org.apache.http.conn.scheme.Scheme.<init>
> >> > > 10-10 20:23:22.201: ERROR/AndroidRuntime(6503): at
> >> > > org.ektorp.http.StdHttpClient
> >> > > $Builder.configureScheme(StdHttpClient.java:289)
> >> > > 10-10 20:23:22.201: ERROR/AndroidRuntime(6503): at
> >> > > org.ektorp.http.StdHttpClient
> >> > > $Builder.configureConnectionManager(StdHttpClient.java:232)
> >> > > 10-10 20:23:22.201: ERROR/AndroidRuntime(6503): at
> >> > > org.ektorp.http.StdHttpClient
> >> > > $Builder.configureClient(StdHttpClient.java:312)
> >> > > 10-10 20:23:22.201: ERROR/AndroidRuntime(6503): at
> >> > > org.ektorp.http.StdHttpClient$Builder.build(StdHttpClient.java:433)
> >> >
> >> > > On Oct 10, 7:42 am, Henrik Lundgren <carl.henrik.lundg...@gmail.com>
>
> >> > > wrote:
> >> > >> It looks like you have an old version of http client on your
> >> > >> classpath. (4.0.0?)
> >> > >> Verify that the classpath only contains httpclient-4.1.1.jar
> >> >
> >> > >> /Henrik
> >> >
> >> > >> On Sun, Oct 9, 2011 at 1:48 PM, Martijn van Iersel
> >> > >> <mvanier...@gmail.com> wrote:
> >> >
> >> > >> > Hi,
> >> >
> >> > >> > Could you please help me with a problem I'm having with Ektorp?
> I'm
> >> > >> > following the reference documentation, and I already have a
> problem
> >> > >> > with the first step, initializing a HttpClient.
> >> >
> >> > >> > This is my code:
> >> >
> >> > >> > public class TestCase
> >> > >> > {
> >> > >> > public static void main(String[] args) throws
> >> > >> > MalformedURLException
> >> > >> > {
> >> > >> > HttpClient client = new StdHttpClient.Builder()
> >> > >> > .url("http://localhost:5984")
> >> > >> > .build();
> >> > >> > }
> >> > >> > }
> >> >
> >> > >> > With that code I get the following exception:
> >> >
> >> > >> > Exception in thread "main"java.lang.NoSuchMethodError:
> >> > >> >
> org.apache.http.conn.scheme.Scheme.<init>(Ljava/lang/String;ILorg/
> >> > >> > apache/http/conn/scheme/SchemeSocketFactory;)V
> >> > >> > at org.ektorp.http.StdHttpClient
> >> > >> > $Builder.configureScheme(StdHttpClient.java:285)
> >> > >> > at org.ektorp.http.StdHttpClient
> >> > >> > $Builder.configureConnectionManager(StdHttpClient.java:236)
> >> > >> > at org.ektorp.http.StdHttpClient
> >> > >> > $Builder.configureClient(StdHttpClient.java:309)
> >> > >> > at
> >> > >> > org.ektorp.http.StdHttpClient$Builder.build(StdHttpClient.java:
> >> > >> > 429)
> >> > >> > at
> nl.helixsoft.ektorptest.TestCase.main(TestCase.java:14)
> >> >
> >> > >> > I'm using ektorp from today's git, with the following
> dependencies:
> >> >
> >> > >> > commons-codec-1.4.jar
> >> > >> > commons-io-2.0.1.jar
> >> > >> > commons-logging-1.1.1.jar
> >> > >> > httpclient-4.1.1.jar
> >> > >> > httpclient-cache-4.1.1.jar
> >> > >> > httpcore-4.1.jar
> >> > >> > jackson-core-asl-1.8.4.jar
> >> > >> > jackson-mapper-asl-1.8.4.jar
> >> > >> > joda-time-1.6.2.jar
> >> > >> > junit-4.8.2.jar
> >> > >> > mockito-all-1.8.5.jar
> >> > >> > slf4j-api-1.6.1.jar
> >> > >> > slf4j-simple-1.6.1.jar
> >> >
> >> > >> > I also tried changing the httpclient version to 4.1.2 but that
> >> > >> > didn't
> >> > >> > help. What am I doing wrong? Any suggestions how to troubleshoot
> >> > >> > this
> >> > >> > would be very welcome.
> >> >
> >> > >> > thanks in advance,
> >> > >> > Martijn
>
------=_Part_1108_1452691.1340595476672
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
The exception is thrown by the build method when I instantiate StdHttpClien=
t.<div><br></div><div><div>authClient =3D new StdHttpClient.Builder()</div>=
<div>.url("...")</div><div>.username("xxx")</div><div>.password("xx")</div>=
<div><b>.build();</b></div><div><b><br></b></div><div><div>06-24 20:36:14.9=
86: E/AndroidRuntime(22375): java.lang.NoSuchMethodError: org.apache.http.c=
onn.scheme.Scheme.<init></div><div>06-24 20:36:14.986: E/AndroidRunti=
me(22375): <span class=3D"Apple-tab-span" style=3D"white-space:pre">=09</sp=
an>at org.ektorp.http.StdHttpClient$Builder.configureScheme(StdHttpClient.j=
ava:283)</div><div>06-24 20:36:14.986: E/AndroidRuntime(22375): <span class=
=3D"Apple-tab-span" style=3D"white-space:pre">=09</span>at org.ektorp.http.=
StdHttpClient$Builder.configureConnectionManager(StdHttpClient.java:235)</d=
iv><div>06-24 20:36:14.986: E/AndroidRuntime(22375): <span class=3D"Apple-t=
ab-span" style=3D"white-space:pre">=09</span>at org.ektorp.http.StdHttpClie=
nt$Builder.configureClient(StdHttpClient.java:306)</div><div>06-24 20:36:14=
.986: E/AndroidRuntime(22375): <span class=3D"Apple-tab-span" style=3D"whit=
e-space:pre">=09</span>at org.ektorp.http.StdHttpClient$Builder.build(StdHt=
tpClient.java:427)</div><div>06-24 20:36:14.986: E/AndroidRuntime(22375): <=
span class=3D"Apple-tab-span" style=3D"white-space:pre">=09</span>at com.yo=
urteam.SignInInit.initializeTouchhDB(SignInInit.java:189)</div><div>06-24 2=
0:36:14.986: E/AndroidRuntime(22375): <span class=3D"Apple-tab-span" style=
=3D"white-space:pre">=09</span>at com.yourteam.SignInInit.onActivityResult(=
SignInInit.java:68)</div><div>06-24 20:36:14.986: E/AndroidRuntime(22375): =
<span class=3D"Apple-tab-span" style=3D"white-space:pre">=09</span>at andro=
id.app.Activity.dispatchActivityResult(Activity.java:4053)</div><div>06-24 =
20:36:14.986: E/AndroidRuntime(22375): <span class=3D"Apple-tab-span" style=
=3D"white-space:pre">=09</span>at android.app.ActivityThread.deliverResults=
(ActivityThread.java:2970)</div><div>06-24 20:36:14.986: E/AndroidRuntime(2=
2375): <span class=3D"Apple-tab-span" style=3D"white-space:pre">=09</span>a=
t android.app.ActivityThread.handleSendResult(ActivityThread.java:3026)</di=
v><div>06-24 20:36:14.986: E/AndroidRuntime(22375): <span class=3D"Apple-ta=
b-span" style=3D"white-space:pre">=09</span>at android.app.ActivityThread.a=
ccess$2000(ActivityThread.java:135)</div><div>06-24 20:36:14.986: E/Android=
Runtime(22375): <span class=3D"Apple-tab-span" style=3D"white-space:pre">=
=09</span>at android.app.ActivityThread$H.handleMessage(ActivityThread.java=
:1071)</div><div>06-24 20:36:14.986: E/AndroidRuntime(22375): <span class=
=3D"Apple-tab-span" style=3D"white-space:pre">=09</span>at android.os.Handl=
er.dispatchMessage(Handler.java:99)</div><div>06-24 20:36:14.986: E/Android=
Runtime(22375): <span class=3D"Apple-tab-span" style=3D"white-space:pre">=
=09</span>at android.os.Looper.loop(Looper.java:150)</div><div>06-24 20:36:=
14.986: E/AndroidRuntime(22375): <span class=3D"Apple-tab-span" style=3D"wh=
ite-space:pre">=09</span>at android.app.ActivityThread.main(ActivityThread.=
java:4333)</div><div>06-24 20:36:14.986: E/AndroidRuntime(22375): <span cla=
ss=3D"Apple-tab-span" style=3D"white-space:pre">=09</span>at java.lang.refl=
ect.Method.invokeNative(Native Method)</div><div>06-24 20:36:14.986: E/Andr=
oidRuntime(22375): <span class=3D"Apple-tab-span" style=3D"white-space:pre"=
>=09</span>at java.lang.reflect.Method.invoke(Method.java:507)</div><div>06=
-24 20:36:14.986: E/AndroidRuntime(22375): <span class=3D"Apple-tab-span" s=
tyle=3D"white-space:pre">=09</span>at com.android.internal.os.ZygoteInit$Me=
thodAndArgsCaller.run(ZygoteInit.java:839)</div><div>06-24 20:36:14.986: E/=
AndroidRuntime(22375): <span class=3D"Apple-tab-span" style=3D"white-space:=
pre">=09</span>at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:5=
97)</div><div>06-24 20:36:14.986: E/AndroidRuntime(22375): <span class=3D"A=
pple-tab-span" style=3D"white-space:pre">=09</span>at dalvik.system.NativeS=
tart.main(Native Method)</div><div style=3D"font-weight: bold; "><br></div>=
</div><br>On Sunday, June 24, 2012 10:26:38 AM UTC-7, Marty Schoch wrote:<b=
lockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;borde=
r-left: 1px #ccc solid;padding-left: 1ex;">Are you using the TouchDB-Androi=
d-Ektorp adapter, or are you using the
<br>HTTP Listener (TouchDB-Android-Listener) and connecting to that with
<br>AndroidHttpClient?
<br>
<br>marty
<br>
<br>On Sun, Jun 24, 2012 at 12:04 AM, wrote:
<br>> Marc,
<br>>
<br>> Running into the same error. Were you able to resolve it by changi=
ng your
<br>> Ektorp version? At the time of your posting I believe the stable r=
elease was
<br>> 1.2.1; I'm getting the error using 1.2.2. Fyi, I'm using TouchDB.
<br>>
<br>> Thanks,
<br>> Matt
<br>>
<br>> On Tuesday, October 11, 2011 3:53:20 AM UTC-7, Marc Esher wrote:
<br>>>
<br>>> Excellent. Thanks!
<br>>>
<br>>> On Oct 11, 2:58 am, Henrik Lundgren <<a>carl.henrik.lu=
ndg...@gmail.<wbr>com</a>>
<br>>> wrote:
<br>>> > Your problem is related to the fact that android comes bu=
ndled with a
<br>>> > fork of http client 4.0.x.
<br>>> > Ektorp 1.2.1 has upgraded to 4.1.1 which is not compatobl=
e with 4.0.x.
<br>>> > You could either try to use Ektorp 1.1.1 or the 1.2.2-SNA=
PSHOT that
<br>>> > comes with better android support.
<br>>> >
<br>>> > /H
<br>>> >
<br>>> >
<br>>> >
<br>>> >
<br>>> >
<br>>> >
<br>>> >
<br>>> > On Tue, Oct 11, 2011 at 2:33 AM, Marc Esher <<a>marc.e=
s...@gmail.com</a>>
<br>>> > wrote:
<br>>> > > Hi Henrik,
<br>>> >
<br>>> > > I'm hitting the same error, though in an Andro=
id project. I'm using
<br>>> > > ektorp 1.2.1, and I've tried httpclient 4.1.1 and 4.=
1.2.
<br>>> >
<br>>> > > It's throwing:
<br>>> >
<br>>> > > 10-10 20:23:22.201: ERROR/AndroidRuntime(6503):
<br>>> > >java.lang.NoSuchMethodError: org.apache.http.conn.sch=
eme.<wbr>Scheme.<init>
<br>>> > > 10-10 20:23:22.201: ERROR/AndroidRuntime(6503): &nbs=
p; at
<br>>> > > org.ektorp.http.StdHttpClient
<br>>> > > $Builder.configureScheme(<wbr>StdHttpClient.java:289=
)
<br>>> > > 10-10 20:23:22.201: ERROR/AndroidRuntime(6503): &nbs=
p; at
<br>>> > > org.ektorp.http.StdHttpClient
<br>>> > > $Builder.<wbr>configureConnectionManager(<wbr>StdHtt=
pClient.java:232)
<br>>> > > 10-10 20:23:22.201: ERROR/AndroidRuntime(6503): &nbs=
p; at
<br>>> > > org.ektorp.http.StdHttpClient
<br>>> > > $Builder.configureClient(<wbr>StdHttpClient.java:312=
)
<br>>> > > 10-10 20:23:22.201: ERROR/AndroidRuntime(6503): &nbs=
p; at
<br>>> > > org.ektorp.http.StdHttpClient$<wbr>Builder.build(Std=
HttpClient.<wbr>java:433)
<br>>> >
<br>>> > > Prior to that, I get this rather nasty business (bel=
ow). I'm new to
<br>>> > > Android dev so perhaps this is all run of the mill.
<br>>> >
<br>>> > > Thoughts?
<br>>> >
<br>>> > > Thanks!
<br>>> >
<br>>> > > Marc
<br>>> >
<br>>> > > 10-10 20:23:22.107: INFO/dalvikvm(6503): Could not f=
ind method
<br>>> > > org.apache.http.conn.ssl.<wbr>SSLSocketFactory.<i=
nit>, referenced from
<br>>> > > method org.ektorp.http.StdHttpClient$<wbr>Builder.co=
nfigureScheme
<br>>> > > 10-10 20:23:22.107: WARN/dalvikvm(6503): VFY: unable=
to resolve direct
<br>>> > > method 3603: Lorg/apache/http/conn/ssl/<wbr>SSLSocke=
tFactory;.<init>
<br>>> > > (Ljavax/net/ssl/SSLContext;<wbr>Lorg/apache/http/con=
n/ssl/
<br>>> > > X509HostnameVerifier;)V
<br>>> > > 10-10 20:23:22.107: DEBUG/dalvikvm(6503): VFY: repla=
cing opcode 0x70
<br>>> > > at 0x002a
<br>>> > > 10-10 20:23:22.115: INFO/dalvikvm(6503): Could not f=
ind method
<br>>> > > org.apache.http.conn.scheme.<wbr>Scheme.<init>=
, referenced from method
<br>>> > > org.ektorp.http.StdHttpClient$<wbr>Builder.configure=
Scheme
<br>>> > > 10-10 20:23:22.115: WARN/dalvikvm(6503): VFY: unable=
to resolve direct
<br>>> > > method 3534: Lorg/apache/http/conn/scheme/<wbr>Schem=
e;.<init> (Ljava/lang/
<br>>> > > String;ILorg/apache/http/conn/<wbr>scheme/SchemeSock=
etFactory;)V
<br>>> > > 10-10 20:23:22.115: DEBUG/dalvikvm(6503): VFY: repla=
cing opcode 0x70
<br>>> > > at 0x0037
<br>>> > > 10-10 20:23:22.123: INFO/dalvikvm(6503): Could not f=
ind method
<br>>> > > org.apache.http.conn.ssl.<wbr>SSLSocketFactory.<i=
nit>, referenced from
<br>>> > > method org.ektorp.http.StdHttpClient$<wbr>Builder.co=
nfigureScheme
<br>>> > > 10-10 20:23:22.123: WARN/dalvikvm(6503): VFY: unable=
to resolve direct
<br>>> > > method 3601: Lorg/apache/http/conn/ssl/<wbr>SSLSocke=
tFactory;.<init>
<br>>> > > (Ljavax/net/ssl/SSLContext;)V
<br>>> > > 10-10 20:23:22.123: DEBUG/dalvikvm(6503): VFY: repla=
cing opcode 0x70
<br>>> > > at 0x003d
<br>>> > > 10-10 20:23:22.130: INFO/dalvikvm(6503): Could not f=
ind method
<br>>> > > org.apache.http.conn.scheme.<wbr>Scheme.<init>=
, referenced from method
<br>>> > > org.ektorp.http.StdHttpClient$<wbr>Builder.configure=
Scheme
<br>>> > > 10-10 20:23:22.130: WARN/dalvikvm(6503): VFY: unable=
to resolve direct
<br>>> > > method 3534: Lorg/apache/http/conn/scheme/<wbr>Schem=
e;.<init> (Ljava/lang/
<br>>> > > String;ILorg/apache/http/conn/<wbr>scheme/SchemeSock=
etFactory;)V
<br>>> > > 10-10 20:23:22.130: DEBUG/dalvikvm(6503): VFY: repla=
cing opcode 0x70
<br>>> > > at 0x0072
<br>>> > > 10-10 20:23:22.130: DEBUG/dalvikvm(6503): VFY: dead =
code 0x002d-002e
<br>>> > > in Lorg/ektorp/http/<wbr>StdHttpClient$Builder;.<wbr=
>configureScheme ()Lorg/
<br>>> > > apache/http/conn/scheme/<wbr>Scheme;
<br>>> > > 10-10 20:23:22.130: DEBUG/dalvikvm(6503): VFY: dead =
code 0x0040-0040
<br>>> > > in Lorg/ektorp/http/<wbr>StdHttpClient$Builder;.<wbr=
>configureScheme ()Lorg/
<br>>> > > apache/http/conn/scheme/<wbr>Scheme;
<br>>> > > 10-10 20:23:22.130: DEBUG/dalvikvm(6503): VFY: dead =
code 0x0075-0075
<br>>> > > in Lorg/ektorp/http/<wbr>StdHttpClient$Builder;.<wbr=
>configureScheme ()Lorg/
<br>>> > > apache/http/conn/scheme/<wbr>Scheme;
<br>>> > > 10-10 20:23:22.146: ERROR/dalvikvm(6503): Could not =
find class
<br>>> > > 'org.apache.http.impl.client.<wbr>cache.CacheConfig'=
, referenced from
<br>>> > > method org.ektorp.http.StdHttpClient$<wbr>Builder.bu=
ild
<br>>> > > 10-10 20:23:22.146: WARN/dalvikvm(6503): VFY: unable=
to resolve new-
<br>>> > > instance 737 (Lorg/apache/http/impl/client/<wbr>cach=
e/CacheConfig;) in
<br>>> > > Lorg/
<br>>> > > ektorp/http/StdHttpClient$<wbr>Builder;
<br>>> > > 10-10 20:23:22.146: DEBUG/dalvikvm(6503): VFY: repla=
cing opcode 0x22
<br>>> > > at 0x0009
<br>>> > > 10-10 20:23:22.146: DEBUG/dalvikvm(6503): VFY: dead =
code 0x000b-001c
<br>>> > > in Lorg/ektorp/http/<wbr>StdHttpClient$Builder;.buil=
d ()Lorg/ektorp/http/
<br>>> > > HttpClient;
<br>>> > > 10-10 20:23:22.154: INFO/dalvikvm(6503): Could not f=
ind method
<br>>> > > org.apache.http.impl.conn.<wbr>tsccm.<wbr>ThreadSafe=
ClientConnManager.<<wbr>init>,
<br>>> > > referenced from method org.ektorp.http.StdHttpClient
<br>>> > > $Builder.<wbr>configureConnectionManager
<br>>> > > 10-10 20:23:22.154: WARN/dalvikvm(6503): VFY: unable=
to resolve direct
<br>>> > > method 4385: Lorg/apache/http/impl/conn/<wbr>tsccm/
<br>>> > > ThreadSafeClientConnManager;.<<wbr>init> (Lorg=
/apache/http/conn/scheme/
<br>>> > > SchemeRegistry;)V
<br>>> > > 10-10 20:23:22.162: DEBUG/dalvikvm(6503): VFY: repla=
cing opcode 0x70
<br>>> > > at 0x0012
<br>>> > > 10-10 20:23:22.162: DEBUG/dalvikvm(6503): VFY: dead =
code 0x0015-0020
<br>>> > > in Lorg/ektorp/http/<wbr>StdHttpClient$Builder;.<wbr=
>configureConnectionManager
<br>>> > > (Lorg/apache/http/params/<wbr>HttpParams;)Lorg/apach=
e/http/<wbr>conn/
<br>>> > > ClientConnectionManager;
<br>>> > > 10-10 20:23:22.177: DEBUG/AndroidRuntime(6503): Shut=
ting down VM
<br>>> > > 10-10 20:23:22.177: WARN/dalvikvm(6503): threadid=3D=
1: thread exiting
<br>>> > > with uncaught exception (group=3D0x400208b0)
<br>>> > > 10-10 20:23:22.201: ERROR/AndroidRuntime(6503): FATA=
L EXCEPTION: main
<br>>> > > 10-10 20:23:22.201: ERROR/AndroidRuntime(6503):
<br>>> > >java.lang.NoSuchMethodError: org.apache.http.conn.sch=
eme.<wbr>Scheme.<init>
<br>>> > > 10-10 20:23:22.201: ERROR/AndroidRuntime(6503): &nbs=
p; at
<br>>> > > org.ektorp.http.StdHttpClient
<br>>> > > $Builder.configureScheme(<wbr>StdHttpClient.java:289=
)
<br>>> > > 10-10 20:23:22.201: ERROR/AndroidRuntime(6503): &nbs=
p; at
<br>>> > > org.ektorp.http.StdHttpClient
<br>>> > > $Builder.<wbr>configureConnectionManager(<wbr>StdHtt=
pClient.java:232)
<br>>> > > 10-10 20:23:22.201: ERROR/AndroidRuntime(6503): &nbs=
p; at
<br>>> > > org.ektorp.http.StdHttpClient
<br>>> > > $Builder.configureClient(<wbr>StdHttpClient.java:312=
)
<br>>> > > 10-10 20:23:22.201: ERROR/AndroidRuntime(6503): &nbs=
p; at
<br>>> > > org.ektorp.http.StdHttpClient$<wbr>Builder.build(Std=
HttpClient.<wbr>java:433)
<br>>> >
<br>>> > > On Oct 10, 7:42 am, Henrik Lundgren <<a>carl=
.henrik.lundg...@gmail.<wbr>com</a>>
<br>>> > > wrote:
<br>>> > >> It looks like you have an old version of http cl=
ient on your
<br>>> > >> classpath. (4.0.0?)
<br>>> > >> Verify that the classpath only contains httpclie=
nt-4.1.1.jar
<br>>> >
<br>>> > >> /Henrik
<br>>> >
<br>>> > >> On Sun, Oct 9, 2011 at 1:48 PM, Martijn van Iers=
el
<br>>> > >> <<a>mvanier...@gmail.com</a>> wrote:
<br>>> >
<br>>> > >> > Hi,
<br>>> >
<br>>> > >> > Could you please help me with a problem I'm=
having with Ektorp? I'm
<br>>> > >> > following the reference documentation, and =
I already have a problem
<br>>> > >> > with the first step, initializing a HttpCli=
ent.
<br>>> >
<br>>> > >> > This is my code:
<br>>> >
<br>>> > >> > public class TestCase
<br>>> > >> > {
<br>>> > >> > public static vo=
id main(String[] args) throws
<br>>> > >> > MalformedURLException
<br>>> > >> > {
<br>>> > >> > &=
nbsp; HttpClient client =3D new StdHttpClient.Builder()
<br>>> > >> > .url("<a href=3D=
"http://localhost:5984" target=3D"_blank">http://localhost:5984</a>")
<br>>> > >> > .build();
<br>>> > >> > }
<br>>> > >> > }
<br>>> >
<br>>> > >> > With that code I get the following exceptio=
n:
<br>>> >
<br>>> > >> > Exception in thread "main"java.lang.<wbr>No=
SuchMethodError:
<br>>> > >> > org.apache.http.conn.scheme.<wbr>Scheme.<=
;init>(Ljava/lang/<wbr>String;ILorg/
<br>>> > >> > apache/http/conn/scheme/<wbr>SchemeSocketFa=
ctory;)V
<br>>> > >> > at org.ektorp.ht=
tp.StdHttpClient
<br>>> > >> > $Builder.configureScheme(<wbr>StdHttpClient=
.java:285)
<br>>> > >> > at org.ektorp.ht=
tp.StdHttpClient
<br>>> > >> > $Builder.<wbr>configureConnectionManager(<w=
br>StdHttpClient.java:236)
<br>>> > >> > at org.ektorp.ht=
tp.StdHttpClient
<br>>> > >> > $Builder.configureClient(<wbr>StdHttpClient=
.java:309)
<br>>> > >> > at
<br>>> > >> > org.ektorp.http.StdHttpClient$<wbr>Builder.=
build(StdHttpClient.<wbr>java:
<br>>> > >> > 429)
<br>>> > >> > at nl.helixsoft.=
ektorptest.<wbr>TestCase.main(TestCase.java:<wbr>14)
<br>>> >
<br>>> > >> > I'm using ektorp from today's git, with the=
following dependencies:
<br>>> >
<br>>> > >> > commons-codec-1.4.jar
<br>>> > >> > commons-io-2.0.1.jar
<br>>> > >> > commons-logging-1.1.1.jar
<br>>> > >> > httpclient-4.1.1.jar
<br>>> > >> > httpclient-cache-4.1.1.jar
<br>>> > >> > httpcore-4.1.jar
<br>>> > >> > jackson-core-asl-1.8.4.jar
<br>>> > >> > jackson-mapper-asl-1.8.4.jar
<br>>> > >> > joda-time-1.6.2.jar
<br>>> > >> > junit-4.8.2.jar
<br>>> > >> > mockito-all-1.8.5.jar
<br>>> > >> > slf4j-api-1.6.1.jar
<br>>> > >> > slf4j-simple-1.6.1.jar
<br>>> >
<br>>> > >> > I also tried changing the httpclient versio=
n to 4.1.2 but that
<br>>> > >> > didn't
<br>>> > >> > help. What am I doing wrong? Any suggestion=
s how to troubleshoot
<br>>> > >> > this
<br>>> > >> > would be very welcome.
<br>>> >
<br>>> > >> > thanks in advance,
<br>>> > >> > Martijn
<br></blockquote></div>
------=_Part_1108_1452691.1340595476672--
------=_Part_1107_17733785.1340595476668--