2 Replies Latest reply on Aug 8, 2012 9:04 PM by 490462

    EJB Lookup fails with javax.naming.NameNotFoundException

      EJB Lookup Issue:

      When Swing client application (thick client) trying to lookup ejb's deployed on oc4j container , javax.naming.NameNotFoundException is thrown back.
      When a host entry added to %windir%\system32\drivers\etc\hosts file on Windows client machine with out domain name , ejb lookup is successfully.

      For example, oc4j container is deployed on a machine "host1.example.com". When a swing client application launched on XXXXXX.example2.com
      machine , looking up remote ejb's on "host1.example.com" is failing with NameNotFoundException.

      1) ejb look up is successful when a host entry with out domain name "10.141.xx.xx     host1" is added on client machine "XXXXXX.example2.com" host file.
      2) The same ejb lookup fails if host entry is made with domain name(.example.com) "10.141.xx.xx     host1.example.com".

      Adding host entry to the client machines is not feasible solution as there are many end users.
      But above symptoms shows that oc4j - RMIInitialContextFactory implementation may not be considering host name with domain while looking up the ejb.

      Please let me in case of any ideas.

      JNDI Properties: