Blackberry and the mysterious “verification error”

17. October 2010 Uncategorized 0

I’ve been working on a Blackberry project for the past few months.  I enjoy the challenge of learning a new language (J2me) and some new approaches.  Sometimes, however, I get stuck in a rut because I’m not used to the tools and language.

The last week has been an example of this.  I had some functionality as a package inside of a library in Eclipse.  However, as I expanded my application that library wasn’t a good spot for it.  As a result, I moved the package to its own “core” library.  When I ran my debug build to test it out I kept getting a crash when I tried to launch the program.

No breakpoints were hit, which was confusing because I had put a breakpoint right inside the main() block.  Console was telling me  that my app could not load because my main module “has verification errors.”

Turns out even though I added my new library to the appropriate build paths, I had forgotten to update my run configuration screen in Eclipse.  I went to the Run menu and clicked the Debug Configuration.  Sure enough, the new library was unchecked.  I checked that, hit apply and close.  Once I ran it again everything was back to normal.