Hi all.
I have a problem in doing a lookup of a remote EJB .
I'm using the "Glassfish V3 - Final" and Linux "CentOS release 5.4 (Final)."
The log in Glassfish, it seems that the EJB was deployed with success.
[#|2010-05-05T08:58:09.989-0300|INFO|glassfishv3.0|javax.enterprise.system.container.ejb.com.sun.ejb.containers|_ThreadID=58;_ThreadName=Thread-1;|Portable JNDI names for EJB ContaEJBInterface : [java:global/projectCore/projectCore-ejb/ContaEJBInterface!mypackage.core.interfaces.ContaEJBInterface, java:global/projectCore/projectCore-ejb/ContaEJBInterface]|#]
[#|2010-05-05T08:58:09.990-0300|INFO|glassfishv3.0|javax.enterprise.system.container.ejb.com.sun.ejb.containers|_ThreadID=58;_ThreadName=Thread-1;|Glassfish-specific (Non-portable) JNDI names for EJB ContaEJBInterface : [ContaEJBInterface, ContaEJBInterface#mypackage.core.interfaces.ContaEJBInterface]|#]
But when I attempt to lookup remote (via service locator) I get the following error.
javax.naming.NamingException: Lookup failed for 'ContaEJBInterface' in SerialContext targetHost=myserverip, targetPort=3700,orb'sInitialHost=169.254.26.176,orb'sInitialPort=3700 [Root exception is javax.naming.NameNotFoundException: ContaEJBInterface not found]
I tested the telnet command on port 3700 of the server and it connects normally. Iptables has no rule. And there is no firewall between my machine and the server.
[root_at_Machine ~]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Tested on other Windows and Linux (Ubuntu) machines, but lookup worked correctly in all. Only in this machine this problem occurs.
My service locator:
Hashtable<String, String> t = new Hashtable<String, String>();
t.put("java.naming.factory.initial", "com.sun.enterprise.naming.impl.SerialInitContextFactory");
t.put("java.naming.factory.url.pkgs", "com.sun.enterprise.naming");
t.put("java.naming.factory.state", "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
t.put("org.omg.CORBA.ORBInitialHost", "myserverip");
t.put("org.omg.CORBA.ORBInitialPort", "3700");
InitialContext context = new InitialContext(t);
Object o = context.lookup("ContaEJBInterface"); // Error here
I tried lookup "java:global/projectCore/projectCore-ejb/ContaEJBInterface", but without success too.
Has anyone experienced this problem?
Thank you all.
[Message sent by forum member 'rafaelbrizola']
http://forums.java.net/jive/thread.jspa?messageID=414329