Hi Kazuhito, Thanks. In Cactus tests we're using the <cactifywar> task which puts commons-httpclient on the server side CP. Thus we hadn't noticed this "issue". I've applied your patch.
Thanks -Vincent > -----Original Message----- > From: Kazuhito SUGURI [mailto:[EMAIL PROTECTED] > Sent: 04 December 2003 13:45 > To: [EMAIL PROTECTED] > Subject: Cactus-1.5 requires commons-httpclient.jar in server side > > Hi. > > I had updated Cactus from 1.4.1 to 1.5. > But ServletTestCase and FilterTestCase cannot be instantiated, > and then, no TestCase were passed. > The TestCase was invoked from JUnit testrunner (junit.swingui.TestRunner) > in client-side and the error occurs in server-side. > > From server (JBoss-3.2.2) logfile: > ERROR [org.apache.cactus.server.AbstractWebTestCaller] Error > instantiating class [MyServletTest([testDoPost_Normal], [null])] > java.lang.reflect.InvocationTargetException > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA cc > essorImpl.java:39) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons tr > uctorAccessorImpl.java:27) > at java.lang.reflect.Constructor.newInstance(Constructor.java:274) > at > org.apache.cactus.server.AbstractWebTestCaller.getTestClassInstance(Abst ra > ctWebTestCaller.java:419) > at > org.apache.cactus.server.AbstractWebTestCaller.doTest(AbstractWebTestCal le > r.java:148) > .... > at java.lang.Thread.run(Thread.java:534) > Caused by: java.lang.NoClassDefFoundError: > org/apache/commons/httpclient/HttpMethod > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:141) > at > org.apache.cactus.configuration.BaseConfiguration.<clinit>(BaseConfigura ti > on.java:94) > at org.apache.cactus.ServletTestCase.init(ServletTestCase.java:188) > at > org.apache.cactus.ServletTestCase.<init>(ServletTestCase.java:164) > at MyServletTest.<init>(MyServletTest.java:264) > > > To avoid this problem, I have to put commons-httpclient-rc2.jar > in server-side classpath. > > > ---- > > I have other way to avoid the problem. > I got and modified cactus source code and re-build cactus-1.5.jar. > By using the (unofficial) cactus-1.5.jar, all TestCases passed > without commons-httpclient-rc2.jar in server-side. > But I'm not sure that the modification is proper or not. > The diff -p result is attatched to this message. > > > I hope this information helps someone. > ---- > Kazuhito SUGURI > mailto:[EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
