aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes EJB Lookup problem on OC4J 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 "EJB Lookup problem on OC4J" Watch "EJB Lookup problem on OC4J" New topic
Author

EJB Lookup problem on OC4J

Shrinivas Mujumdar
Ranch Hand

Joined: Aug 27, 2004
Posts: 328
Hi,

I have successfully deployed Stateless Session Bean on OC4J.
I am trying to lookup the EJB through some Test code given below:

hostname, port number and JNDI name of EJB changed intentionally.

However I am getting following exception when I execute this code
at Object obj=ctx.lookup("OrderBean"); line




EJB deployment is successful and when i checked the log i could see that clearly. also JNDI name of EJB is correct and hostname and port number is correct and I could access that through code as well as telnet.


Could somebody please point out what is the issue with this.

Thanks,
Shriniwas
[ July 31, 2008: Message edited by: Scott Selikoff ]
Mike Keith
author
Ranch Hand

Joined: Jul 14, 2005
Posts: 304
Not sure about why you can't load the home class. Make sure your home interface is on the client classpath, though.


-Mike
Pro JPA 2: Mastering the Java Persistence API
Shrinivas Mujumdar
Ranch Hand

Joined: Aug 27, 2004
Posts: 328
Mike,

I do have home interface on the client classpath.

Thanks,
Shriniwas
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3832

Did you check wheather JNDI has bound with the name you are requesting?


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Shrinivas Mujumdar
Ranch Hand

Joined: Aug 27, 2004
Posts: 328
Yes.
Shrinivas Mujumdar
Ranch Hand

Joined: Aug 27, 2004
Posts: 328
I deleted all the class files rebuild the application and created new EJB jars and it worked. There was no special step I have performed compared to when I posted this issue.

It did work finally. Really surprising.

Thanks to all

Shriniwas
Yogesh Gandhi
Ranch Hand

Joined: Dec 05, 2008
Posts: 212
Yes, you are right, rebuilding the project made it work for me as well.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EJB Lookup problem on OC4J