NoClassDefFoundError

Hi all,

Iam using a typical pattern which has a JSP calling a servlet and the servlet at run time calls certain Handler classes which are mapped in an XML file. Now i have kept the Servlet and the Handler classes in the same war file and deployed into the app server. This Handler class will look up to an EJB performing the role of Data Access layer.

Now my flow is stopping when i use the following

Class handlerClass = Class.forName(handler);

Class[] c = {toDate.getClass()};

Method getMethod = handlerClass.getClass ().getDeclaredMethod("fetchData",c);

Object[] o = {toDate};

StringBuffer results = (StringBuffer) getMethod.invoke(handlerClass, o);

I have used reflection to get the declaredmethods at run time.

The flow is stopping when i do class.forName(handler).

Iam getting the handler classes from the mapping in the XML file against a requestID which i will be sending it through an Hidden filed from the JSP.

Please let me know where exactly iam going wrong or what should be the class path settings for this. Iam using IONA's iPAS as the application server.

Thanks in advance

Dilip

[1181 byte] By [dilipvenugopal] at [2007-9-27 20:15:19]
# 1

>

> The flow is stopping when i do

> class.forName(handler).

Have you tried the following to confirm that the name is correct?

System.out.println("Real name=" + TheRealClass.class.getName());

...

System.out.println("handler=" + handler);

jschell at 2007-7-7 0:27:48 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 2
What do you mean by "the flow is stopping"? Do you get an exception, does it fail silently or does it just get stuck forever? .P.
praisa at 2007-7-7 0:27:48 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...