Everywhere I look for clues, they say "custom exceptions work right
away", but whatever I try, they fail.

My exceptions are _always_ caugth as a java.rmi.RemoteException. My
Exception code:
=========================
package exceptions;
public class OutOfResourcesException extends Exception {
   public OutOfResourcesException() { }
}
=========================

My service class has a method:
=========================
public Resource getInput(String applicationName) throws
OutOfResourcesException {...}
=========================

I use java2wsdl and wsdl2java to generate client-side proxy classes.
In the client source tree, a
exceptions_client.OutOfResourcesException.java is actually generated.

On the client-side I have:
=========================
locator = new JarDistributionServiceLocator();
jd = locator.getJarDistribution();
try {
   resource = jd.getInput(applicationName);
} catch (OutOfResourcesException e) {}
} catch (RemoteException e) {}
=========================

Still, EVERY time the OutOfResourcesException is thrown, it is catched
as a RemoteExeption!!! The error message is:
"exceptions.OutOfResourcesException".
WHY does this go wrong !?!?

Johan Walters

Reply via email to