Could somebody provide me some hints please, I am kind of stuck :(
After you accessed the object, and before you narrow it, print it out:
What type does it say it is?
Thanks for your help,
I get the following output
If I do the following
Method method = object.getClass().getMethod("create", null);
log.info( method.getName() );
I get the correct create method in Home
Are you trying to access the EJB from a stand-alone client or is your client running as an app deployed to JBoss? Since removing the provider URL makes things suddenly work, I suspect your client is deployed to JBoss. In which case the probable cause for the class cast exception has to do with class loaders.
But your goal is to call a remote EJB, what problems do you encounter when you try that? Also, how is your application packaged? Is it a war or an ear, and have you included the EJB client jar?
Thank you for your help.
I took a look at my packaging and saw the client ejb jar for a third party application somehow landed in my war file and in my ear file.
As soon as I removed it from the war the problem was solved.