What are you looking up?
Also, do you have a firewall on the Linux machine? If so make sure you open the ports 1098, 1099, 4443 and 4444 (or their equivalents if you changed the port settings). The last two you might not need unless you are accessing mbeans.
In my jndi.properties file I have written as follows
My client program is as follows
1. Properties prop=new Properties(new FileInputStream("jndi.properties"));
2. InitialContext context=new InitialContext(prop);
3. Object obj=context.lookup("MyEjb");
Line 1 and 2 has no problem, but in line 3 when I look up my ejb in server it returns null. I am not using any firewall and my necessary ports are open.
When I run my java client program in linux machine where my JBoss server is located then no problem occurs.
Try this. Enter the following at a command prompt on Windows:
telnet 192.168.1.104 1099
The last line of the response shpould have an IP address in it. On my PC it looks like:
If the IP address does not match that of your Linux box, add the following line to your /etc/hosts file:
192.168.1.104 <simple-pc-name> <pc-name-with-full-domain>
192.168.1.104 linuxbox1 linuxbox1.cox.net
My problem has been solved.
Thanks to everyone for giving me the solution.
I have the same problem. How did you solve it?
I have the same issue, and in log file i am getting some thing like this.
Exception in thread "main" javax.naming.CommunicationException: Could not obtain connection to any of these urls: R2SP11:11099 [Root exception is javax.naming.CommunicationException: Failed to connect to server R2SP11/192.168.1.46:11099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server R2SP11/192.168.1.46:11099 [Root exception is java.net.ConnectException: Connection refused: connect]]]
I am getting something like this R2SP11/192.168.1.46