Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JNDI look error after ejb link to a remote EJB deployed as part of another EAR

 
Suhas Madap
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm getting error while doing a JNDI look-up of another EJB which is deployed as part of another EAR from a EJB method.

ConverterBean and it's Interface are package Converter-EJB.jar which is deployed as Converter-App.ear.
TaskServiceBean, it's Remote interface are package Task-EJB.jar which is deployed as Task-App.ear

Here is my sample EJB:

ConverterBean:



ConverterService.java:



ejb-jar.xml:


weblogic-ejb.xml:


Client program:



First, I tried final String EJB_REF_LOOK_UP = "java:comp/env/ejb/TaskServiceBean";

[b]Exception:[/b]
Context lookup for bean is failed com.suhas.madap.ejb.ConverterService, invokeTaskService method
javax.naming.NameNotFoundException: While trying to look up comp/env/ejb/TaskServiceBean in /app/ejb/converter-ejb.jar#ConverterBean.; remaining name 'comp/env/ejb/TaskServiceBean'


second, final String EJB_REF_LOOK_UP = "ejb/TaskServiceBean";

[b]Exception:[/b]
Context lookup for bean is failed com.suhas.madap.ejb.ConverterService, invokeTaskService method
javax.naming.NameNotFoundException: Unable to resolve 'ejb.TaskServiceBean'. Resolved 'ejb'; remaining name 'TaskServiceBean'
at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)


Any pointers to resolve this issue will be very helpful.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic