Return-Path: Delivered-To: apmail-jakarta-commons-httpclient-dev-archive@www.apache.org Received: (qmail 368 invoked from network); 31 Jan 2004 11:27:35 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 31 Jan 2004 11:27:35 -0000 Received: (qmail 8563 invoked by uid 500); 31 Jan 2004 11:26:46 -0000 Delivered-To: apmail-jakarta-commons-httpclient-dev-archive@jakarta.apache.org Received: (qmail 8519 invoked by uid 500); 31 Jan 2004 11:26:45 -0000 Mailing-List: contact commons-httpclient-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Commons HttpClient Project" Reply-To: "Commons HttpClient Project" Delivered-To: mailing list commons-httpclient-dev@jakarta.apache.org Received: (qmail 8445 invoked from network); 31 Jan 2004 11:26:44 -0000 Received: from unknown (HELO mail5.bluewin.ch) (195.186.1.207) by daedalus.apache.org with SMTP; 31 Jan 2004 11:26:44 -0000 Received: from localhost.localdomain (62.203.17.226) by mail5.bluewin.ch (Bluewin AG 7.0.024) id 400BA86900224AFB for commons-httpclient-dev@jakarta.apache.org; Sat, 31 Jan 2004 11:26:58 +0000 Subject: Re: Httpclient won't run in JUnit From: Oleg Kalnichevski Reply-To: olegk@apache.org To: Commons HttpClient Project In-Reply-To: <90FD681D-5394-11D8-BDE2-0003939F0CCA@webperformanceinc.com> References: <2D9EB196-52A4-11D8-83CE-0003939F0CCA@webperformanceinc.com> <90FD681D-5394-11D8-BDE2-0003939F0CCA@webperformanceinc.com> Content-Type: text/plain Message-Id: <1075548416.14617.8.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Sat, 31 Jan 2004 12:26:57 +0100 Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Michael, I confirm that the problem is perfectly reproducible with Sun JDK 1.2.2 (simple logger used per default) and Sun JDK 1.4.2 (JDK logger used per default). However, what I discovered is that the problem occurred only when using SwingUI. The same code runs without a hitch using TextUI. I understand it's a small comfort to you, but the problem does not seem to be caused by HttpClient. Try approaching JUnit people to see if they know of any compatibility issues between JUnit's SwingUI and commons-logging Oleg On Sat, 2004-01-31 at 03:24, Michael Czeiszperger wrote: > On Jan 29, 2004, at 5:10 PM, Michael Becke wrote: > > > Looks like a class loader problem. My guess is that commons-logging > > is being loaded by more than one class loader. > > I figured that since HttpClient uses JUnit for its test suite that > HttpClient had to be compatible with JUnit. Here's the most simple > JUnit example showing that the latest versions of HttpClient does not > run with JUnit. The example does nothing but start JUnit with the > latest versions of HttpClient and commons logging and no other > libraries involved: > > import org.apache.commons.httpclient.*; > import org.apache.commons.httpclient.methods.*; > import junit.framework.*; > /** > * Simple example showing problem with running HttpClient code within > JUnit > */ > public class HttpClientJunitBug extends TestCase > { > public HttpClientJunitBug(String s) > { > super(s); > } > > public void testSimple() > { > org.apache.commons.httpclient.HttpClient client = new > org.apache.commons.httpclient.HttpClient(); > assertTrue( client != null ); > } > } > > prompt>javac HttpClientJunitBut.java > prompt>java -cp > junit.jar:commons-httpclient-2.0-rc2.jar:commons-logging-api.jar:. > junit.swingui.TestRunner HttpClientJunitBug > > The result is: > > > java.lang.ExceptionInInitializerError > > > > Caused by: org.apache.commons.logging.LogConfigurationException: > > org.apache.commons.logging.LogConfigurationException: Class > > org.apache.comons.logging.impl.Jdk14Logger does not implement Log > > I thought maybe someone who runs the HttpClient test suite regularly > would be able to spot my mistake easily. (Hopefully!) > > Thanks, > > -------------------------------- > Michael Czeiszperger > czei at webperformanceinc dot com > Web Performance, Inc. > 919-845-7601 > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org