Hi David,

I'm using VAJ 3.5.3 and have separate projects for Cactus, JUnit, and Log4j.
I wasn't able to duplicate the error that you received but could cause a
similar error.  I have Cactus set up in my workspace classpath under
Options...Resources.  This way I don't have to add Cactus to the project
path for every class that I may want to run.  When I removed Cactus from the
workspace classpath and tried running the main method for one of my classes,
the debugger came up with this error:

Uncaught exception (java.lang.NoClassDefFoundError:
org.apache.commons.cactus.ServletTestCase)

I tried removing the Cactus, JUnit, and Log4j projects from the classpath
for the servlet engine, but everything ran fine, which surprised me.  If I
removed my application's project from the servlet engine classpath, I
received numerous class instantiation errors.

VAJ should catch a class-not-defined error if the class name is misspelled
when creating a new suite by using a Class object.  When running a Cactus
test class, it appears that suite() is only run on the client side so I
think we can narrow the problem to something client side and most likely
something to do with the classpath.  

My guess is that there is another project upon which the class in your suite
depends.  This could be a base class in another project that your class
extends.  VAJ is smart enough to not give any problems in the IDE because it
looks inside every project (or at least it seems that way to me).  When
trying to run the test class, VAJ is not finding a class it needs because it
only uses projects in the project path, projects in the workspace classpath,
and extension projects.  If this is could be the problem, you will either
need to add the depended-upon project to the project path for the test class
or add it to the workspace classpath.

Hope this helps or at least gives you new places to look.

Todd

Reply via email to