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(NativeConstructorAccessorImpl.java:39)
        at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
        at 
org.apache.cactus.server.AbstractWebTestCaller.getTestClassInstance(AbstractWebTestCaller.java:419)
        at 
org.apache.cactus.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.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>(BaseConfiguration.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]
*** 
framework/src/java/share/org/apache/cactus/configuration/BaseConfiguration.java-orig   
     2003-12-04 18:50:35.000000000 +0900
--- framework/src/java/share/org/apache/cactus/configuration/BaseConfiguration.java    
 2003-12-04 18:51:35.000000000 +0900
***************
*** 56,62 ****
   */
  package org.apache.cactus.configuration;
  
- import org.apache.cactus.client.connector.http.HttpClientConnectionHelper;
  import org.apache.cactus.util.ChainedRuntimeException;
  
  /**
--- 56,61 ----
*************** public class BaseConfiguration implement
*** 91,97 ****
       * to use.
       */
      public static final String DEFAULT_CACTUS_CONNECTION_HELPER_CLASSNAME = 
!         HttpClientConnectionHelper.class.getName();
  
      /**
       * Name of the Cactus property for defining an initializer (i.e. a class
--- 90,96 ----
       * to use.
       */
      public static final String DEFAULT_CACTUS_CONNECTION_HELPER_CLASSNAME = 
!       "org.apache.cactus.client.connector.http.HttpClientConnectionHelper";
  
      /**
       * Name of the Cactus property for defining an initializer (i.e. a class

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to