Platform: EJB's running on Oracle 10gAS.


I have a message driven bean that on receipt of a message calls a stateless session bean
named OrderUpdate that performs some processing, to this point everything works OK.

In my session bean I would then like to call another stateless session bean(orderentry) to perform some further processing

this is where the problem begins
I perform the lookup on my second session bean using its local reference
using a method like this:-

 public void deleteorder(String jobNumber) {
    try {
      javax.naming.Context ctx = new javax.naming.InitialContext();
      Object object = ctx.lookup("java:comp/env/ejb/orderentry");
      orderEntryLocalHome = (OrderEntryLocalHome) object;
      OrdersEntryLocal orderEntry = orderEntryLocalHome.create();
    catch (Exception e) {
      throw new javax.ejb.EJBException(e);

but this consistently results in exceptions being generated in the application server application log that reads as bellow...

the exception relates to an EJB entity bean that is looked up inside the orderentry bean
I know the orderentry bean to be working correctly as all is file if I call its methods
using a test client. problem seems to be when it is being called from another bean that is itself being called from the message driven bean.

Does the first session bean also need an ejb reference to the entity bean that is looked up in the second bean.?

Any pointers greatly appreciated.


04/09/15 12:29:35 Error in bean OrderUpdate
javax.naming.NamingException: No EJB found at location 'Persistance.jar_orders'
    at com.evermind.server.ejb.DelayedHomeBinding.getInstance(
    at com.evermind.server.ApplicationContext.lookup(
    at com.evermind.server.ApplicationContext.lookup(
    at javax.naming.InitialContext.lookup(