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()];
Class dynamicClass = defineClass(null, classData, 0, classData.length, null);
return dynamicClass.newInstance();
} catch (Exception 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:


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