0 Replies Latest reply on Aug 23, 2003 8:47 AM by Darran Lofthouse

    Cactus Integration Testing

    Darran Lofthouse Master

      Hi,

      I am trying to perform some Cactus / Integration testing.

      I have implemented a simple test project to try and get everything working, everything is controlled using an Ant build script.

      I use the 'cactifywar' ant task to generate the War file containing the tests to be executed within JBoss.

      I then use the 'cactus' ant task to start JBoss / deploy my test application, run the tests and then shut down JBoss.

      When I run ant from the command line I have no problems, the server is started and the tests are executed correctly.

      When I try and run it within Eclipse I get the following Exception thrown :-

      [cactus] Couldn't find tools.jar (needed for JSP compilation)
      You must either set location or path on
      at org.apache.tools.ant.types.Path.list(Path.java:309)
      at org.apache.tools.ant.types.Path.list(Path.java:320)
      at org.apache.tools.ant.types.Path.addExisting(Path.java:260)
      at org.apache.tools.ant.types.Path.concatSystemClasspath(Path.java:551)
      at org.apache.tools.ant.types.CommandlineJava.size(CommandlineJava.java:346)
      at org.apache.tools.ant.types.CommandlineJava.getCommandline(CommandlineJava.java:248)
      at org.apache.tools.ant.types.CommandlineJava.describeCommand(CommandlineJava.java:311)
      at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:138)
      at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
      at org.apache.cactus.integration.ant.container.jboss.JBoss3xContainer.startUp(JBoss3xContainer.java:214)
      at org.apache.cactus.integration.ant.container.ContainerRunner$1.run(ContainerRunner.java:185)
      at java.lang.Thread.run(Thread.java:536)


      I am assuming that this is because Eclipse is using it's own environment settings to run the script.

      I have tried adding the tools.jar to the classpath within the cactus task and I have tried adding it to the main project classpath.

      I have tried forking and not forking the cactus task.

      I have tried using an 'env' element within the cactus task to set the JAVA_HOME environment variable.

      All of these attempts have failed and I still keep getting the same Exception.

      Has anyone else run into a problem like this running ant build files from within Eclipse?

      Thanks in advance for any help.

      From,
      Darran.