Hi, I have integrated Cactus into WSAD by creating a web project containing the Redirectors. The project also contains all the sample tests, which are run through "TestAll.java". These tests run sucessfully.
Now, if I move the test cases into another project (i.e. another war file, different from the one containing the redirectors) and try to run them, I get a ClassCastException. The following is an extract from the cactus_server.log generated by log4j. **************************************************************************** ************************************************* 15:37:33,363 [Servlet.Engine.Transports:9] DEBUG .AbstractTestCaller - >getTestClassClass([org.apache.cactus.sample.TestSampleServlet]) 15:37:33,363 [Servlet.Engine.Transports:9] DEBUG .AbstractTestCaller - <getTestClassClass 15:37:33,724 [Servlet.Engine.Transports:9] ERROR .AbstractTestCaller - Error instanciating class [org.apache.cactus.sample.TestSampleServlet(testPostMethod)] java.lang.ClassCastException: org.apache.cactus.sample.TestSampleServlet at org.apache.cactus.server.AbstractTestCaller.getTestClassInstance(AbstractTes tCaller.java:305) at org.apache.cactus.server.AbstractTestCaller.doTest(AbstractTestCaller.java:1 30) at org.apache.cactus.server.AbstractTestController.handleRequest(AbstractTestCo ntroller.java:122) at org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector. java:134) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager .java:827) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycl eServlet.java:159) at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServle t.java:286) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycle Servlet.java:106) at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:47 2) at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMan ager.java:1012) at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManag er.java:913) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(W ebAppRequestDispatcher.java:499) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequest Dispatcher.java:278) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestD ispatcher.java:105) at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:67) at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker. java:123) at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedIn vocation.java:67) at com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(Cacheabl eInvocationContext.java:106) at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequ estProcessor.java:125) at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener .java:315) at com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.ja va:60) at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:313) at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:242) at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122) **************************************************************************** ************************************************* The lib folders of both projects contain the same files i.e. cactus.jar, httpclient.jar, junit.jar and log4j.jar and both projects have the same build path settings (i.e. client side classpath is the same). I have also updated the server-side classpath so that the redirector can locate the testcases. What could be the problem? Can't I put my test cases and redirectors in differrent war files? Thanks, Sheldon
