When testing an HTML5 app on multiple BlackBerry simulators, on some of them I was getting the error:
SECURITY_ERR: DOM Exception 18
What this turned out to be was the lack of an SD card in certain simulators. The browser was expecting to use that storage space for the SQLite DB files. Once I set up the SD card for the emulator the error disappeared.