my server is throwing an exception that extends remote exception. as i understand this means that a rmi server exception is being created with my exception as it cause.No. It means that the server encountered either a RuntimeException or a RemoteException of its own, typically an UnmarshallException.
i want to catch this exception before it is being throwed and only throw my exceptionYou can do that in the case of a RuntimeException. Just add a try/catch block into your remote method body. In the other cases you can't, as they don't arise in your code.
since i dont want my client to see this the serverException, just my exception.Again you've misunderstood. The ServerException doesn't wrap the exceptions that your remote method is declared to throw: it is one of the possible RemoteExceptions that your remote method may throw in addition to your own.
so is that why a ServerException is being thrown?Please reread what I wrote above. I have already explained to you that it isn't, in some detail. What part of 'no' didn't you understand?