Problem is in class loading. You have EJB module where you want to create components and Web module where you want to present them. Both modules need to load the UISpacer class with the same class loader. You can do that by moving richfaces and jsf libs to EAR/lib. In fact due to lots of dependencies move everything from war/WEB-INF/lib to EAR/lib and add
Class-Path: lib/to war/META-INF/MANIFEST.MF.
great!!! thanks....never would have known that...
I face the issue as Sasha(but instead of using the HtmlSpacer, I'm using the HtmlTree), and I followed your instructions in order to solve the problem. But, the problem is still occurring. Any idea?