• Post Reply Bookmark Topic Watch Topic
  • New Topic

trouble with UnknownHostException

 
priscilla jolly
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!