Remove the home and remote interfaces from your war file. The problem is that the proxy handed to your servelt was built using the interface defined in the ejb jar/ear file, and is not the same (according to the classloader) as the interface in your war file.
You can package things in two ways:
a) place the ejbs in a jar and put the jar in the deploy directory, and put your war in the deploy directory
b) if you need to put your ejbs in an ear, add the war to the ear (don't forget to add the web module entry to the application.xml)
What you are getting from the JNDI call is not the EJB. To see if that is the case, after you get 'object', do this:
System.out.println("object=" + object);
That will tell you if your really have the ejb (it will be some sort of proxy).
If it is not a proxy, then you have to look at the JNDI tree using jndiview.
Thanks for the quick response. Actually I had read a similar post regarding the ClassCastException i was getting. However I assumed that my case was different since i was not packaging the war file in question within the same ear as the ejbs needed.
Took a look @ the jboss class loading architecture documentation in the admin guide and I'm clear with it now.
Thanks for the help.