This discussion is archived
2 Replies Latest reply: Aug 8, 2012 2:04 PM by 490462 RSS

EJB Lookup fails with javax.naming.NameNotFoundException

856900 Newbie
Currently Being Moderated
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:

INITIAL_CONTEXT_FACTORY=oracle.j2ee.rmi.RMIInitialContextFactory
NAMING_SERVER_URL=opmn:ormi://host1.example.com:6007:sim-instance/sim131
OBJECT_FACTORY_PACKAGES=oracle.aurora.jndi
SECURITY_PRINCIPAL=xxxxx
SECURITY_CREDENTIALS=xxxx

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points