Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error: cannot narrow to remote object

 
Amit Thakkar
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am attempting to create a client that uses the EJB remote interface.
When I call the narrow() method I get this exception: java.lang.ClassCastException: Cannot narrow remote object to {package.class}.
Any idea why?
 
meka toka
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here are some most probable reasons::
(1) The version of the remote interface you are trying to expose and the version on the server dont match
(2) You are using a wrong jndi name to do the lookup
Also we could help you more, if you give your environment
Regards
Meka Toka
 
Amit Thakkar
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for you help... it was the wrong JNDI name
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic