Skip to main content

java webstart app using wrong server name for jndi lookups on glassfish 3.1

Please note these forums are being decommissioned and use the new and improved forums at
2 replies [Last post]
Joined: 2003-06-30

I am running into a problem with jndi lookups hanging on a java web start application talking to a glassfish 3.1 server.
The server has two network ip addresses (eth0 and eth0:0), one is on a 192.168 network and one is on a corporate subnet. The boxes hostname is resolveable on the corporate subnet. The java web start clients are on the 192.168 network.
The jws client starts the whole process with javaws
The jws client starts talking to jndi using, but after a few connections to that port it appears to start using the corporate subnet. The client box on the 192.168.0.x subnet is blocked from talking on the corporate subnet and all traffic should go through the
I noticed that the sun-acc.xml file that was generated also says the server is the hostname (which is resolvable on the corporate subnet). I changed this but as expected it did not effect the java web start app.
So it would seem to me there is a bug somewhere that is causing the client to start talking to a different server name than was originally used.
I have tried setting the address for the iiop listener and this did not help. I have set the startup parameters on the client:

So I have come up with just two things: a way to force the server name through some sort of jnlp override and / or there must be a bug that causes glassfish to switch from the requested ip address of to the server name returned by "hostname"
Anybody have any thoughts?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2005-03-30

The generated JNLP contains property settings for ORB-related properties, based on which server ORB(s) are currently active. From your description it sounds as if those settings are correct.
The ACC itself does not do anything about changing what server ORB endpoint to use. Something might be happening at the ORB layer.
It might be helpful to launch your client using the appclient script to see if the same thing happens. Debugging in the Java Web Start environment is more involved, and from what you've explained it does not sound like anything specific to Java Web Start.
You are correct that the sun-acc.xml settings have no effect on Java Web Start launches. Also, you did not say how you "set the startup parameters on the client" for the ORB properties but the <property> settings in the generated JNLP are the ones in effect.
- Tim

Joined: 2003-06-30

[EDIT: Sorry about the the mobile web browser I was using does not like the editor...]
What I was trying to say is I'll get right after creating the app client version and running it, testing it, and reporting back the results.
In the mean time I have two questions.
1) There is no reason that the jndi lookups should switch which server they are talking to in the middle of running is there? I mean if it starts talking to one server ( there is no reason it should switch to some other server name / ip, right?
2) So we set the properties using the -D for the command line -- well actually the -J-D for the javaws command line. This should override what java web start gives to the client right? i.e. parameters you pass to start java web start should override what is sent by the server, right?