Hi Ajay, The httpclient team has recompiled httpclient using only the JDK 1.2.2 and they have posted the new jar on http://www.apache.org/~mbecke/httpclient-2.0-rc2/. Could you try it?
I've attached their email. Thanks -Vincent > -----Original Message----- > From: Govindarajan, Ajay [mailto:[EMAIL PROTECTED] > Sent: 29 October 2003 00:06 > To: 'Cactus Users List' > Subject: RE: cactus-13-1.5-rc and commons-httpclient-2.0-rc2.jar works on > jdk1.4 and above only? > > I checked and there is no older version of the commons-httpclient in my > client classpath. > > Also the statck trace indicates that the java.lang.NoSuchMethodError is > thrown at > org.apache.commons.httpclient.HttpState.toString(HttpState.java:634), > which > means that some method invokation in the toString method is broken. > > I downloaded the source code and this is the relevant bit of the source > code: > > > /** > * Returns a string representation of this HTTP state. > * > * @return The string representation of the HTTP state. > * > * @see java.lang.Object#toString() > */ > public synchronized String toString() { > StringBuffer sbResult = new StringBuffer(); > > sbResult.append("["); > > sbResult.append(getProxyCredentialsStringRepresentation(proxyCred)); > // this is the broken line > sbResult.append(" | "); > sbResult.append(getCredentialsStringRepresentation(proxyCred)); > sbResult.append(" | "); > sbResult.append(getCookiesStringRepresentation(cookies)); > sbResult.append("]"); > > String strResult = sbResult.toString(); > > return strResult; > } > > /** > * Returns a string representation of the proxy credentials > * @param proxyCredMap The proxy credentials > * @return StringBuffer The string representation. > */ > private static StringBuffer > getProxyCredentialsStringRepresentation(final Map proxyCredMap) { > StringBuffer sbResult = new StringBuffer(); > Iterator iter = proxyCredMap.keySet().iterator(); > while (iter.hasNext()) { > Object key = iter.next(); > Credentials cred = (Credentials) proxyCredMap.get(key); > if (sbResult.length() > 0) { > sbResult.append(", "); > } > sbResult.append(key); > sbResult.append("#"); > sbResult.append(cred.toString()); > } > return sbResult; > } > > > The 3rd line in the toString() method uses > StringBuffer.append(StringBuffer > sb), that's the problem. I have also attached the source code for the > file, > you can verify that. > > thanks, > > ajay > > > > > > -----Original Message----- > > From: Vincent Massol [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, October 28, 2003 2:15 PM > > To: 'Cactus Users List' > > Subject: RE: cactus-13-1.5-rc and commons-httpclient-2.0-rc2.jar works > > on jdk1.4 and above only? > > > > > > Hi Ajay, > > > > Here's the answer from Oleg from the Httpclient team (see > > attached). Ok > > let's now try to fix your problem. The stack trace says that the > > toString() method is not found. > > > > It seems the problem is that you have an old version of > > commons-httpclient in your client classpath. Could you check that > > please? > > > > Thanks > > -Vincent > > > > > -----Original Message----- > > > From: Govindarajan, Ajay [mailto:[EMAIL PROTECTED] > > > Sent: 28 October 2003 21:47 > > > To: '[EMAIL PROTECTED]' > > > Subject: cactus-13-1.5-rc and > > commons-httpclient-2.0-rc2.jar works on > > > jdk1.4 and above only? > > > > > > I am using cactus-13-1.5-rc with weblogic 7.0 service pack 4 and > > > jdk131_08. > > > When I try to run any of the cactus tests I get the following > > exception: > > > > > > java.lang.NoSuchMethodError > > > at > > org.apache.commons.httpclient.HttpState.toString(HttpState.java:634) > > > at java.lang.String.valueOf(String.java:2013) > > > at java.lang.StringBuffer.append(StringBuffer.java:365) > > > at > > > > > org.apache.cactus.util.CookieUtil.createHttpState_aroundBody15 > > $advice(Co > > ok > > > ie > > > Util.java:190) > > > at > > org.apache.cactus.util.CookieUtil.createHttpState(CookieUtil.java) > > > at > > > > > org.apache.cactus.client.connector.http.HttpClientConnectionHe > > lper.conne > > ct > > > _a > > > roundBody0(HttpClientConnectionHelper.java:169) > > > at > > > > > org.apache.cactus.client.connector.http.HttpClientConnectionHe > > lper.conne > > ct > > > _a > > > roundBody1$advice(HttpClientConnectionHelper.java:222) > > > at > > > > > org.apache.cactus.client.connector.http.HttpClientConnectionHe > > lper.conne > > ct > > > (H > > > ttpClientConnectionHelper.java) > > > at > > > > > org.apache.cactus.client.connector.http.DefaultHttpClient.call > > RunTest(De > > fa > > > ul > > > tHttpClient.java:201) > > > at > > > > > org.apache.cactus.client.connector.http.DefaultHttpClient.doTe > > st_aroundB > > od > > > y0 > > > (DefaultHttpClient.java:119) > > > at > > > > > org.apache.cactus.client.connector.http.DefaultHttpClient.doTe > > st_aroundB > > od > > > y1 > > > $advice(DefaultHttpClient.java:222) > > > at > > > > > org.apache.cactus.client.connector.http.DefaultHttpClient.doTe > > st(Default > > Ht > > > tp > > > Client.java) > > > at > > > > > org.apache.cactus.internal.client.WebClientTestCaseDelegate.ru > > nWebTest(W > > eb > > > Cl > > > ientTestCaseDelegate.java:333) > > > at > > > > > org.apache.cactus.internal.client.WebClientTestCaseDelegate.ru > > nGenericTe > > st > > > (W > > > ebClientTestCaseDelegate.java:281) > > > at > > > > > org.apache.cactus.internal.client.WebClientTestCaseDelegate.ru > > nTest(WebC > > li > > > en > > > tTestCaseDelegate.java:257) > > > at > > > > > org.apache.cactus.ServletTestCase.runCactusTest(ServletTestCas > > e.java:300 > > ) > > > at > > org.apache.cactus.ServletTestCase.runBare(ServletTestCase.java:263) > > > at > > > > > org.apache.cactus.AbstractTestSuite.runTest_aroundBody6(Abstra > > ctTestSuit > > e. > > > ja > > > va:296) > > > at > > > > > org.apache.cactus.AbstractTestSuite.runTest_aroundBody7$advice > > (AbstractT > > es > > > tS > > > uite.java:151) > > > at > > org.apache.cactus.AbstractTestSuite.runTest(AbstractTestSuite.java) > > > at > > > > > org.apache.cactus.AbstractTestSuite.run_aroundBody4(AbstractTe > > stSuite.ja > > va > > > :2 > > > 87) > > > at > > > > > org.apache.cactus.AbstractTestSuite.run_aroundBody5$advice(Abs > > tractTestS > > ui > > > te > > > .java:151) > > > at org.apache.cactus.AbstractTestSuite.run(AbstractTestSuite.java) > > > > > > This is because the HttpState code in the > > commons-httpclient-2.0-rc2.jar > > > file invokes StringBuffer.append(StringBuffer sb) which is present > > from > > > jdk1.4 onwards only. > > > > > http://java.sun.com/j2se/1.4.1/docs/api/java/lang/StringBuffer > .html#appe > nd > > (j > > ava.lang.StringBuffer > > > <http://java.sun.com/j2se/1.4.1/docs/api/java/lang/StringBuffer.html#app > en > > d( > > java.lang.StringBuffer> ) > > > > > > > <http://f1.pg.photos.yahoo.com/ph/suri_mail/lst?.dir=/anu_suresh_engagem > en > > t_ > > > 08_Oct_03&.src=ph&.order=&.view=t&.done=http%3a//f1.pg.photos.yahoo.com/ > > >
--- Begin Message --- Title: Re: cactus-13-1.5-rc and commons-httpclient-2.0-rc2.jar works on jdk1.4 and above only?I've created a new build and uploaded it to
<http://www.apache.org/~mbecke/httpclient-2.0-rc2/>. This build is
identical to the original RC2 build except for the following:- the distribution was created with JDK 1.2.2
- HttpState has been changed to ensure that
StringBuffer.append(StringBuffer) is not usedPlease take a look and let me know.
Mike
On Oct 28, 2003, at 10:05 PM, Michael Becke wrote:
> Okay. I will apply a small patch to 2.0 and HEAD shortly that should
> take care of this problem. Afterwards I will regenerate the 2.0RC2
> release, hopefully with 1.2.2. I have had some trouble generating the
> distribution with 1.22 in the past, but I'll give it a try.
>
> Mike
>
> On Oct 28, 2003, at 8:13 PM, Adrian Sutton wrote:
>
>> On 29/10/03 8:12 AM, "Michael Becke" <[EMAIL PROTECTED]> wrote:
>>
>>> I think I've found the problem. In 1.4, Sun added
>>> StringBuffer.append(StringBuffer) to compliment the existing
>>> StringBuffer.append(Object). The problem is that STUPID me ran maven
>>> for this release with 1.4. The method call was bound to the
>>> append(StringBuffer) method, since it is the best option in 1.4. It
>>> looks like the build will have to be regenerated with 1.2.2.
>>
>> That's probably the best option for redoing the rc2 release, however
>> we
>> should change the code to be something like:
>> StringBuffer buf1 = new StringBuffer();
>> ...
>> buf1.append(getOtherStringBuffer().toString());
>>
>> The .toString() will make sure that we always use the .append(String)
>> method
>> regardless of which JVM the build is compiled on, thus avoiding this
>> problem
>> in the future.
>>
>>
>>> Does anyone what JVM is used for nightlies?
>>
>> I would have thought it would be 1.4 so that projects which depend on
>> 1.4
>> would compile correctly, besides GUMP is all about using the latest of
>> everything.
>>
>>> Mike
>>
>> Regards,
>>
>> Adrian Sutton.
>>
>> ----------------------------------------------
>> Intencha "tomorrow's technology today"
>> Ph: 38478913 0422236329
>> Suite 8/29 Oatland Crescent
>> Holland Park West 4121
>> Australia QLD
>> www.intencha.com
>>
>>
>> ---------------------------------------------------------------------
>> 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]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--- End Message ---
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
