Hello,

I've been having a similar problem with the class loader as well in VAJ
3.5.3.  I traced through the code and found that the test class cannot find
itself!

If my test class extends the class "TestCase" instead of "ServletTestCase",
then it works.  In my suite() method, if I add each method individually,
then it works fine.  However, for some reason, JUnit cannot find all my
"test" methods via reflection when extending the "ServletTestCase" class.

TestSuite suite = new TestSuite();
suite.addTest( new TestSampleServlet("testGetMethod") );
suite.addTest( new TestSampleServlet("testPostMethod") );
.......
return suite;

instead of

return new TestSuite(TestSampleServlet.class);   // JUnit can't find all
methods via relfection when extending "ServletTestCase"

JUnit provides the error:
Failed to invoke suite():java.lang.NoClassDefFoundError

But it seems like it can't find the "ServletTestCase", which is the actual
test class.  It might be something with the VAJ JVM.  Does anyone know what
could be causing this?  It works fine by added the individual methods, but
if I have a lot of methods, I would rather just be able to add via
reflection.

Thanks for your reply,

David J Mehi
[EMAIL PROTECTED]
(248) 355-6621







****************************************************************************

The information contained in this transmission, which may be
confidential and proprietary, is only for the intended recipients.
Unauthorized use is strictly prohibited. If you receive this
transmission in error, please notify me immediately by telephone
or electronic mail and confirm that you deleted this transmission
and the reply from your electronic mail system.
****************************************************************************



Reply via email to