0 Replies Latest reply on Oct 29, 2003 10:48 AM by cjz002

    configure cactus in JBoss3.2.1

    cjz002 Newbie

      Urgent help need to cactus!

      I am new in cactus with JBoss, I followed the instruction in cactus website, did the following to set up my test.

      - wrapped my test code with ServletTestSuite as following;
      public static Test suite()
      {
      ServletTestSuite suite = new ServletTestSuite();
      suite.addTestSuite(TestCMPDataKeyFactory.class);
      return suite;
      }

      - at the client side, add the following property as the cactus sugguest: -Dcactus.contextURL = http://localhost:8080/test for the test case.

      - at the server side, we changed the a web.xml file. I think this is I am not sure how to do it in JBoss, we changed the web.xml under Jboss-home/server/default/deploy/http-invoker.sar/invoker.war/web-inf. Please don't laugh at me if I did it wrong, cause I have never set up a servlet in jboss.

      - When I run the test, I got the following error:
      org.apache.cactus.util.ChainedRuntimeException: Failed to get the test results at [http://localhost:8080//ServletRedirector]

      at org.apache.cactus.client.connector.http.DefaultHttpClient.doTest_aroundBody0(DefaultHttpClient.java:131)

      at org.apache.cactus.client.connector.http.DefaultHttpClient.doTest_aroundBody1$advice(DefaultHttpClient.java:240)

      at org.apache.cactus.client.connector.http.DefaultHttpClient.doTest(DefaultHttpClient.java)

      at org.apache.cactus.internal.client.WebClientTestCaseDelegate.runWebTest(WebClientTestCaseDelegate.java:333)

      at org.apache.cactus.internal.client.WebClientTestCaseDelegate.runGenericTest(WebClientTestCaseDelegate.java:281)

      at org.apache.cactus.internal.client.WebClientTestCaseDelegate.runTest(WebClientTestCaseDelegate.java:257)

      at org.apache.cactus.ServletTestCase.runCactusTest(ServletTestCase.java:300)

      at org.apache.cactus.ServletTestCase.runBare(ServletTestCase.java:263)

      at org.apache.cactus.AbstractTestSuite.runTest_aroundBody6(AbstractTestSuite.java:296)

      at org.apache.cactus.AbstractTestSuite.runTest_aroundBody7$advice(AbstractTestSuite.java:158)

      at org.apache.cactus.AbstractTestSuite.runTest(AbstractTestSuite.java)

      at org.apache.cactus.AbstractTestSuite.run_aroundBody4(AbstractTestSuite.java:287)

      at org.apache.cactus.AbstractTestSuite.run_aroundBody5$advice(AbstractTestSuite.java:158)

      at org.apache.cactus.AbstractTestSuite.run(AbstractTestSuite.java)

      at org.apache.cactus.AbstractTestSuite.runTest_aroundBody6(AbstractTestSuite.java:296)

      at org.apache.cactus.AbstractTestSuite.runTest_aroundBody7$advice(AbstractTestSuite.java:158)

      at org.apache.cactus.AbstractTestSuite.runTest(AbstractTestSuite.java)

      at org.apache.cactus.AbstractTestSuite.run_aroundBody4(AbstractTestSuite.java:287)

      at org.apache.cactus.AbstractTestSuite.run_aroundBody5$advice(AbstractTestSuite.java:158)

      at org.apache.cactus.AbstractTestSuite.run(AbstractTestSuite.java)

      at com.mot.kmf.framework.data.ejb.crypto.TestCMPDataKeyFactory.main(TestCMPDataKeyFactory.java:27)

      org.apache.cactus.client.ParsingException: Not a valid response [404 %2F%2FServletRedirector+Not+Found]

      at org.apache.cactus.client.connector.http.DefaultHttpClient.callGetResult(DefaultHttpClient.java:249)

      at org.apache.cactus.client.connector.http.DefaultHttpClient.doTest_aroundBody0(DefaultHttpClient.java:126)

      at org.apache.cactus.client.connector.http.DefaultHttpClient.doTest_aroundBody1$advice(DefaultHttpClient.java:240)

      at org.apache.cactus.client.connector.http.DefaultHttpClient.doTest(DefaultHttpClient.java)

      at org.apache.cactus.internal.client.WebClientTestCaseDelegate.runWebTest(WebClientTestCaseDelegate.java:333)

      at org.apache.cactus.internal.client.WebClientTestCaseDelegate.runGenericTest(WebClientTestCaseDelegate.java:281)

      at org.apache.cactus.internal.client.WebClientTestCaseDelegate.runTest(WebClientTestCaseDelegate.java:257)

      at org.apache.cactus.ServletTestCase.runCactusTest(ServletTestCase.java:300)

      at org.apache.cactus.ServletTestCase.runBare(ServletTestCase.java:263)

      at org.apache.cactus.AbstractTestSuite.runTest_aroundBody6(AbstractTestSuite.java:296)

      at org.apache.cactus.AbstractTestSuite.runTest_aroundBody7$advice(AbstractTestSuite.java:158)

      at org.apache.cactus.AbstractTestSuite.runTest(AbstractTestSuite.java)

      at org.apache.cactus.AbstractTestSuite.run_aroundBody4(AbstractTestSuite.java:287)

      at org.apache.cactus.AbstractTestSuite.run_aroundBody5$advice(AbstractTestSuite.java:158)

      at org.apache.cactus.AbstractTestSuite.run(AbstractTestSuite.java)

      at org.apache.cactus.AbstractTestSuite.runTest_aroundBody6(AbstractTestSuite.java:296)

      at org.apache.cactus.AbstractTestSuite.runTest_aroundBody7$advice(AbstractTestSuite.java:158)

      at org.apache.cactus.AbstractTestSuite.runTest(AbstractTestSuite.java)

      at org.apache.cactus.AbstractTestSuite.run_aroundBody4(AbstractTestSuite.java:287)

      at org.apache.cactus.AbstractTestSuite.run_aroundBody5$advice(AbstractTestSuite.java:158)

      at org.apache.cactus.AbstractTestSuite.run(AbstractTestSuite.java)

      at com.mot.kmf.framework.data.ejb.crypto.TestCMPDataKeyFactory.main(TestCMPDataKeyFactory.java:27)

      Please help me to figure out how to set up the web.xml correct so that I could run my unit test with cactus.

      Thanks a lot.
      -jz