11-08-2010 01:19 PM - edited 11-08-2010 05:43 PM
I am writing a Web Widget using the BlackBerry Web Plug-in for Eclipse(v2.5) and the Widget SDK (v1.5).
The application includes a sqlite db to keep track of whether the user wishes to receive push notifications or not. When opening the DB connection on a live device(the new torch), i get this error:
err.message: INVALID_STATE_ERR: DOM Exception 11
i find that this occurs after formatting the media card. Here is my db connection code:
11-09-2010 07:23 AM
Can you post up the exact OS version of 6.0.0.x that you are using? As well is the device connected via WiFi or the carrier connection? Also, is the device connected to a corporate BES?
11-09-2010 09:06 AM
6.0 Bundle 695 (v188.8.131.52, Platform 184.108.40.206)
both wifi and regular at&t service
v220.127.116.115 (Bundle 1576, Platform 18.104.22.168)
both devices not connected to a corporate BES
11-09-2010 09:09 AM
Have you been able to verify which statement or line of code is causing the error?
11-09-2010 09:26 AM - edited 11-09-2010 09:39 AM
When i try to open the database: openDatabase("myDb", "1.0", "myDb", dbSize);
it throws an exception with the err name and message i have printed in the original post(only after formatting the media card). note that this is not the case on the curve, only the torch.
for the httprequest the error i get in the catch block is:
NETWORK_ERR NETWORK_ERR: XMLHttpRequest Exception 101
the execHttpRequest function always returns "no response"
edit: also note that my url has many parameters being sent with it:
11-09-2010 11:08 AM
I'm not sure that this is cause of the http request error, but it looks like you should be using GET instead of POST.
POST method will send the parameters separate from the url.
11-09-2010 02:13 PM
I did not see in your code snippet if you do the following:
var htttpReq = new XMLHttpRequest();
As this will need to be done at least once before you can successfully make a request.
With your code doing the request synchronously you might went to make a new XMLHttpRequest with each request.
11-09-2010 03:15 PM
I failed to mention that i have a global httpReq variable which is initialized. I have tried creating a new XMLHttpRequest for each request i make, no luck - same error. I get the same error running it in a regular computer web browser. erg.
maybe i'll resort to setting the src of an iframe to my desired host if the app is running for the first time