• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java URL class bug  RSS feed

 
lekkie Nakel
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess this is a bug in java.

I tried opening a page : http://nds1.nds.nokia.com/uaprof/N3250r100.xml. The page has UAProf info of Nokia 3250. It works and opens fine.

However the page http://nds1.nds.nokia.com/ does not. If you tried opening it from browser (Mozilla) it returns page not found and specifically says "The requested object does not exist on this server. The link you followed is either outdated, inaccurate, or the server has been instructed not to let you have it."

While trying to open the page with the following snippet

profile="http://nds1.nds.nokia.com/uaprof/N3250r100.xml";
URL url = new URL(profile);
SAXReader reader = new SAXReader();
Document doc = reader.read(url);

It throws an UnknownHostException.

How can I fetch this page without havign this error, there shld be a way to bye pass this.
 
Joe Ess
Bartender
Posts: 9426
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should be very wary of shouting "BUG!". More than likely the problem is with your code or configuration. I don't have dom4j installed, but your code works fine if I substitute a plain InputStream for your SaxReader. Have you eliminated SaxReader as a possible cause? Do you happen to use a proxy to connect to the internet?

Oh, and please change your displayed name to conform to our naming policy. In short, your name must be a first and last name separated by a space and not obviously fake. Thanks!
[ January 23, 2007: Message edited by: Joe Ess ]
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!