| Author |
Please help with the local interface
|
xin wen
Ranch Hand
Joined: Oct 11, 2002
Posts: 64
|
|
Hi, could anyone help me? I create an EJB(2.0)project, which contains CMP entity beans and session beans. And also I have a java project, I want to access the entity bean. When I do this: ------------------------- InitialContext initialContext = new InitialContext(); AliasLocalHome aliasLocalHome = (AliasLocalHome)initialContext.lookup("com/ibm/ejb/entity/AliasLocalHome"); it will give me an error: NamingException: "com/ibm/ejb/entity/AliasLocalHome" can not be found. ----------------------- I added a local EJB reference to ejb.xml and do this: -------------------------------- InitialContext initialContext = new InitialContext(); AliasLocalHome aliasLocalHome = (AliasLocalHome)initialContext.lookup(java:comp/env/ejb/Alias); it gave me an error: Message='Name ejb not found in context "java:comp/env".' [5/7/03 10:47:37:937 EDT] 21fc7586 SystemErr R Stack Trace to immediately follow: [5/7/03 10:47:37:947 EDT] 21fc7586 SystemErr R javax.naming.NameNotFoundException: Name ejb not found in context "java:comp/env". --------------------------------------- Anybody know how to locate a local home interface from a java project? Thanks a lot! [ May 07, 2003: Message edited by: xin wen ]
|
 |
Chris Mathews
Ranch Hand
Joined: Jul 18, 2001
Posts: 2712
|
|
|
I recommend posting this question to the forum for your specific Application Server. You are more likely to get a response.
|
 |
xin wen
Ranch Hand
Joined: Oct 11, 2002
Posts: 64
|
|
|
Thanks, I'll do that.
|
 |
 |
|
|
subject: Please help with the local interface
|
|
|