My app works fine on the Simulator, but no devices make null pointer exception

my application works fine on the Simulator, but when I try to run on the device its getting null pointer exception

I have also to debug the code and found that none of the allocated objects. Not a memory allocate unique.

For example I allcated String object in constructor

Dim myString As String = new String ("my String");

But its not allocated and even I put permissions

Please help me

I was getting exception somewhere

Tags: BlackBerry Developers

Similar Questions

  • my printer worked fine in the past, but now when I try to print, it says document is in Quebec, but it is offline. What's wrong?

    my printer worked fine in the past, but now when I try to print, it says document is in Quebec, but it is offline. What's wrong?

    dougnatz,

    Try to run delete print jobs to remove all blocked the queue print jobs.

    Rick

  • Flash works fine on the computer, but bad in the server

    I exported a flash file in adobe encroe dvd

    I got the 4 files

    1 xml

    2 swf

    3 index.html

    4. sources with .f4v and .png

    When the file is placed in my computer it workes perfect when we double click index.html

    When I copy it on the server and after this write address: my site Web/name of the folder/index.html, I don't see the film as it should.

    the film is a menu driven moving with 9 squares inside. each square is a film of movement.

    When I put the mouse over a square - a red frame is built around sound indicating the selected film.

    When I click with the mouse, he opens movies.

    all that looks good when the file is on my computer. When the file is on the server I see a black background.

    When I move the mouse over the bottom seem these red images around the squares and CLICKING on THEM THE BAR EOP

    whith the volume forward, etc., but without movies or sounds.

    now, why ask your people to web server:

    http://www.spanishguitar.co.il/matzeget_hofaot/sources/meet_greet.FLV

    works as expected, when entered into a browser's address bar and

    http://www.spanishguitar.co.il/matzeget_hofaot/sources/_PGC_Bpgc_2.F4V

    gives a 404 error

    Then ask them to fix it and you're done.

  • My App works on the Simulator, but not on a handheld

    Using the JDE 4.5 with 4.1.2 MDS Simulator

    Eclipse with JDE

    ---

    My app works fine on the simulator using MDS.

    The application simply pushes a screen and then creates a thread (an object of type LoadScreenThread) that will take an XML file using HTTP.  The XML file is parsed and then creates a new screen and it grows by calling (from LoadScreenThread): invokeLater with an executable object what method run() calls anti-pop and the specified UiApplication pushScreen.

    I tried various things for the last 10 hours and it still does not work.

    For the HTTP connection, because I would use MDS to Internet I added the '; '. deviceside = false' suffix.

    Could someone tell me please know why it would work fine on the Simulator (MDS) and not on a portable device?

    On the handheld, I see the arrows download flicker.  But it drives not only the new screen?

    Your device is connected to a MDS (BlackBerry Enterprise Server)?

    If it's just your BB private, so it's rather unlikely, and you will very probably connected to BIS. But you have to grant special permissions to RIM using BIS to use other means like the WAP2 gateway.

    Take a look at this thread:

    http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&thread.ID=29103

    It explains basically everything on the sides of the network connectivity to BlackBerry.

  • GPS works on the Simulator, but not on phone

    Hello

    I created a simple application that gets the location of the device's GPS. The app works perfectly on the Simulator, but I have no GPS updates on the phone. I've been in options-> device-> Location.Settings on the phone and can see the GPS updates are coming through. But the app says there is no valid received GPS.

    I tried it on BlackBerry 9800... All I get on the phone is 'pending GPS update', that my app is displayed if no valid GPS don't trouble is received.

    Thanks in advance.

    Kevin

    C criteria = newCriteria();

    c.setHorizontalAccuracy (Criteria.NO_REQUIREMENT);

    c.setVerticalAccuracy (Criteria.NO_REQUIREMENT);

    c.setCostAllowed (true);

    c.setPreferredPowerConsumption (Criteria.POWER_USAGE_HIGH);

    LocationProvider lp;

    Try

    {

    LP = LocationProvider.getInstance (c);

    if (lp! = null)

    {

    lp.getLocation (timeout);

    lp.setLocationListener (newMyLocationListener(),-1, 1, 1);

    }

    on the other

    {

    Dialog.Alert ("sorry - your phone does not support GPS");

    }

    }

    catch (Exception e)

    {

    System.

    Err.println (try ());

    }

    }

    private class MyLocationListener implementsLocationListener

    {

    public voidlocationUpdated (LocationProvider provider, a place)

    {

    if (location! = null& location.isValid ())

    {

    QualifiedCoordinates qc = location.getQualifiedCoordinates ();

    Try

    {

    Lat string = Double.toString (qc.getLatitude ());

    String long = Double.toString (qc.getLongitude ());

    UpdateScreen ('place of registration successfully');

    }

    on the other

    {

    UpdateScreen (' Failed to day location ');

    }

    }

    catch (Exception e)

    {

    }

    }

    on the other

    {

    UpdateScreen ("waiting for GPS update");

    }

    }

    public void providerStateChanged (LocationProvider provider, intnewState)

    {

    TODO: If the provider has been disabled, then disable the reporting

    }

    }

    Try the examples of programs that you can find here:

    http://supportforums.BlackBerry.com/T5/Java-development/BBM-shareContent/m-p/1796237#M203486

    or here:

    http://supportforums.BlackBerry.com/T5/Java-development/simple-location-API/Ta-p/1145951

    See if these work on the unit.  If they do, look at the code listed and compare with yours.

  • Can deploy app in the Simulator, but not to the device

    Sorry about this newbie question, but how is it that a simple HelloWorld application compiled in Eclipse runs just fine on the Simulator, but cannot be installed on a 8320 Curve by the Blackberry Desktop Software?

    I use the latest version at all.  The message returned by the desktop software is:

    ! There was an error importing files.
    No additional applications can be found. Your file can
    contain applications that already exist in the list of applications,
    are not compatible for your device, or errors.

    However, I am able to deploy the application on the handset using the command line tool:

    C:\Eclipse\plugins\net.rim.ejde\vmTools\JavaLoader.exe -usb load \workspace\HelloTest\deliverables\Standard\5.0.0\HelloTest.jad
    

    This installs the application, which then runs correctly on the device.  I can then reload the list of app on the Blackberry Desktop Software tool and it shows HelloTest, but under the properties of the Application-> dependencies it says:

    "Application not available (net_rim_cldc).

    It seems that some dependence crept in the generation of the application and that confuses the desktop tool.  The curve is running 4.5 OS.

    Should I just throw this office tool, or how can I clean the application so that it installs correctly?  Obviously, this is just foreplay before building a much broader application, and I wish I had these little glitches will hamper ASASP.

    Thanks for any help!

    You should be able to download a plugin 4.5 on the site to update. Go to "help > install new software" to open the screen of software available. If you have not yet done so, add the updated BlackBerry site to your Eclipse configuration:

    1. Click on "available software Sites.
    2. Click on the button 'Add '.
    3. Enter a name such as 'BlackBerry update location' and set the location http://www.blackberry.com/go/eclipseUpdate/3.5/java
    4. Click OK, then OK again to return to the screen of the software available

    The 'working with' menu drop-down, select the location of BlackBerry Update (or whatever you named it). Expand the BlackBerry Java plug-in category and you should be able to select an appropriate plug-in version.

  • Works very well in the Simulator, but when it is installed through the Desktop Manager questions

    OK so as well Hello world and production apps work correctly on the Simulator... I had some advanced api like blackberry.identity but I removed it because he yelled at me for code signing... I removed the advanced permissions but usually always open... I can see the application in the list of downloads, but clicking nothing

    I tried with the sample application engines and the same thing... click on the application icon, but nothing happens...

    Once again any word on sim and no not use any "features" except the blackberry.ui (on production app)

    blackberry 9630 tour

    Thanks for your help!

    All the BlackBerry Widgets require the signature, even if you are not using a single line of JavaScript.

    The software BlackBerry Widget SDK generates the Java code required to create the widget.  The display of web content in a Java BrowserField, which requires a signature.  Therefore, all the widgets must be signed.

    Code signing keys are usually issued within 2 days of the order, but may take up to 10 business days.

  • KSOAP2 working on the Simulator, but failed on the device. Help, please!

    Hi all. Please, I need support on this issue.

    I have a request of KSOAP2 running which:

    1) Œuvres ALLWAYS on the Simulator (9700 Simulator)

    2) FAILS on the device when you use 3 G Internet Link

    3) work on the device when hard reseting it and directly using Wi - Fi link (if you switch to 3 G, it starts failing).

    When it do I get the following error:

    type of org.xmlpull.v1.XmlPullParserException:Unexpected (position: TEXT SocketException:...@1:33 in java.io.InputStreamReader@hexhere)

    Some other times I get an IO error faced:

    net.rim.device.cldc.io.ippp.SocketBaseIOException: Connection timed Out

    The funny thing is that it works through 3 G as 1 in 40 times... it seems that 3 G connection is too slow to KSOAP2 to work properly, or something like that. The complex type is small (8 strings).

    My webservice is a webservice VB.NET located on the production IIS server. It works well because it responds to any request of Simulator.

    Additional data:

    -Other Internet applications of device (such as the Internet browser) works well through 3G even when my application does not always succeed. Coverage of 3G service is excellent.

    -J' use JRE 5.0.0.

    -Device is a BlackBerry Bold 9700

    -Webservice is written in VB.NET in the production on the Internet Server, and it works perfectly because it responds to each request of Simulator.

    -J' use javaloader.exe to deploy the cod to the device files (both, ksoap library cod and cod of my project)

    -L'application is not signed.

    -Once the application starts breaks down (when you switch to 3G) it maintains in default if you return to the WiFi again.

    Here is my code:

    String res="";
    boolean error=false;
    Vector seguimientos = null;
    
    SoapObject m_Soapobject=new SoapObject("urn:tempuri", "GetSeguimientos");
    SoapSerializationEnvelope m_Envelope=new SoapSerializationEnvelope(SoapEnvelope.VER11);
    m_Envelope.encodingStyle = SoapSerializationEnvelope.ENC;
    
    m_Soapobject.addProperty("strInstance", "r2sistemas");
    m_Soapobject.addProperty("user", "myuser");
    m_Soapobject.addProperty("password", "mypassword");
    m_Soapobject.addProperty("comercialId", "3");
    
    m_Envelope.addMapping("urn:tempuri/encodedTypes", "Seguimiento", new Seguimiento().getClass());
    m_Envelope.bodyOut = m_Soapobject;
    m_Envelope.setOutputSoapObject(m_Soapobject);
    
    HttpTransport ht = new httpTransport("http://www.productionserver.com/service1.asmx");
    ht.setXmlVersionTag("");
    
    try {
        ht.call("urn:tempuri/GetSeguimientos", m_Envelope);
        SoapObject respuesta=(SoapObject)m_Envelope.bodyIn;
        seguimientos=(Vector)respuesta.getProperty(0);
        } catch (IOException e) {
        error=true; res="IO Problem: " + e.toString();
        } catch (XmlPullParserException e) {
        error=true; res="XMLParser problem: " + e.toString();
        }
    
    if(error!=true) {
        Seguimiento seg=(Seguimiento)seguimientos.elementAt(1);
        res=seg.Comentario;
        }
    
    this.add(new LabelField("aa"+ res));
    

    I read on this forum that ksoap2 cannot treat the http error messages. You must download the KSOAP source and change it to do this. Something like ServiceConnectionMidp. The message is this: link

    I use a port KSOAP2 library: ksoap2-j2me-core-prev - 2.1.2.jar, like I said it works fine on the Simulator. I tried to download the source code of KSOAP to debug in the failing methods, but was unnable to do compile ok on Eclipse.

    I really am stuck at this point. Please, any help would be great.

    Thank you in advance.

    Ok. Further reading took me to the problem.

    AFAIK, there are 5 ways to connect to web addresses from a BlackBerry device.

    Of course, the BB Simulator uses one that works with my WS. When my BB is connected via wifi it works as well. However, when I use the 3g from my device connection, I should mention the destinies of correct connection on the connection URL parameters.

    That's what I did:

    I read this: 1 Source

    And this (Spanish): Source 2

    Of course, I noticed that my BB is connected to a BES company, I must indicate the correct ConnectionUID to my address book of device on the connection string. So now the line in my code is:

    HttpTransport ht = new HttpTransport("http://www.address.com/service1.asmx;deviceside=false;ConnectionUID=YOURCONNECTIONUID");
    

    To find your UID connection, take your device, go to Options - Advanced Options - service book. Choose a book of service applications that connects successfully on your device (in my case Blackberry Internet Browser service), open it and copy the ConnectionUID. Then, paste it in the connection string.

    Now, it works great!

    My next challenge is to find connection string parameters correctly so that the application works on any device, not only on my ones company BES.

    Someone knows what should be the standard setting?

    I hope that my help of inquiry.

    P.S. still cannot complete successfully ServiceConnectionMidp...

  • Event Swipe works in the Simulator, but not on the device

    I'm using panels on my 9900 and I have 4 panels that the user will slide back and forth similar functioning BB app world, changing the summary of comments on signs etc..

    My expection who was up and down for scanning of touch screen functions and the touchpad has the same function by default, that is to the left and right slide on the screen should also be identical to forehand and left on the block to tack. But it does nothing for the panels when you use the trackpad.

    So I replace NavigationMovement and and can see the touchscreen and the track pad to generate a NavigationMovement event with +/-x according to the direction slide. So I'm first puzzled why hit swiping the trackpad on the left and right triggers not the same behavior by hitting swiping left and right on the touch screen.

    Accept that as a limitation of the API, I added my own features to NavigationMovement to inject a key event when user left or right on the trackpad moves. As follows:

    EventInjector.TouchEvent [] moveEvents = new EventInjector.TouchEvent [7];

    moveEvents [0] = new EventInjector.TouchEvent (TouchEvent.MOVE, 420, -1, -1, 60-1);
    moveEvents [1] = new EventInjector.TouchEvent (TouchEvent.MOVE, 360, 60,-1, -1, -1);
    moveEvents [2] = new EventInjector.TouchEvent (TouchEvent.MOVE, 300, 60,-1, -1, -1);
    moveEvents [3] = new EventInjector.TouchEvent (TouchEvent.MOVE, 240, 60,-1, -1, -1);
    moveEvents [4] = new EventInjector.TouchEvent (TouchEvent.MOVE, 180, 60,-1, -1, -1);
    moveEvents [5] = new EventInjector.TouchEvent (TouchEvent.MOVE, 120, 60,-1, -1, -1);
    moveEvents [6] = new EventInjector.TouchEvent (TouchEvent.MOVE, 60, 60,-1, -1, -1);
    EventInjector.TouchEvent.injectSwipeGesture (480, 60, moveEvents);

    It works perfectly in the Simulator, but on the device, there is no movement at all. So I thought that maybe the touchpad on the Simulator is more sensitive than on the real device, so I added a menu item to perform the injection above. Again, this works perfectly on the Simulator, but nothing on the device.

    Has anyone tried this brain left and just before the injection?  Up and down the injection works perfectly on the device.

    Have you enabled event injection in request permission settings for your application?  It is disabled by default.  You can do so by going to Options-> Application, select your application and click on change permissions.  You can also request these permissions programmatically using the class ApplicationPermission.

  • my world event working on the Simulator, but not on the device

    Hi guys,.

    I'm using BB bold 9000. I have attached directly to the device and debugging. I'm getting "background switch detected for myapp (261) that does NOT have the tunnels open - defocus is NOT called" on the device debugging. but it works fine on the Simulator (my ultimate task is slaughtering an application from another application) any idea?

    Thank you

    Thank you guys, it's worked.

  • Work of Auditors in the Simulator but not actually "BOLD"

    Hey - if anyone knows how to get a "BOLD" handset to allow listeners (PhoneListener, KeyListener, OutboundMessageListener) I would appreciate it. My app uses listeners and works very well in the Simulator, but only sporadically on the actual handset. Does anyone know how it works?

    See you soon,.

    Justin Dutoit

    I think you need to post a snippet of a listener of non-working, if you want to help more with this.

  • How to return to the earlier version of El Capitan (from 10.11.3 at 10.11.1) with Time Machine? My HP LaserJet M475dw MFP printer worked fine with previous versions, but fails miserably to recognize the device on the same Wi - fi network now?

    How to return to the earlier version of El Capitan (from 10.11.3 at 10.11.1) with Time Machine? My HP LaserJet M475dw MFP printer worked fine with previous versions, but fails miserably to recognize the device on the same Wi - fi network now with 10.11.3.  I would like to restore the previous version of the operating system without losing any data created in various applications since the 10.11.1.  Fortunately, I had only to use Time Machine is rare over the years, I do not know if you have to return the entire drive to the chosen date or it can somehow just go back to a previous state of OS.  Any suggestions, much appreciated.

    OS X El Capitan: revert to a previous version of OS X

  • LifeCam HD-5000 works fine in other programs, but not in the Lifecam software accompanying

    My Lifecam HD-5000 works fine in other programs, but not in the Lifecam software that comes with it, I get "There is no camera connected to this computer." I tried to restart and uninstall then reinstall the software.

    Hello

    LifeCam HD-5000 - Support and warranty (3 years)
    http://www.Microsoft.com/hardware/en-us/p/LifeCam-HD-5000/7ND-00001#support

    Microsoft Hardware warranties
    http://www.Microsoft.com/hardware/warranties.mspx

    Support for WebCam
    http://www.Microsoft.com/hardware/digitalcommunication/support/default.mspx
    http://www.Microsoft.com/hardware/en-us/support

    Product Solution Center
    http://support.Microsoft.com/hardware

    MS material takes in charge and recourse in warranty (90 days support of)
    the date of the 1st call).

    1-800-936-5700 or 1-800 Microsoft (642-7676)

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

  • I just got a new modem (Arris SB6190) and now my Airport Extreme does not connect.  It worked fine with the previous modem (a rented one TWC).  Help!

    I just got a new modem (Arris SB6190) and now my Airport Extreme does not connect.  It worked fine with the previous modem (a rented one TWC).  Help!

    Always recommended to reset the airport back to settings by default and then set up again whenever you have a new modem or change your Internet Service provider.

    Turn off the new modem for at least 30 minutes. More is better.

    Perform a hard reset on the AirPort Extreme, then it turned off.

    Make sure that the Ethernet cable connects the modem to the "O" on the AirPort Extreme WAN port

    After the power of the modem 30 minutes down, turn on the modem and let it run for at least 5 minutes by itself.

    Then, turn on the airport and let it run a few minutes

    Set up AirPort Extreme again

    Important note... There are many reports of problems with the modem Arris SB and airports. Both are great products, but they do seem to work perfectly together for some users.

  • What apps work best with the pencil

    What apps work best with the pencil. Particularly interested in commenting, highlighting and rating photos and graphics.

    I like 'Fame' for handwritten notes. "Annotable" is good for the annotation of pictures and graphics. Recently, I started using "Ultimate NoteLedge" and learn what it does yet. But so far, I like it, too. And then, everything that made Adobe.

Maybe you are looking for