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.
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) ?
Have a look at the JNDI API.
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.
Also check /etc/hosts for
127.0.0.1 localhost myhost.com
then read the FAQ forum
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 ?
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.
OK, I've found a trick to get it working !
in /etc/hosts I wrote:
in place of:
i.e. I assigned to 'localhost' the address defined by DHCP.
But if the address changes, should I edit /etc/hosts every time ?
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.
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:
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.