-
1. Re: Remote clients JNDI problem
dsengupt Mar 11, 2004 1:01 PM (in response to luigifonti)Your second set seems to be correct. Can you try by doing a "env = new Properties()". Additionally, have you tried by using the environment as VM parameters instead of creating a new Property? Something like -Djava.naming.provider.url=192.168.0.170:1099...etc. etc...
Additionally, you can also try by doing a System.setProperty on these values and use the default constructor of InitialContext. -
2. Re: Remote clients JNDI problem
luigifonti Mar 12, 2004 4:29 AM (in response to luigifonti)Thanks, but none of your suggestion works, sorry.
My question is:
Is there a way to list all the bounded names in jboss server, using a remote client (not jmx-console) ? -
3. Re: Remote clients JNDI problem
darranl Mar 15, 2004 7:14 AM (in response to luigifonti)Have a look at the JNDI API.
-
4. Re: Remote clients JNDI problem
adrian.brock Mar 15, 2004 9:34 AM (in response to luigifonti)context.listBindings()
Regards,
Adrian -
5. Re: Remote clients JNDI problem
luigifonti Mar 15, 2004 4:05 PM (in response to luigifonti)Yes I have already tried Context.list() and Context.listBindings(), but these methods require a name as parameter. What a name should I pass as parameter to list all the bindings ? I tried with "*", with "all" and more, but the result is always the same: object not found in table.
All the jboss installations I made on Windows XP work perfectly. Only this one on Mandrake Linux ha this crazy problem. -
6. Re: Remote clients JNDI problem
adrian.brock Mar 15, 2004 4:32 PM (in response to luigifonti)Try ""
Also check /etc/hosts for
127.0.0.1 localhost myhost.com
then read the FAQ forum
Regards,
Adrian -
7. Re: Remote clients JNDI problem
luigifonti Mar 15, 2004 4:33 PM (in response to luigifonti)OK, I tried now Context.listBindings(""), i.e. the empty name which should represent the Context itself.
Again, I have the error: object not found in table.
I am sure the problem is not on client side: if I try with different external servers (Win XP), things work. Only that damned server on Mandrake Linux gives this kind of problem.
Do you know if there are working jboss servers on that platform ? -
8. Re: Remote clients JNDI problem
adrian.brock Mar 15, 2004 4:40 PM (in response to luigifonti)Exactly. With the config I show above, the server will tell the client to connect to
itself. i.e. 127.0.0.1
You can get more details if you enable
log4j TRACE logging for "org.jnp" on the client.
Regards,
Adrian -
9. Re: Remote clients JNDI problem
luigifonti Mar 16, 2004 3:54 AM (in response to luigifonti)OK, I've found a trick to get it working !
in /etc/hosts I wrote:
192.168.0.170 localhost
in place of:
127.0.0.1 localhost
i.e. I assigned to 'localhost' the address defined by DHCP.
But if the address changes, should I edit /etc/hosts every time ? -
10. Re: Remote clients JNDI problem
luigifonti Mar 16, 2004 9:21 AM (in response to luigifonti)I have seen that this problem is not specific to jboss, but more generally involves RMI.
With localhost defined as 127.0.0.1 in /etc/hosts, RMI based servers refuse servicing the requests, and force remote clients to address the node 127.0.0.1 (i.e. the client itself).
If you assign to localhost the real machine IP address, things work.
I would like to know if this is a Mandrake bug, or more generally a Linux bug. -
11. Re: Remote clients JNDI problem
luigifonti Mar 16, 2004 4:23 PM (in response to luigifonti)I have found a better solution now. In /etc/hosts, I added a second line associating the real IP address of the Linux machine to an IP name, instead of changing the localhost definition:
127.0.0.1 localhost
192.168.0.170 myhost.com
With this addition things work fine.
Loooking around in forums I have seen that this is a well known problem with jboss under linux, and it should be listed in FAQ.
Luigi Fonti