Can be seen from your stack trace, the exception is thrown in your code in the method showLocationView()
, the NullPointerException
is probably due to one of the parameters in the method call (country
, phoneNumber
, firstName
, lastName
,etc.) passing in a object which has not been initialised.
If coord
is at fault, you could check this as follows:
if (c == LONG_TOUCH) {
GeoCoordinate coord = longTouch.getTouchAt();
System.out.println(coord);
}
Otherwise you are on your own since you haven't explained how and where in your code country
, phoneNumber
, firstName
, lastName
,etc. are actually populated.
Where the names of the functions in the stack trace are un-obfuscated, you can ascertain the following:
com.org.whatsaround.WhatsAroundMidlet.showLocationView()
- within this method the exception is thrown.gm.commandAction()
- firing of theCommand
callback - i.e. entering your own code.ez.gestureAction()
- processing of the gesture within themaps-gesture.jar
com.nokia.mid.ui.gestures.GestureHandler.handleGestureEvent()
- This is the Gesture handler created by themaps-gesture.jar
which has been invoked due to the long press.com.sun.midp.lcdui.DisplayEventListener.process()
- this is passing events to all registered listeners, in your case this is a LONG PRESS event.com.sun.midp.events.EventQueue.run()
- underlying event loop (from the emulator perhaps?)