(I would recommend you to brush up your basics by some sun tutorials or some good book)
RemoteException is not meant to throw business exceptions. In most of the cases, RemoteException will be throws when there is a communication problem.
In your case you can define an exception class, may be, MyServerException and add in the throws clause of all your server methods. Whenever, an exception occurs on the server side you will throw this exception.
beda meda wrote: I was given hint that I can have some class MyErr on server side, which would wrap any exception that occurs there (e.g. MyErr(SQLException)), that would be wrapped in Remote exception RemoteException(MyErr(SQLException)),, that would be sent via RMI to Client and dealt with. But I"m not sure how to accomplish this.
Any Exception class will have a constructor that also takes a Throwable. You can wrap any exception into your desired type by using such a constructor.