2 Replies Latest reply on Oct 26, 2002 12:36 PM by jules

    cactus jboss3.0.3 problems

    robbeers

      I have 2 problems.

      The first seems like a classloading problem. I put the needed jar files in the WEB-INF lib dir like the cactus manual describes but when I run the tests it can't find ServletTestCase. I then put the files in the jboss lib dir and it works. Why doesn't it recognize the jars in the WEB-INF dir?

      The second is that jboss has a problem when hot-deploying the test cases after they have been changed. I am testing webwork action classes like this :
      public void testGetMenu() throws Exception {
      Map parameters = new HashMap();
      request.getSession().setAttribute("providerId", new Integer(10));
      ActionContext ac = new ActionContext();
      ac.setRequest(request);
      ac.setParameters(parameters);
      ActionContext.setContext(ac);

      try {
      Action a = webwork.action.factory.ActionFactory.getAction("menu");
      String result = a.execute();
      assertEquals(result, "success");
      System.out.println("it is a " + result);
      } catch (Exception e) {
      System.out.println("Could not execute WebWork action");
      e.printStackTrace();
      }

      }

      Why would a change in the class and then a hot deploy cause problems like this :

      09:54:17,961 ERROR [STDERR] java.lang.NullPointerException
      09:54:17,971 ERROR [STDERR] at org.jboss.ejb.plugins.local.BaseLocalContaine
      rInvoker.invokeHome(BaseLocalContainerInvoker.java:223)
      09:54:17,971 ERROR [STDERR] at org.jboss.ejb.plugins.local.LocalHomeProxy.in
      voke(LocalHomeProxy.java:110)
      09:54:17,981 ERROR [STDERR] at $Proxy59.create(Unknown Source)
      09:54:17,981 ERROR [STDERR] at com.bsc.rms.common.commands.EJBCommandTarget.
      executeCommand(EJBCommandTarget.java:35)
      09:54:17,981 ERROR [STDERR] at com.bsc.rms.common.commands.CommandExecutor.e
      xecute(CommandExecutor.java:33)
      09:54:17,981 ERROR [STDERR] at com.bsc.rms.webcontainer.actions.Menu.doExecu
      te(Menu.java:44)
      09:54:17,991 ERROR [STDERR] at webwork.action.ActionSupport.execute(ActionSu
      pport.java:108)
      09:54:17,991 ERROR [STDERR] at com.bsc.rms.integrationtests.MenuTest.testGet
      Menu(MenuTest.java:38)
      09:54:17,991 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(
      Native Method)
      09:54:18,001 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(N
      ativeMethodAccessorImpl.java:39)
      09:54:18,001 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invo
      ke(DelegatingMethodAccessorImpl.java:25)
      09:54:18,001 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:3
      24)
      09:54:18,011 ERROR [STDERR] at org.apache.cactus.AbstractTestCase.runServerT
      est(AbstractTestCase.java:332)
      09:54:18,011 ERROR [STDERR] at org.apache.cactus.AbstractTestCase.runBareSer
      verTest(AbstractTestCase.java:235)
      09:54:18,011 ERROR [STDERR] at org.apache.cactus.server.AbstractWebTestCalle
      r.doTest(AbstractWebTestCaller.java:149)
      09:54:18,021 ERROR [STDERR] at org.apache.cactus.server.AbstractWebTestContr
      oller.dispatch87_handleRequest(AbstractWebTestController.java;org/apache/cactus/
      util/log/LogAspect.aj(1k):125)
      09:54:18,021 ERROR [STDERR] at org.apache.cactus.server.AbstractWebTestContr
      oller.around87_handleRequest(AbstractWebTestController.java;org/apache/cactus/ut
      il/log/LogAspect.aj(1k):1149)
      09:54:18,031 ERROR [STDERR] at org.apache.cactus.server.AbstractWebTestContr
      oller.handleRequest(AbstractWebTestController.java;org/apache/cactus/util/log/Lo
      gAspect.aj(1k):101)
      09:54:18,031 ERROR [STDERR] at org.apache.cactus.server.ServletTestRedirecto
      r.dispatch113_doPost(ServletTestRedirector.java;org/apache/cactus/util/log/LogAs
      pect.aj(1k):123)
      09:54:18,041 ERROR [STDERR] at org.apache.cactus.server.ServletTestRedirecto
      r.around113_doPost(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspe
      ct.aj(1k):1149)
      09:54:18,041 ERROR [STDERR] at org.apache.cactus.server.ServletTestRedirecto
      r.doPost(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspect.aj(1k):
      109)
      09:54:18,041 ERROR [STDERR] at org.apache.cactus.server.ServletTestRedirecto
      r.dispatch112_doGet(ServletTestRedirector.java;org/apache/cactus/util/log/LogAsp
      ect.aj(1k):96)
      09:54:18,051 ERROR [STDERR] at org.apache.cactus.server.ServletTestRedirecto
      r.around112_doGet(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspec
      t.aj(1k):1149)
      09:54:18,051 ERROR [STDERR] at org.apache.cactus.server.ServletTestRedirecto
      r.doGet(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspect.aj(1k):9
      2)


      All is well though if I restart jboss. Why might this be happening?

      Thanks for any help,
      Rob