Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 1,415
Registered: ‎07-30-2008
My Device: Not Specified

persistent Bad DNS Address on valid address- how to fix?

Hi,

still need a reliable way to access the internet that makes the most reliable use of hardware and network.

Simply setting deviceside=true doesn't seem to always work. I've been stuck on this, it used to work

and now has gotten repeated errors indicated by the "+" 's below. After successfully setting some cookies,

it seems to be stuck getting a page of script. Is this error likely to be literal or could it reflect a bad mime

type etc? I shut off my call-by-call logging on httpconnection but I guess I could if in fact the error

could reflect a different problem. The prefix "conna:1" reflects the fact that the open is throwing , before I even get the connection back,

 

conn = (HttpConnection) Connector.open((url));  
    debug_loc=2;

 

err:cookie try net.rim.device.api.browser.field.SetHttpCookieEvent@80995316
err:cookie try urlhttp://bloomberg.com;deviceside=true/
err:cookie try cooke test
err:cookie try net.rim.device.api.browser.field.SetHttpCookieEvent@5ffa1dcc
err:cookie try urlhttp://bloomberg.com;deviceside=true/
err:cookie try cooke
err:latioerr: conna:1:http://ads.bloomberg.com/adstream_mjx.ads/bloomberg/home/1276076491@x31,x30,x81?;deviceside=true:jav...: Bad DNS Address++++++++++++++++++++++++++++++++++++++++++

BlackBerry Development Advisor
Posts: 15,784
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: persistent Bad DNS Address on valid address- how to fix?

A bad DNS IOException on a direct TCP connection can be triggered if the BlackBerry is unable to resolve an IP address using the carrier's DNS server.  I recommend verifying that your carrier is not having any DNS issues.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Posts: 84
Registered: ‎09-21-2008
My Device: Not Specified

Re: persistent Bad DNS Address on valid address- how to fix?

I am having a very similar problem, I have layed out more details in my post at

http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&thread.id=5412

 

This post seems to have been posted while I was composing mine.

New Developer
Posts: 1
Registered: ‎01-04-2010
My Device: X-Cingular & 8700g
My Carrier: Vodafone

Re: persistent Bad DNS Address on valid address- how to fix?

[ Edited ]

I have also same problem on blackberry.

 

I gave exactly correct url but my Blackberry gives problem that is java.io.IOException: Bad Dns Address while my application going to make Http connection with server........... Please tell me solution of this problem.............]

New Contributor
Posts: 3
Registered: ‎06-10-2010
My Device: BB 8830
My Carrier: Verizon

Re: persistent Bad DNS Address on valid address- how to fix?

Really? No one knows the cause of this problem. I have SCOURED the interwebs for a solution to no avail -- please respond if you can help. 

 

I get "Bad DNS Address" trying to make any type of network connection involving a domain name within the application that I have developed. It works on the simulator, but fails on device (8703e). The strangest part, if I put the same URL into the BlackBerry browser on the 8703e device, it works. So the device has a way of resolving the domain name, but my application does not. This implies it is a code/configuration issue with my app. If I use an IP instead of a domain name, it works on device, so this is truly a DNS problem. 

 

However, I need to resolve this problem b/c using an IP instead of a domain name is unfortunately, not an option. We do not own the IP's and they may change...

 

Any ideas?

 

Highlighted
New Contributor
Posts: 3
Registered: ‎06-10-2010
My Device: BB 8830
My Carrier: Verizon

Re: persistent Bad DNS Address on valid address- how to fix?

Turns out this was a hardware problem, in my case. The 8703e wasn't built for OS 4.5, but I had updated it to 4.5 in hopes that it would work. Tried two 8703e's and neither can resolve domain names in the app I'm developing, or the BlackBerry browser, for that matter. 

Developer
Posts: 107
Registered: ‎10-06-2010
My Device: Not Specified

Re: persistent Bad DNS Address on valid address- how to fix?

 

I managed to get past this problem by removing http:// from the main url.

 

Nitin