| Reply | « Previous Thread | Next Thread » |
|
I have a Nokia 3650 device from Cingular and I can not run my network aware application on it. My plan includes GPRS data, and I am able to send MMS content to E-Mail accounts.
I created a really simple application in order to trace the problem, and I still get the same problem. The sample application is: HttpConnection c = null; InputStream is = null; try { c = (HttpConnection)Connector.open("http://www.sun.com", Connector.READ); is = c.openInputStream(); //<< Here I get a NullPointerException. ... I am getting a NullPointerException when I try to open the input stream. The strange thing is that the exception is thrown almost immediately, like the device does not even try to reach the server. Both my application and the sample run perfectly on the Nokia 3650 simulator. So my question is what could be the problem and how can I avoid it? |
|
Hi everybody,
I've got the same problem as you. The same symptoms appears on the phone but not on the emulator. One indication on the server (a classical tomcat) is that the connection established is of type http 1.0 !!! I read everywhere that the midp1.0 requires the version http 1.1 I tested my application with others phones(Siemens and SonyErricson) and all is working well and the connections established are of type http1.1 Is there someone that can provide me the info about the exact protocol used on the 3650? Thanks Laurent |
| laurent_sobrie |
| View Public Profile |
| Find all posts by laurent_sobrie |
|
I found that the bug is apparently in the URL parsing. It seems there must be a trailing slash after the hostname when the path is empty. So in your example, try using the url:
"http://www.sun.com/" instead of: "http://www.sun.com" This is a bug because the HTTP spec states that the two URLs are equivalent. |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|