Have you checked your configurations are fine for remote objects as remoting-config.xml? Destination your not getting properly I think so.
The messaging-config.xml from the first example working fine, so I don't
know what is that error
Have you ensured your java classes are compiled properly? This type of exceptions can come while loading application as client-side cannot talk to server-side objects.
How can I test this? They are in diferent projects, one is java project and
one is flex. I only compile flex and it have to speak with java some how...