users@jax-rpc.java.net

RE: HTTP transport error: java.net.UnknownHostException

From: Potter, Brian L <brian.potter_at_intergraph.com>
Date: Tue, 5 Oct 2004 09:31:21 -0500

kathy -
 
i've reproduced my customer's configuration, and j2ee still works for me.
there is one diff between our config's; we use DHCP and obtain IP's
automatically; he has no DHCP and hardcodes his IP's (although i tried
hardcoding mine and it still worked). could that be a factor?
 
i'm still working on the standalone jwsdp 1.4 test.
 
-----Original Message-----
From: kathy walsh [mailto:Kathleen.Walsh_at_Sun.COM]
Sent: Friday, October 01, 2004 2:01 PM
To: users_at_jax-rpc.dev.java.net
Subject: Re: HTTP transport error: java.net.UnknownHostException



Bryan-
That's what I suspect-
That's why I suggested trying this with the jwsdp1.4
k

Potter, Brian L wrote:

come to think of it, it worked using jwsdp 1.3. we never deployed under
jwsdp 1.4, although it did work on my dev machines. so maybe it's a j2ee
problem?

-----Original Message-----
From: kathy walsh [ mailto:Kathleen.Walsh_at_Sun.COM
<mailto:Kathleen.Walsh_at_Sun.COM> ]
Sent: Friday, October 01, 2004 12:48 PM
To: users_at_jax-rpc.dev.java.net <mailto:users_at_jax-rpc.dev.java.net>
Subject: Re: HTTP transport error: java.net.UnknownHostException


Brian-
do you note this problem using standalone jaxrpc?
I will look into this and let you know what I find-
It would be helpful if you could send me the clients dynamic proxy
example so that I can check for any problem I might see-
Thanks,
Kathy

Potter, Brian L wrote:

i've used J2EE 1.4 sdk to write a JAXRPC web service based on the
dynamicproxy example in the J2EE 1.4 tutorial. it works great on my
development machines, but when my customer deploys the service and makes a
request, the client crashes with:
 
HTTP transport error: java.net.UnknownHostException: JohnDoe
 at
com.sun.xml.rpc.client.http.HttpClientTransport.invoke(HttpClientTransport.j
ava:101)
 at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:69)
 at
com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.java:61)
 at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:446)
 at
com.sun.xml.rpc.client.dii.CallInvocationHandler.doCall(CallInvocationHandle
r.java:99)
 at
com.sun.xml.rpc.client.dii.CallInvocationHandler.invoke(CallInvocationHandle
r.java:71)
 at $Proxy0.login(Unknown Source)


 

apparently the request is sent using the hostname (JohnDoe) instead of the
IP address (which is what i used in the WSDL URL when i created the proxy).
the client can ping the server using the IP address, but not using JohnDoe
(for some network configuration reason i'm not entirely clear on).
 
my question is: why is the request sent to the server by hostname instead of
IP address?
 
i found this after doing a google search on my error at
http://java.sun.com/j2se/1.3/docs/guide/rmi/faq.html#netcontact
<http://java.sun.com/j2se/1.3/docs/guide/rmi/faq.html#netcontact> :
 
If your RMI application throws an UnknownHostException, you can look at the
resulting stack trace to see if the hostname that the client is using to
contact its remote server is incorrect or not fully-qualified. If necessary,
you can set the java.rmi.server.hostname property on the server to the
correct IP address or hostname of the server machine and RMI will use this
property's value to generate remote references to the server.
 
but i don't know where i can set the hostname property in my server code,
since it's not executed until after the request is made.
 
btw, my development machines are running windows XP and NT, my customer is
strictly NT.

Brian L. Potter
Software Scientist
Solutions Group
Intergraph Corporation (NASDAQ:INGR)
170 Graphics Drive, Madison, AL 35758
P 1.256.730.8219 F 1.256.730.7514
brian.potter_at_intergraph.com <mailto:brian.potter_at_intergraph.com> <
mailto:brian.potter_at_intergraph.com <mailto:brian.potter_at_intergraph.com> >,
www.intergraph.com <http://www.intergraph.com>