In the best interest of both reminding myself of stupid mistakes, and getting a googled answer out there for the world to also avoid said mistakes, here are two stupid errors I've encountered in developing with the RIM Java Development Environment and the Blackberry Simulator:
1) If you're using the Blackberry simulator and connecting to the internet, turn on the MDS Simulator. This seems straightforward, once you realize the issue, but if you're getting your feet wet with using a connected Blackberry by developing for it, you may not realize the need for a Mobile Data Server, nor the need for running the MDS simulator when running the device simulator.
2) VerifyError: If you call a primitive that is not a part of the MIDP package (such as double
or float
), the app will compile fine in the development environment, but it won't verify and won't run in the simulator. Basically, if you run into verify errors with your Blackberry app, check to see that you're in compliance with any libraries or primitives you may be using. In my case, I was running into a problem with a graph that was looking funky because of overzealous int
rounding, so I changed 100
to 100.0
. Duh! After a lot of fuss trying to find the problem, including cleaning up my project and workspace, etc., I figured it out through a post on the Blackberry developers message boards (not google-able).