1 Reply Latest reply on Mar 9, 2006 6:35 PM by ameya_barve

    javax.naming.NameNotFoundException during a lookup() call.

    ameya_barve

      I have JBoss 4.0.3SP1, and I have a Session Bean with a Remote interface (ExecutionReportOperator), and an Entity Bean with a local interface (ExecutionReport). Here is the JBoss output:

      INFO [EjbModule] Deploying ExecutionReport
      INFO [EjbModule] Deploying ExecutionReportOperator
      INFO [BaseLocalProxyFactory] Bound EJB LocalHome 'ExecutionReport' to jndi 'local/ExecutionReport@4199584'
      INFO [ProxyFactory] Bound EJB Home 'ExecutionReportOperator' to jndi 'ExecutionReportOperator'
      INFO [EJBDeployer] Deployed: file:/C:/Program Files/jboss-4.0.3SP1/server/default/deploy/ExecReportingEJBs.jar

      Now, within my Session bean, I'm trying to get a reference to the Home interface of my Entity bean:

      private ExecutionReportHome getExecutionReportHomeObject()
      throws NamingException {
      InitialContext ic = new InitialContext();
      ExecutionReportHome erh = (ExecutionReportHome) ic.lookup("ExecutionReport");
      return erh;
      }

      However this throws a Naming exception. I guess the string I'm sending in to the lookup() method needs to be adjusted/modified. I've tried "local/ExecutionReport" as well as the full package name, no luck. Does anyone know what the string should look like?


        • 1. Re: javax.naming.NameNotFoundException during a lookup() cal
          ameya_barve

          Some additional info: Just to test, I created a Remote interface for my Entity bean and deployed it to JBoss. Once I did that, I was able to successfully locate the Local object without any Naming exceptions. (No code changes to my original function, just created the Remote interface and deployed it).

          Hope this extra information is useful.