Greetings, I am developing an application with JSP, and using JSF. Here is a description of the problem I had with TomCat.
I created a class A which invokes a class B. This class B invokes a class C (class C is a JUnit class). Both the jar files containing class B and C are located in the lib folder of my JSP application (the jar file containing class C is JUnit.jar). When I run my JSP application which uses class A TomCat does not load the JUnit class, and shows the following error message: java.lang.NoClassDefFoundError: junit/framework/TestCase When I run class A as a Java application it works perfectly. I tried many things but TomCat does not find this class. I have tried putting the uncompressed classes inside the application "classes" folder but I get the same error message. My last trial was to directly call class B of the JSP application, but I get the same error message. Class B (which invokes the JUnit class) uses reflection in the implementation. Is this a problem for this context? I would like to know if anyone knows what is going on and why I get this error message. I would appreciate if anyone can give me a clue to solve this problem. I am using TomCat version 5.5.9, Eclipse 3.1, Java 1.5.0_04 and JSP 2.0. Thanks in advance. Camila