I recently encountered this problem on 6110. I'm using MMAPI classes, but only if I successfully detect MMAPI on runtime, by testing system properties ("video.snapshot.encodings" and "microedition.media.version").
I tried it on several s60 phones and on 3120, works ok. But on 6110 it throws a "cannot create class in system package" error even though the code will never execute. I suspect I will encouter this on other phones as well.
Is there a workaround to this problem? Note that this is not a problem of runtime detection of optional packages; This is a problem of having an optional package class appear SOMEWHERE in the code, on the phone which does not support it.