views:

37

answers:

1

I'm developing a j2me application - it works fine on emulator and on most phones, but on 2 Nokia devices (both with h/w java acceleration in ARM CPU) I have this error while launching the midlet:

java/lang/NoSuchMethodError: No such method a.()I.

Disabling obfuscator doesn't help. The same obfuscated or non-obfuscated jar works fine with both emulator and other cell phones. I have no idea how to debug this problem and what may be the reason. Any ideas?

I'm using j2me Polish framework if that matters, but the fail is in one of my classes (I see it when disabling obfuscator).

+1  A: 

A NoSuchMethodError means that you're trying to call a method that doesn't exist (that is, the class which is supposed to contain that method was loaded successfully, but it doesn't have that method definition). It usually happens when you're compiling against some library, then running with a different version of the library. It's also possible to cause it when you remove a method from your code, then fail to re-compile the classes which use this method.

Mike Baranczak
Note that said library could also be part of the Java Standard Library if the JDK is a newer version than the JRE on the device.
R. Bemrose
Did you notice I wrote that the failing (not found) method is one of those in my own code? And it definitely is there, it runs fine on other device.
Jarek
@Jarek: Sorry, I thought you meant that the error gets thrown from your own class. Yeah, this is a weird problem. I have no idea what could be causing it.
Mike Baranczak