"Certificate error" while installing a self made midlet on S60

After struggling for a few hours, I've finally managed to pin point the cause of the "Certificate error. Contact the application developer" message that I was getting while trying to install a self made Java ME application on my Nokia E71 mobile phone. It seems it was caused by an include in one of my source files:

import com.sun.cldc.util.j2me.CalendarImpl;

I know, including anything from com.sun.* is like asking for trouble, but I have to admit that I didn't suspect it would come in this form. At first, I thought it was because my application was unsigned - hence I've tried signing it with a self certificate, but to no avail. The error did not appear on an older phone, nor in the emulator - so it was a bit mind-boggling.



Oh my god..

This is weird .... But it worked for me.

I was using the CalendarImpl in one file.. Removed it and everything started working magically.

A million thanks to Cristi.

Why is the error message so misleading.. Nokia guys please do something to atleast give the right error messages.

I spent more than a week to figure out what was going on.. tried all sorts of things including updating my phone's firmware.

Glad it helped! It took me some time to figure it out as well, it's amazing how little things like this can block you.