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

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.

Posts: 44
Registered: ‎03-17-2012
My Device: Blackberry playbook
My Carrier: none
Accepted Solution

HTTP Status 500 when I get webpage with HTTPConnection


I have a method that get a string with the  HTML source of a webpage. I use HTTPConnection utils for this. This method works perfectly, I used this in other project and I didn´t have any problem. In my new project I want to use this method again for a specific webpage(I can´t say the URL of this web).

My problem is that this page return an 'HTTP Status 500' error. If I use the BlackBerry browser,  the web loads perfectly, and in the BB simulator too. 

I thought that the problem was the HTTP Request Header, and I included some Request properties like:


httpConnection.setRequestProperty("Content-Type", rawInputContentType);

Connection", "keep-alive");
httpConnection.setRequestProperty("User-Agent", "Mozilla/5.0 (BlackBerry; U; BlackBerry 9360; es) AppleWebKit/534.11+ (KHTML, like Gecko) Version/ Mobile Safari/534.11+");
httpConnection.setRequestProperty("Accept", "text/html,application/xhtml+xml,application/xml,*/*;q=0.5");
httpConnection.setRequestProperty("Accept-Language", "es");
httpConnection.setRequestProperty("x-wap-profile", "\"http://www.blackberry.net/go/mobile/profiles/uaprof/9360_80211g/7.1.0.rdf\"");


But the error is the same. The exception is:


org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.RuntimeException: de.arvatomobile.bdev.scr.exception.MissingDeviceDetectionHeaderException


Do you know why I get this error?. Thank you.

Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: HTTP Status 500 when I get webpage with HTTPConnection

Your user-agent looks incorrect for a Blackberry device.


At the end of the day, your best bet is to get the logs from the host web site. Thios will tell you exactly what the complaint is.



Posts: 44
Registered: ‎03-17-2012
My Device: Blackberry playbook
My Carrier: none

Re: HTTP Status 500 when I get webpage with HTTPConnection

It´s resolved. It had two problems. The first, I connected with WIFI of my office, and this had very bad signal. The second, it was only neccesary to specify the user-agent, others header parameters gave problems.