Eception exception: java.lang.Error when starting a selfwritten application

Hello

I have a self written request. When I run the app on the Simulator, it throws the error above. The error takes place before any breakpoint is reached. If debugging is really hard. I put a breakpoint on ' > ', but it is never reached.

public static void main(String[] args) {

    Program program;
    try {
>>>>        program = Program.instance();
        program.run(args);
    } catch (Throwable e) {
        final String msg = _resources.getString(ERROR_COULD_NOT_START_APPLICATION) + ": " + e.getMessage();
        UiApplication.getUiApplication().invokeLater(new Runnable() {
            public void run() {
                Dialog.alert(msg);
            }
        });
        return;
    }
    ...
}

Any help is appreciated.

The problem is very simple. I used a clean class of parameters that can be Persistable. I give to uncomment the ' implements Persistable ".

Tags: BlackBerry Developers

Similar Questions

  • Eception exception: java.lang.Error when persisting the data...

    Hi all

    I am facing this error persisting my data.

    I followed the example provided to

    http://NA.BlackBerry.com/developers/resources/A13_Storing_Persistent_Data_V2.PDF

    First, I copy paste the code in a project. It was working fine. Later I managed for my use following code re

    SerializableAttribute public class HelloWorld extends UiApplication
    {
    Public Shared Sub main (String [] args)
    {
      
    Hello HelloWorld = new HelloWorld();
    hello.parseOnlineData ();
    hello.enterEventDispatcher ();
    }
    public HelloWorld()
    {
    a new screen
    Try
    {
    pushScreen (new HelloWorldScreen()); MusicStores
    pushScreen (new Settings());
    }
    catch (System.Exception e)
    {
    System.out.println ("# error" + e.getMessage ());
    }
    }
     
    / * class final HelloWorldScreen extends screen
    {
    LabelField settings private;
    public HelloWorldScreen()
    {
    Super();
    LabelField title = new LabelField ("HelloWorld example",
    LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH);
    setTitle (title);
    Add (new LabelField "(Bonjour World!",LabelField.FOCUSABLE) ");
    }
    public boolean onClose()
    {
    Dialog.Alert ("Goodbye!");
    System.Exit (0);
    Returns true;
    }
      
    }*/
     
    }

    # second class that is inherited from the screen...

    Settings/public class extends screen
    {
    most popular public static string = "most popular."
    public static String newlyadded = "newlyadded;
    public static string Bulletin = 'News ';
    public static string columns = "columns";
    public static string = "jobs" jobs
    public static string = "events" events
    public static interview of string = "interview"
    public static String indepth = 'thorough ';
     
    CheckboxField chkMostPopular;
    CheckboxField chkNewlyAdded;
    CheckboxField chkNews;
    CheckboxField chkColumns;
    CheckboxField chkJobs;
    CheckboxField chkEvents;
    CheckboxField chkInterview;
    CheckboxField chkIndepth;
    ButtonField saveFields;

    public Settings()
    {
    Try
    {
    Configuration config = StoreConfiguration.getConfiguration ();
    If (config! = null &! config.isEmpty ())
    {
    chkMostPopular = new CheckboxField ("Most popular", ((Boolean) config.getElement (mostPopular)) .booleanValue ());
    chkNewlyAdded = new CheckboxField ("Newly added", ((Boolean) config.getElement (newlyadded)) .booleanValue ());
    chkNews = new CheckboxField ('News', ((Boolean) config.getElement (news)) .booleanValue ());
    chkColumns = new CheckboxField ("Columns", ((Boolean) config.getElement (columns)) .booleanValue ());
    chkJobs = new CheckboxField ("Jobs", ((Boolean) config.getElement (jobs)) .booleanValue ());
    chkEvents = new CheckboxField ('Events', ((Boolean) config.getElement (events)) .booleanValue ());
    chkInterview = new CheckboxField ("Interview", ((Boolean) config.getElement (interview)) .booleanValue ());
    chkIndepth = new CheckboxField ("in depth", ((Boolean) config.getElement (indepth)) .booleanValue ());
    }
    on the other
    {
    chkMostPopular = new CheckboxField ("Most popular", false);
    chkNewlyAdded = new CheckboxField ("Newly added", false);
    chkNews = new CheckboxField ("News", false);
    chkColumns = new CheckboxField ("Columns", false);
    chkJobs = new CheckboxField ("Jobs", false);
    chkEvents = new CheckboxField ("Events", false);
    chkInterview = new CheckboxField ("Interview", false);
    chkIndepth = new CheckboxField ("in depth", false);
    }
       
       
    saveFields = new ButtonField ("Save")
    {
    protected boolean navigationClick (int status, int time)
    {
    persistConfigurationData();
    Dialog.Alert ("data");
    onClose();
    Return super.navigationClick (status, time);
    }
    };
    Add (chkMostPopular);
    Add (chkNewlyAdded);
    Add (chkNews);
    Add (chkColumns);
    Add (chkJobs);
    Add (chkEvents);
    Add (chkInterview);
    Add (chkIndepth);
    Add (saveFields);
    }
    catch (System.Exception e)
    {
    System.out.println ("# error Settings()" + e.getMessage ());
    }
    }
     
    Private Sub persistConfigurationData()
    {
    Configuration config = new Configuration();
    config.setElement (most popular, new Boolean (chkMostPopular.getChecked ()));
    config.setElement (newlyadded, new Boolean (chkNewlyAdded.getChecked ()));
    config.setElement (news, new Boolean (chkNews.getChecked ()));
    config.setElement (columns, new Boolean (chkColumns.getChecked ()));
    config.setElement (jobs, new Boolean (chkJobs.getChecked ()));
    config.setElement (events, new Boolean (chkEvents.getChecked ()));
    config.setElement (interview, new Boolean (chkInterview.getChecked ()));
    config.setElement (indepth network, new Boolean (chkIndepth.getChecked ()));
    System.out.println ("will persist object");
    StoreConfiguration.setConfiguration (config);
    }
    }

    # third class which is a persistence class

    Configuration/public class implements Persistable
    {
    private static Hashtable _config;
    Configuration() public
    {
    _config = new Hashtable();
    }
     
    public Object getElement (String key)
    {
    Return _config.get (key);
    }
    ' Public Sub setElement (key of type string, Boolean)
    {
    _config.put (key, new Boolean (value));
    }
     
    ' Public Sub setElement (key of type string, Boolean)
    {
    _config.put (Key, value);
    }
     
    public Hashtable getConfiguration()
    {
    return _config;
    }
     
    public boolean isEmpty()
    {
    Return _config.isEmpty ();
    }
    }

    I use the BB 8300 Simulator.  Once this error is thrown in this program, the example program that was carried out with success, also stopped running. I tried changing the 'key' to store the data in the following line of code.

    PersistentStore.getPersistentObject (0xdec6a67096f833cL);

    Using bb 8300 with eclipse Simulator.

    Please help me solve this problem.

    Thank you

    Kind regards

    Amber

    Not sure where your problem is, but there are some things that I am not comfortbable with your current code.  This is a replacement code.  You can give it a try?

    The major changes are:

    (a) in the settings, we do not create a new object of Configuration, we update the existing object.  Also note that StoreConfiguration.getConfiguration (); should never return null.

    (b) in StoreConfiguration, I tidied up to account for what was happening in fact of suite and there is never a single _data object (Configuration)

    (c) in the Configuration, the hash table is more static.

    Apart from a bit of as, these changes reflect the fact that static may not be a singleton.  If you are referring to the Configuration of two different processes (a background app started at the beginning of time and a leading user interface component started with an alternative entry), you won't see the same object simply by using a static.

    Sorry, none of the code has been compiled, but I hope you understand intentions.

    Parameters

    package com.persistence;
    
    import net.rim.device.api.ui.component.ButtonField;
    import net.rim.device.api.ui.component.CheckboxField;
    import net.rim.device.api.ui.component.Dialog;
    import net.rim.device.api.ui.container.MainScreen;
    
    public class Settings extends MainScreen
    {
    
        public static String mostPopular = "mostpopular";
        public static String newlyadded = "newlyadded";
        public static String news = "news";
    
        CheckboxField chkMostPopular;
        CheckboxField chkNewlyAdded;
        CheckboxField chkNews;
    
        Configuration config
    
        ButtonField saveFields;
    
        public Settings()
        {
            try
            {
                config = StoreConfiguration.getConfiguration();
                chkMostPopular = new CheckboxField("Most Popular", ((Boolean)config.getElement(mostPopular)).booleanValue());
                chkNewlyAdded = new CheckboxField("Newly Added", ((Boolean)config.getElement(newlyadded)).booleanValue());
                chkNews = new CheckboxField("News", ((Boolean)config.getElement(news)).booleanValue());
    
                saveFields = new ButtonField("Save")
                {
                    protected boolean navigationClick(int status, int time)
                    {
                        persistConfigurationData();
                        Dialog.alert("Data saved");
                        //onClose();
                        return super.navigationClick(status, time);
                    }
                };
                add(chkMostPopular);
                add(chkNewlyAdded);
                add(chkNews);
                add(saveFields);
            }
            catch (Exception e)
            {
                System.out.println("##### Error occurred Settings() "+e.getMessage());
            }
        }
    
        private void persistConfigurationData()
        {
            config.setElement(mostPopular,new Boolean(chkMostPopular.getChecked()));
            config.setElement(newlyadded,new Boolean(chkNewlyAdded.getChecked()));
            config.setElement(news,new Boolean(chkNews.getChecked()));
            System.out.println("Going to persist object");
            StoreConfiguration.storeConfiguration();
        }
    }
    

    StoreConfiguration

    package com.persistence;
    
    import net.rim.device.api.system.PersistentObject;
    import net.rim.device.api.system.PersistentStore;
    
    public class StoreConfiguration
    {
        private static PersistentObject store;
        private static Configuration _data;
    
        private StoreConfiguration()
        {
    
        }
    
        static
        {
            store = PersistentStore.getPersistentObject(0xe63e08aacd575338L);
    
            Object storedObject  = store.getContents();
            if ( storedObject instanceof Configuration ) {
                // we have what we want - cast it
                _data = (Configuration) storedObject ;
            } else {
                _data = new Configuration();
                StoreConfiguration.setConfiguration(_data);
            }
    
        }
    
        public static Configuration getConfiguration()
        {
            return _data;
    
        }
    
        public static void storeConfiguration()
        {
            System.out.println("setConfiguration  ## Going to persist object");
            synchronized (store)
            {
                System.out.println("setConfiguration  ## _data "+((Boolean)_data.getElement("mostpopular")).booleanValue());
                store.setContents(_data);
                store.commit();
            }
        }
    }
    

    Configuration:

    package com.persistence;
    
    import java.util.Hashtable;
    
    import net.rim.device.api.util.Persistable;
    
    public class Configuration implements Persistable
    {
        private Hashtable _config;
        public Configuration()
        {
            _config = new Hashtable();
        }
    
        public Object getElement(String key)
        {
            return _config.get(key);
        }
        public void setElement(String key, boolean value)
        {
            _config.put(key, new Boolean(value));
        }
    
        public void setElement(String key, Boolean value)
        {
            _config.put(key,value);
        }
    
        public Hashtable getConfiguration()
        {
            return _config;
        }
    
        public boolean isEmpty()
        {
            return _config.isEmpty();
        }
    }
    
  • Smartphones blackBerry eception exception: Java.lang.Error

    Hello

    After downloading the twitter app that shows the following when I try to open it.

    Eception exception: Java.lang.Error

    Nobody knows what it means and how to fix this.

    Thank you!

    poppi2000 wrote:

    Hello

    After downloading the twitter app that shows the following when I try to open it.

    Eception exception: Java.lang.Error

    Nobody knows what it means and how to fix this.

    Thank you!

    Hello

    1. try to delete the first reboot of batteries that clears the application error

    2 also try uninstalling the last app you have installed before the error and restart / disconnect the battery. You can reinstall these applications later.

    3 if there are errors, you can clean your pocket computer to clear / delete applications and reinstall the application. How to delete all data and applications from the smart phone BlackBerry with the optio security wipe...

    4 the final solution is to reinstall the operating system or all OS upgrade to the latest version. How to update or reinstall BlackBerry Device Software using BlackBerry Desktop Software

  • Eception exception: java.lang.Error

    Model BB: 9360
    OS: 7,0 Bundle 1693
    (v7.0.0.319, platform 8.0.0.391)
    Carrier: T-Mobile
    With the help of BIS
    ------------------
    Application memory: 29058608
    Current storage:
    Storage applications: 27.6 MB
    Multimedia card:
    Total: 1.8 GB
    Free: 6661,5 MB
    --------------------
    I get the error message "Eception exception: java.lang.Error" often, once the system reboots - as well reboot where the system indicates that a restart is required &, too, when there has been a reboot regular (using deReset). I recently installed app, of BBAW, "PocketDay" that generates the tgis same error when I try to launch it.
    The system of detailed view of the event is:
    Name: error
    GUID: 9c3cd62e3320b498
    Time: April 28, 2012 16:47:05
    No detail message
    net_rim_cldc (4E5413CE)
    ControlledAccess
    assertRRISignature
    0x39CD
    net_rim_cldc-11 (4E5413CE)
    Display

    0xAFCD
    pdlistlib (498F098A)
    pdlistlib

    0 x 396
    pdlistlib (498F098A)
    pdlistlib$ pdLists

    0x321D
    pdlistlib (498F098A)
    pdlistlib$ pdLists

    0x41AF
    pdlists (498D960B)
    PI

    0x66C
    pdlists (498D960B)
    PI
    main
    0 x 730

    Hello and welcome on the M1A forums!

    A few places to visit: Blackberry 101     tips & tricks

    I suggest that you remove the application of PocketDay you installed recently to AW.  Restart your device and see if that does not get rid of the error message.  Go a few days and confirm that the error remains far away.  Then you can try to reinstall the application; Perhaps the installation has been corrupted. (btw I see on the site of PocketDay all BB PocketDay products have been abandoned so maybe that is the issue.) I could not find the app in AW either.)  Let us know how it goes.

    Happy to welcome you!

  • BlackBerry smartphones this message after each reset "Eception exception: java.lang.Error.

    Hello

    Because I deleted some languages on my BB, and I kept the French, German and English language, after each reboot (after an update via BB Desktop Manager for example), I received this message:

    "Eception exception: java.lang.Error.

    I select 'OK' and that's all, but I want to solve this problem...

    Thank you.

    Hello!

    If you get this reliable error, then it is very likely that something in your OS device is damaged. This type of error is the "final" in the programming code - an event has happened for which there is no event handler in the code. I suggest to try two things (in order):

    (1) whenever random strange behaviors creep, the first thing to do is a battery pop reboot. With power ON, remove the hood back and remove the battery. Wait a minute, then replace the battery and cover. Power on and wait patiently through the long reboot - about 5 minutes. See if things return to functioning. Like all computing devices, BB suffers from memory leaks and others... with a hard reboot is the best remedy.

    (2) reload your OS:

    • KB11320 How to perform a clean reload of the BlackBerry Device Software using the Application Loader tool

    Good luck and let us know!

  • BlackBerry smartphones eception exception java.lang.error with the Installation of "MemoLock".

    I received the error of doom when I tried to install Memolock of Blackberry Apps. I have OS 5.0 and I uninstalled, cleaned and reinstalled with the same problem. I have also made sure all permissions are "allowed". What now?

    Thanks Jim! Your direct download worked like you assumed and I'm now able to enjoy an excellent product! Thanks again!

  • Eception exception java.lang.error blackBerry smartphones

    That's what I get when I explore the podcasts on my 9780. There was an update I installed this morning, but since I've never used the podcasts before that I don't know if it affected anything. Suggestions

    Hi Kel,

    Try reinstalling the Podcasts application by going to www.blackberry.com/podcasts on your browser in the device.

    Make sure you restart after installation and test again.

    See you soon,.

  • Eception exception: java.lang.IllegalArgumentException 9800 simluator and device

    First of all, let me say that this forum has been very useful development councils, of the examples and answers to difficult questions.  Thank you.  But now I have a problem that I can not find a solution for or to understand.

    I created an application that listens to the calls and when the call is disconnected it displays a screen, allows entry and persists the results.  I developed in JDE 5.0.0.25 and it worked fine on the Simulator.  When I installed on a Torch 9800, I get "Eception exception: java.lang.IllegalArgumentException" when it tries to display the entry screen.  I downloaded and installed the ATT 6.0.0.246 for 9800 Simulator and traveled the code.  I get the same exception on the Simulator.  It seems that he fails once the code that creates the screen is executed and control is returned to the operating system.  The code to display the screen looks like

    {Synchronized (application.getEventLock ())}
    UI UiEngine is Ui.getUiEngine ();.
    ui.pushGlobalScreen (oEFDS, 10, UiEngine.GLOBAL_MODAL |) UiEngine.GLOBAL_SHOW_LOWER);

    If the questions are

    1. any ideas why it worked in version 5 and not 6? I thought developing in version 5 allow more devices run the application.

    2. is there something specific for the Torch 9800 that may be cause of tha?

    OK, I found the answer to this problem.  Guess I should have looked before asking for help.

    http://supportforums.BlackBerry.com/T5/Java-development/differences-between-V5-0-OS-and-V6-0-OS-for-...

  • Error message from blackBerry Smartphones: Eception Exception: java. lang::NullPointerException

    I had a problem using whatsapp. So I deleted the program. After the reboot, I get the message: Eception exception: java.lang.NullPointerException. I had to press the OK button to access my handphone. Now, I can not download whatsapp. I get the same message. You will appreciate all the assistance. Thank you

    OK will try. Thank you.

  • BlackBerry Smartphones Eception exception java.lang.illegalargumentexception

    I have a BB 9000 and I get the error message will receive my password to connect to the device "Eception exception java.lang.illegalargumentexception" and does not know how to recover from the error.

    In addition my device crashes when I'm in the mailbox, tap Email reconciliation option. The problems started at the same time - someone can help me?

    Try to find a way to fully recharge the SW without luck - the Option simply not available in the Desktop Manager.

    Thank you very much

    I got the device as new last week (expansys).

    I did as you say.

    Backup,

    Wipe

    and immediately after the wipe when the device reboot I get the error msg in the subject line.

    When I restore items I get an error. "Error restoring databases"

    I tried the full restoration or Advance restore file by file. When I do file-by-file I first time the error when you restore the database. Records

    Thank you

  • BlackBerry Smartphones Eception exception java.lang.illegalstateexception on a storm

    Hello.  I have a storm 9530 and that you have installed several apps on the short time since then when I got it (~ 1 month ago).  When I restart or reset the phone, I get some error messages

    "Eception exception java.lang.illegalstateexception."

    The other is

    "illegal java script error '.

    What it means?
    What application is this?
    How to track it down to fix it?

    If it is not possible to say which application is the cause, how do I erase everything and start from scratch, so I can add 1 app at a time and see what app triggers errors?  I posted this question crackberry.com and blackberryforums.com but have not had someone answer which leads me to believe that they cannot be understood.

    Thanks in advance for any help you can provide me.

    Steve

    I'll start the process and let you know if what I meet problems.  It will take me a few days because calls from the families, but will post when I can.

    Thank you once again.

    Steve

  • BlackBerry Smartphones erros message "Eception exception: java.lang.NullPointerException.

    each time after you restart my storm, the following message appears on the screen: "Eception exception: java.lang.NullPointerException.

    I think because of this error that my incoming and outgoing calls are not saved in the log call... I do the following steps:

    Phone--> call--> hit-->-->--> Call Logging Options menu key select all calls to show them in the list of messages...

    When I try to access the logs of phone call since the messages folder, the same error message appears. does anyone know what what can be?

    You can delete a phone log at the same time.

    Connect the device to the desktop computer.

    Start the BB Desktop Manager.

    Go to the backup/restore

    Hit the "Advanced" button, now find and click the button ' call telephone logs "in the list and press 'Remove' (or 'Clear') under the list.

  • Eception Exception Java.lang.IndexOutOfBounds blackBerry smartphones

    Someone knows how to fix this?  I get it trying to open text thank you Messages

    Hi and welcome to the forums!

    Let us know if you have any questions.

    Thank you

    Bifocals

    KB25973 "Eception exception java.lang.indexOutofBoundsException" appears when you open the text Messages Application.

    Overview At the opening of the application of text message BlackBerry® smartphone displays untrapped following exception error message

    Untrapped exception java.lang.indexOutofBoundsException

  • Smartphones from blackBerry 8350i eception exception java.lang.NullPointerException after hard reset

    basic information:

    8350i

    v4.6.1.204 (Platform 3.0.0.73)

    Desktop Manager 4.7

    everything is good except that I was using two batteries, one in the phone and the other in a charger. When the battery is almost empty I swap with one charge naturally causing a hard reset.

    This procedure worked well for at least a week or two, until last month when I swapped batteries - after the hard reset, I had

    Eception exception: java.lang.NullPointerException

    I could make calls, but all other software were corrupted... practically nothing else worked... missing icons etc.

    tried all kinds of solutions, but the only thing that fixed it was a full-on device software erase/recharging, then a restore of data since the previous backup. at the time, I thought it was just something random and was happy to learn how to do a full charge of the software.

    then yesterday it happened again (even once, at the end of the security check immediately after the hard reset). now I'm afraid to swap batteries because it seems that every time I have hard reset it recharge a 10% chance (I guess) of corruption of software and a complete takes considerable time.

    If anyone else has noticed this? does anyone have a solution?

    can I change batteries without a hard reset; i.e. Exchange while that connected to the power supply? I have not tried this yet for fear of harming my BB.

    any help is appreciated,

    John d.

    15 seconds is too short period of time.

    It took at least a minute before returning the battery.

    Error you reported is related to badly written in device memory operating data.

    In most cases, helps to battery pull. But you must wait at least one minute before you put the battery on the device.

    When you do battery pull make sure that this device is not connected to any external device or the wall charger.

    In the event of battery pull does not help, I recommend to consider wiping the device memory.

  • Eception exception java.lang.nullpointerexception blackBerry smartphones

    Hello

    I have a BB 8520 curve which I have just updated the software (5.0) with a Mac computer and now when I want to use BBM I get this response: eception exception java.lang.nullpointerexception.

    I tried to uninstall and reinstall, traction battery and wiping, but nothing does. That this has something to do with the Mac? I will be able to use BBM again?

    It's fixed! I uninstalled and reinstalled and that did it! Before that I had not done these steps correctly. Well I hope this help anyone with the same problem!

    Greetings, L

Maybe you are looking for