-
1. Re: ClassCastException with PortableRemoteObject.narrow call
srki Nov 8, 2006 3:08 PM (in response to srki)Could somebody provide me some hints please, I am kind of stuck :(
Thank you -
2. Re: ClassCastException with PortableRemoteObject.narrow call
peterj Nov 8, 2006 3:49 PM (in response to srki)After you accessed the object, and before you narrow it, print it out:
System.out.println(obj);
What type does it say it is? -
3. Re: ClassCastException with PortableRemoteObject.narrow call
srki Nov 10, 2006 6:27 PM (in response to srki)Thanks for your help,
I get the following output
$Proxy137
If I do the following
Method method = object.getClass().getMethod("create", null);
log.info( method.getName() );
I get the correct create method in Home -
4. Re: ClassCastException with PortableRemoteObject.narrow call
peterj Nov 13, 2006 1:58 PM (in response to srki)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? -
5. Re: ClassCastException with PortableRemoteObject.narrow call
srki Nov 15, 2006 4:03 PM (in response to srki)Hi Peter,
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.
Thank you