This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Error: cannot narrow to remote object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Error: cannot narrow to remote object" Watch "Error: cannot narrow to remote object" New topic
Author

Error: cannot narrow to remote object

Amit Thakkar
Greenhorn

Joined: Jun 03, 2002
Posts: 5
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

Joined: Dec 11, 2002
Posts: 75
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


Thanks<br />MekaToka<br />SCJP 1.4
Amit Thakkar
Greenhorn

Joined: Jun 03, 2002
Posts: 5
Thanks for you help... it was the wrong JNDI name
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error: cannot narrow to remote object