Hi,

I have an client-server application developed in Ecplise. The server is working on Apache Tomcat5.5 and the client is a java application...
Heres my problem, the client makes a request on a webservice and the server receives it and begins to process its request, at some point when executing the following class:

public class URIClassLoader extends ClassLoader {
public Object loadClassByURL(String location, String className, boolean jar) {
try {
if (jar)
location = "jar:" + location + "!/" + className + ".class";
URL url = new URL(location);
InputStream is = url.openStream();
byte[] classData = new byte[is.available()];
is.read(classData);
Class dynamicClass = defineClass(null, classData, 0, classData.length, null);
this.resolveClass(dynamicClass);
return dynamicClass.newInstance();
} catch (Exception e) {
System.out.println(e);
}
return null;
}
}

it simply stops at the line marked in red.

the local version of my application works just fine, but "remotely" it simply gives me this exception in the client:

java.lang.reflect.InvocationTargetException

but no exception is shown in the tomcats log.
my guess is that something is (obviously) going wrong when executing
Class dynamicClass = defineClass(null, classData, 0, classData.length, null);
but I cant understand what it is...

can anyone help me?
Regards Rui Rocha