aspose file tools
The moose likes Sockets and Internet Protocols and the fly likes trouble with UnknownHostException Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "trouble with UnknownHostException" Watch "trouble with UnknownHostException" New topic
Author

trouble with UnknownHostException

priscilla jolly
Greenhorn

Joined: Jul 10, 2001
Posts: 1
Hello,
I am writing a program that sends pages using the WCTP protocol, which basically means you do a URL post. If you lose your connection to the internet, you get an UnknownHostException. However, when the connection is re-established, you still get the UnknownHostException, and you will continue to get the exception every time you try to send (unless you re-start the app).
I have researched this problem, and I have found several bug reports and forums that mention several properties that you can set to zero, such as java.net.namelookup.cache, sun.net.inetaddr.ttl, and networkaddress.cache.negative.ttl, to solve this problem. Supposedly the bad URL mapping is being cached. I have tried to use these in java.security, and as command-line args to my program. None of these seem to work.
Any help would be appreciated.
Thanks,
pj
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: trouble with UnknownHostException
 
Similar Threads
Cannot bind on Windows 95
AccessException: unknown host
UnknownHostException
Query
Downloading Java 1.5 (or Java 5.0 also Socket programming