×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    22

    Location API error on S60 Emulator

    Hi all,

    I am developping a location based application on J2ME.

    My target devices are the MIDP 2.0 and CLDC 1.1
    devices that have the JSR 179 package.

    I wanted to do some testing using the NOKIA emulator : S60_3rd_MIDP_SDK for NOKIA 5500 devices

    The application seems to run fine except that I get this strange error log in the netbeans console.

    I don't know what's going wrong and I'm not sure if its related to my midlet or to the emulator itself.

    Any Help appreciated


    Here are the errors I'm getting :


    JVMJNCK038E JNI error in SetObjectArrayElement: Argument #2 (0x3A5214FC) is not a valid object reference. It's type is: local reference in another thread
    Nokia/5500: JVMJNCK080E Error detected in the outermost frame of an attached thread
    Nokia/5500: JVMJNCK023E JNI error detected. Continuing...
    Nokia/5500: JVMJNCK034E JNI error in SetLongArrayRegion: Argument #2 is not a jlongArray
    Nokia/5500: JVMJNCK077E Error detected in com/nokia/mid/impl/symbian/location/LocationProviderImpl._getQualifiedCoordinates(II[D[F[Ljava/lang/StringJ
    Nokia/5500: JVMJNCK023E JNI error detected. Continuing...
    Nokia/5500: JVMJNCK034E JNI error in SetIntArrayRegion: Argument #2 is not a jintArray
    Nokia/5500: JVMJNCK077E Error detected in com/nokia/mid/impl/symbian/location/LocationProviderImpl._getQualifiedCoordinates(II[D[F[Ljava/lang/StringJ
    Nokia/5500: JVMJNCK023E JNI error detected. Continuing...
    Nokia/5500: Latitude = 61.44853333333333 Longitude = 23.85471666666667

  2. #2
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: Location API error on S60 Emulator

    To me it looks like that there is something wrong in your code... Could it be something related to where you store the coordinates you get from the system??? (hard to tell without seeing the code)

    Hartti

  3. #3
    Registered User
    Join Date
    Jan 2008
    Posts
    22

    Re: Location API error on S60 Emulator

    Ok thanks for helping me .

    here is a bunch of code :

    Code:
    public class Locator implements LocationListener {
        
        
        Criteria cr;
        LocationProvider lp;
        
        double lastKnownLatitude = 0;
        double lastKnownLongitude = 0;
        
         Vector locationChangedListeners = new Vector();
        
        /** Creates a new instance of Locator */
        public Locator() {
            
            
           
            
            cr = new Criteria();
            cr.setHorizontalAccuracy(500);
            cr.setVerticalAccuracy(500);
            cr.setCostAllowed(false);
            
            try {
                lp = LocationProvider.getInstance(cr);
            } catch (LocationException ex) {
                System.out.println("error when trying to get an instance of location provider");
                ex.printStackTrace();
            }
            
        }
        
        public void startLocating(){
            
            try {
    
                lp.setLocationListener(this, -1, -1, -1);
    
            }catch (Exception e) {
                System.out.println("error occured when trying startlocating");
                e.printStackTrace();
             }
        }
    
    
    
     public void locationUpdated(LocationProvider locationProvider, Location location) {
            
            LocationUpdater locationUpdater = new LocationUpdater(location);
            Thread lit = new Thread(locationUpdater);
            lit.start();
            
        }
        
    --> Nested Class here for threaded location updates:
    
     class LocationUpdater implements Runnable{
            
            Location location;
            
            LocationUpdater(Location location) {
                
                this.location = location;
            }
            
            public void run() {
      
                try {
                    
                    Coordinates c = location.getQualifiedCoordinates();
                    if (c != null) {
                        
                        lastKnownLatitude = c.getLatitude();
                        lastKnownLongitude = c.getLongitude();
    
    
     System.out.println("Latitude = " + lastKnownLatitude + " Longitude = " + lastKnownLongitude );
                        
                        
                        updateListeners(lastKnownLatitude, lastKnownLongitude);
                        
                    } else {
                        
                        System.out.println("\nnull coordinate");
                       
                    }
                    
                } catch (Exception e) {
                    
                    System.out.println("There was an error when trying to get the coordinates");
                    System.out.println("\nexception");
                   
                }
            }
            
        }
        
    }

    at the line
    System.out.println("Latitude = " + lastKnownLatitude + " Longitude = " + lastKnownLongitude );

    Latitude and Longitude are sent to the output and this appears correctly ( check in my previous post) ... so I get the Location correctly but I have these strange messages appearing for some reason ...


    Thanks for helping out !

  4. #4
    Registered User
    Join Date
    Mar 2008
    Posts
    2

    Re: Location API error on S60 Emulator

    I'm getting exactly the same errors in a location app.

    To check it over I created a very simple scratch midlet (see below) to discount anything else in my application, but I still get the errors.

    protected void startApp() throws MIDletStateChangeException {

    LocationProvider lp = null;

    try {
    lp = getProvider();
    } catch (LocationException e) {
    e.printStackTrace();
    }
    if (null == lp)
    throw new IllegalStateException("Failed to get Location provider");

    lp.setLocationListener(new LocationListener() {
    public void locationUpdated(LocationProvider provider, Location location) {
    System.out.println("Location Update: " + location.toString());
    }

    public void providerStateChanged(LocationProvider provider, int newState) {
    System.out.println("Provider state Update: " + newState);
    }
    }, -1, -1, -1);
    }


    private LocationProvider getProvider() throws LocationException {
    Criteria c = new Criteria();
    c.setHorizontalAccuracy(100);

    return LocationProvider.getInstance(c);
    }

  5. #5
    Registered User
    Join Date
    May 2008
    Posts
    2

    Re: Location API error on S60 Emulator

    any solutions to this problem? Have the same issue with same code on Nokia S60 SDK.
    The emulator with SUN Wireless SDK works.

    JVMJNCK038E JNI error in SetObjectArrayElement: Argument #2 (0x3DB6E6E4) is not a valid object reference. It's type is: local reference in another thread
    JVMJNCK080E Error detected in the outermost frame of an attached thread
    JVMJNCK023E JNI error detected. Continuing...


    EclipseME: 1.7.9
    Eclipse: 3.3.2
    S60 SDK: S60_3rd_FP2_SDK
    Last edited by obelikan; 2008-06-03 at 09:15.

  6. #6
    Registered User
    Join Date
    May 2008
    Posts
    2

    Re: Location API error on S60 Emulator

    if i use the older version Nokia S60_3rd_MIDP_SDK_FP1 i don´t receive this error.
    Looks like a JNI-bug in S60_3rd_FP2_SDK.

  7. #7
    Registered User
    Join Date
    Jun 2008
    Posts
    14

    Re: Location API error on S60 Emulator

    exactly the same problem here in my LBS. it works very smooth at WTK but when i test it on S60 SDK i got this error.

    anyone find a cure?

    i think something wrong with the locationupdated() function, i get this error everytime my locationupdated function called by my listener...

    This error showing everytime but BEFORE the locationupdated() called by the listener! I couldnt fix it.

    JVMJNCK038E JNI error in SetObjectArrayElement: Argument #2 (0x4ADEEBA8) is not a valid object reference. It's type is: local reference in another thread
    JVMJNCK080E Error detected in the outermost frame of an attached thread
    JVMJNCK023E JNI error detected. Continuing...
    Last edited by jrgarga; 2008-06-13 at 14:48.

  8. #8
    Registered User
    Join Date
    Nov 2008
    Posts
    2

    Unhappy Re: Location API error on S60 Emulator

    Anyone (Nokia?) found a solution for this problem?

    Quote Originally Posted by jrgarga View Post
    exactly the same problem here in my LBS. it works very smooth at WTK but when i test it on S60 SDK i got this error.

    anyone find a cure?

    i think something wrong with the locationupdated() function, i get this error everytime my locationupdated function called by my listener...

    This error showing everytime but BEFORE the locationupdated() called by the listener! I couldnt fix it.

    JVMJNCK038E JNI error in SetObjectArrayElement: Argument #2 (0x4ADEEBA8) is not a valid object reference. It's type is: local reference in another thread
    JVMJNCK080E Error detected in the outermost frame of an attached thread
    JVMJNCK023E JNI error detected. Continuing...

  9. #9
    Registered User
    Join Date
    Feb 2004
    Posts
    76

    Re: Location API error on S60 Emulator

    Hi,
    I am also seeing this error message displayed when using the location API in the S60 3rd edition FP2 SDK.

    I would really like to know if I should be worried about this?

    does anyone know what is causing this?

    thanks

    Guus Davidson

  10. #10
    Regular Contributor
    Join Date
    Jul 2008
    Posts
    53

    Re: Location API error on S60 Emulator

    Hi all,
    I am also getting this error, and the strange thing is,as suggested by obelikan, this occurred only in S60 3rd Ed FP2 emulator. I cant check my code on FP2 device as I don't have one yet. But the code is running fine on FP1 emulator and device.
    Thanks
    Ashar

  11. #11
    Registered User
    Join Date
    Jun 2008
    Location
    Toronto
    Posts
    21

    Re: Location API error on S60 Emulator

    I'm getting this error too.

    No problem on the Sun emulator, but I get this error with the Nokia emulator.

    I'm running the "S60 3rd Edition SDK for Symbian OS, Feature Pack 2 v1.1" on Vista Business SP1.

    Haven't yet figured out whether I should worry about it or not.

  12. #12
    Regular Contributor
    Join Date
    Mar 2009
    Posts
    80

    Re: Location API error on S60 Emulator

    I'm getting this error too.
    The LBS Wiki Example works fine in the emulator, however with this error message:

    JVMJNCK038E JNI error in SetObjectArrayElement: Argument #2 (0x516F335C) is not a valid object reference. It's type is: local reference in another thread
    JVMJNCK080E Error detected in the outermost frame of an attached thread
    JVMJNCK023E JNI error detected. Continuing...
    JVMJNCK038E JNI error in SetObjectArrayElement: Argument #2 (0x516F335C) is not a valid object reference. It's type is: local reference in another thread
    JVMJNCK080E Error detected in the outermost frame of an attached thread
    JVMJNCK023E JNI error detected. Continuing...

    When trying to Run/Debug - I get "No active thread" instead of data. So I can't see wich object it complains about.

    When running the MIDlet in my Nokia 6210 Navigator, a Form that is shown in the Emulator is'nt show here.
    However, the thread runs, since it asks me for permissions to do the Location updates.

    Any clue is greatly appreciated.
    /Per

  13. #13
    Registered User
    Join Date
    Jun 2010
    Posts
    1

    Re: Location API error on S60 Emulator

    Same here....

    JVMJNCK038E JNI error in SetObjectArrayElement: Argument #2 (0x4ADF6A64) is not a valid object reference. It's type is: local reference in another thread
    JVMJNCK080E Error detected in the outermost frame of an attached thread
    JVMJNCK023E JNI error detected. Continuing...
    JVMJNCK038E JNI error in SetObjectArrayElement: Argument #2 (0x4ADF6A64) is not a valid object reference. It's type is: local reference in another thread
    JVMJNCK080E Error detected in the outermost frame of an attached thread

    This error raise only on the emulator. On phones i receive no errors...

  14. #14
    Registered User
    Join Date
    Feb 2010
    Posts
    20

    Re: Location API error on S60 Emulator

    same here also....

    JVMJNCK038E JNI error in SetObjectArrayElement: Argument #2 (0x5462FA4C) is not a valid object reference. It's type is: local reference in another thread

  15. #15
    Registered User
    Join Date
    Nov 2011
    Posts
    8

    Re: Location API error on S60 Emulator

    hi ,
    i have C1-01 Cell and i using Series 40 6th Edition SDK with Netbeance J2ME,
    i want get Current location so using JSR 179 Location API, and emulators working properly but cell show me following error :-
    "no class def found error java/ lang/ noclassdeffounderror javax /microedition/location/LocationException"

    Please Help me.
    Thanks
    mm.gehlot@gmail.com

Similar Threads

  1. PC Suite error: (Code: Init IMediaControl2) HELP?!
    By chunkyspudmonkey in forum General Development Questions
    Replies: 30
    Last Post: 2014-07-15, 05:44
  2. sync4j sync with the S60 emulator
    By vtulai in forum OMA DM/DS/CP
    Replies: 4
    Last Post: 2007-05-11, 06:12
  3. S60 3rd Edition Emulator under Netbeans 5.5 ?
    By Tiger79 in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2007-05-02, 13:52
  4. What is going on with Vibration on S60?
    By amd_rikus in forum Mobile Java General
    Replies: 3
    Last Post: 2006-06-16, 00:29
  5. did Nokia series was supports the Location API
    By lakshmanraob in forum Mobile Java General
    Replies: 5
    Last Post: 2005-11-16, 04:37

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×