Question: I have simple client-server application using RMI. Server side is supposed to generate some sort of PDF (itext) file, and client should display it. 

While trying to generate my pdf on server side by invoking proper method of my own common remote interface, `ClassNotFoundException` is thrown on **client side**.

```
Caused by: java.lang.ClassNotFoundException: com.itextpdf.text.ExceptionConverter (no security manager: RMI class loader disabled)

```

I thought, that using RMI would be like using black box - client invokes method, and receives response, without knowlage of how it is done, to the only common class for both sides would be remote interface. More over i thought that this will allow me to shrink required dependencies on client side to minimum.

**Is it really mandatory for client to have all server's libraries in its classpath to work?**

EDIT:
Another strange fact is that there are no exceptions cought and logged on server side.
If I add server side project as dependency to client, that everything works fine.

Answer: 
Try adding 
context:annotation-config
 to your appContext.xml.

See [annotation-config vs component-scan](https://stackoverflow.com/questions/7414794/difference-between-contextannotation-config-vs-contextcomponent-scan "annotation-config vs component-scan")
Your implementation class MyCustomService is not public(unless there is a typo in the code provided). Make it public and spring should pick it up.