Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

cannot access second remote ejb from first ejb

843830Oct 31 2006 — edited Nov 7 2006
hello frens,,

i am creating an application where first ejb should access second ejb

but i am getting an error when first ejb tries to get the home of second ejb

here is my code that accesses second ejb..

InitialContext ctx=new InitialContext();

java.lang.Object objref=null;

objref=ctx.lookup("corbaname:iiop:com2:1050#HIMALAYAN");

HimalayanTransactionHome home=(HimalayanTransactionHome)
javax.rmi.PortableRemoteObject.narrow(objref,HimalayanTransactionHome.class);

HimalayanTransaction transaction=home.create();

the second server name is com2 and the jndi name is HIMALAYAN

i am using java's implementation server ie...j2ee server

when i run the above code,i get error that is listed below:

java.rmi.ServerException: RemoteException occurred in server thread: nested exception is: java.rmi.RemoteException bank.HimalayanTransactionHome

here HimalayanTransactionHome is the home of second ejb that resides in the bank package.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 5 2006
Added on Oct 31 2006
3 comments
166 views