problem of persistent data store

HI gentlemen

I try to put in place the persistent object store, and I have a problem.

1 problem: the key that I use for a few months, but sometimes when I getPersistentObject (key) it returns the null value, and in a certain type of bb phone, it always returns null, I what to ask is there a rule in key do?

THX

The usual practice is to use a facility to your tools to convert your package and name to an id, making it very unlikely that someone else will reuse the same ID.

I have never see a null always return phone, even though I have stored a value in it.

Tags: BlackBerry Developers

Similar Questions

  • Problem of persistent data object

    Dear Sir.

    Hello

    I am writing a module that implements the earpiece of the phone, simply

    and I would use persistent object to store information

    But I am facing the following problems:

    When I use the persistent objects, the Simulator to show that there is no instance of the application,

    as my program doesn't include any GUI,

    would my recognized program just as a Moudle and the persistent object should point the data store with an application?

    Thank you very much

    Please see the following for more information.

    http://supportforums.BlackBerry.com/T5/Java-development/persistent-data-and-uninstalling-an-app-issu...

    http://supportforums.BlackBerry.com/T5/testing-and-deployment/handle-stored-data-when-removing-an-AP...

    http://supportforums.BlackBerry.com/T5/Java-development/persistent-data-and-uninstalling-an-app-issu...

  • I need a few persistent data store help of Pentecost

    Hi, I have a problem, try to store persistent data, I m using Eclipse 3.4.2 and BlackBerry plugin, as I check my work with the correct laboratory and my code hasn´t issues only a warning I see on the laboratory code it s normal, but when I try to run the Simulator I get this:

    "Eception exception: lack of measurement of the resource.

    and this is the code

    package com.rim.someguy;
    
    //Import section
    import net.rim.device.api.ui.*;
    import net.rim.device.api.ui.component.*;
    import net.rim.device.api.ui.container.*;
    import net.rim.device.api.system.*;
    import net.rim.device.api.util.*;
    import net.rim.device.api.i18n.ResourceBundle;
    import java.util.*;
    
    public class measure extends UiApplication implements measureResource{
    
        //Variables for user interface fields
        private EditField numMeasureDev;
        private AutoTextEditField observation;
        private EditField lecture;
        private ObjectChoiceField choice;
        private EditField date;
    
        //Persistent data
        private static Vector data;
        private static PersistentObject store;
    
        //Resource bundle variable
        private static ResourceBundle _res;
    
        //MAIN
    
        public static void main(String[] args){
            measure app = new measure();
            app.enterEventDispatcher();
        }
    
        //Save Menu
        private MenuItem saveItem = new MenuItem(_res, SAVE, 110, 10){
            public void run(){
                StoreInfo nfo = new StoreInfo();
                nfo.setElement(StoreInfo.NUM, numMeasureDev.getText());
                nfo.setElement(StoreInfo.LEC, lecture.getText());
                nfo.setElement(StoreInfo.DAT, date.getText());
                nfo.setElement(StoreInfo.SEL, _res.getString(choice.getIndex()));
                nfo.setElement(StoreInfo.OB, observation.getText());
                data.addElement(nfo);
    
                //Storing data
                synchronized(store){
                    store.setContents(data);
                    store.commit();
                }
                Dialog.inform(_res.getString(APP_SUCCESS));
                numMeasureDev.setText(null);
                lecture.setText(null);
                date.setText(null);
                choice.setLabel(null);
                observation.setText(null);
            }
        };
    
        //Get Menu
        private MenuItem getItem = new MenuItem(_res, GET, 110, 10){
    
            protected int index;
    
            public void run(){
                synchronized(store){
                    data = (Vector) store.getContents();
                    LabelField label = new LabelField();
                    label.setText("Selecciona el dato a mostrar: ");
                    BasicEditField bef = new BasicEditField();
                    index = Integer.parseInt(bef.getText());
                    if (!data.isEmpty()){
                        StoreInfo nfo = (StoreInfo) data.elementAt(index);
                        numMeasureDev.setText(nfo.getElement(StoreInfo.NUM));
                        lecture.setText(nfo.getElement(StoreInfo.LEC));
                        date.setText(nfo.getElement(StoreInfo.DAT));
                        choice.getIndex();
                        observation.setText(nfo.getElement(StoreInfo.OB));
                    }
                }
            }
        };
    
        //Persistent Object
        static{
            //Resource Bundle
            _res = ResourceBundle.getBundle("measure");
    
            //Get the reference to PersistentObject and set value to Vector if is empty
            store = PersistentStore.getPersistentObject(0xdec6a67096f833cL);
            //key is a hash
            synchronized(store){
                if (store.getContents() == null){
                    store.setContents(new Vector());
                    store.commit();
                }
            }
        }
    
        //Class created for a persistent object StoreInfo
        private final static class StoreInfo implements Persistable{
    
            //Data for elements
            private Vector elements;
    
            //Fields
            public static final int NUM = 0;
            public static final int LEC = 1;
            public static final int SEL = 2;
            public static final int OB = 3;
            public static final int DAT = 4; 
    
            //in StoreInfo, add a new empty Vector with capacity of 4 elements and persist
            public StoreInfo(){
                elements = new Vector(5);
                for(int i = 0; i < elements.capacity(); ++i){
                    elements.addElement(new String(""));
                }
            }
    
            //Retrieve Vector element
            public String getElement(int id){
                return (String) elements.elementAt(id);
            }
    
            //Set Vector Element
            public void setElement(int id, String value){
                elements.setElementAt(value, id);
            }
        }
    
        //Measure constructor declaration
        public measure(){
    
            //Create a main screen
            MainScreen mainS = new MainScreen();
            mainS.setTitle(_res.getString(APPLICATION_TITLE));
            numMeasureDev = new EditField(_res.getString(TEXT1),"",
                    Integer.MAX_VALUE, EditField.FILTER_NUMERIC);
            lecture = new AutoTextEditField(_res.getString(TEXT5),"",
                    Integer.MAX_VALUE, EditField.FILTER_NUMERIC);
            date = new EditField(_res.getString(TEXT6),"");
            choice = new ObjectChoiceField(_res.getString(TEXT2),_res.getStringArray(OPTION));
            observation = new AutoTextEditField(_res.getString(TEXT3),"");
    
            //Adding elements to Screen
            mainS.add(numMeasureDev);
            mainS.add(lecture);
            mainS.add(date);
            mainS.add(choice);
            mainS.add(observation);
    
            //Adding menuItems to menu
            mainS.addMenuItem(saveItem);
            mainS.addMenuItem(getItem);
    
            //Push all elements to screen
            pushScreen(mainS);
        }
    }
    

    If anyone knows what I m hurt you showme how please!

    Two thoughts:

    1. If you have changed somehow the object type that you want to keep, you must remove the Simulator files before running again.
    2. How about you provide a clue as to where the class cast exception that happens? You are more likely to help in this way.
  • persistent data store force mount

    Hello.

    I look for ways force mount the PowerCLI data store.
    and I found the following thread.

    PowerShell ResolveMultipleUnresolvedVmfsVolumes (equivalent of esxcfg - volume.pl)

    This is exactly the kind of thing I was looking for.
    But what is this script provide a constantly mounted?
    Need corresponds to the option "esxcfg-volume - M". '-m' option is not.

    Thank you

    I don't think that you can explicitly specify a persistent mount in the call to ResolveMultipleUnresolvedVmfsVolumes.

    You can check the persistence like this

    ....
    $Result = $vmHostSS.ResolveMultipleUnresolvedVmfsVolumes ($HUVRSarray)
    $Result | Select @{N = "Name"; E = {$_.vmfs.} Name}},@{N="persistent '; {E = {$_.vmfs.forceMountedInfo.persist}}

  • Problems with the data store when installting ESXi USB

    I had problems getting free ESXi reliable running.  I am able to install a flash drive fine and initially everything works and I am able to create virtual machines.  Upon the first connection to vSphere, told me that there is no data store, so I create one on my controller LSI 400 GB RAID1 8308elp without problem.  However, once I reboot the server ESXi I lose the data store.  When I check my warehouses under Configuration it is listed.  At this point, if I try to create the data store, yet once I get "Error during the configuration of the host".  I read about using fdisk from the console when people have had this problem but there is no access console in the free version.  Is that what I can do to work around this problem?

    Right in the HCL... SAS/SATA-RAID of the lists for older versions, SCSI for the current version... Search within i/o devices for "LSI 8308elp '...

    VMware VCP4

    Review the allocation of points for "useful" or "right" answers.

  • Persistent data store must signed Key?

    I don't know if I changed another somenting, but since I've implemented persisted data, I can not run the application on my real device...

    I get: error at startup appname: Module "appname-2' attempst to access a secure API."

    I don't want to buy a key signed because I don't need...

    That's what I use:

    Net.rim.device.api.system import. *;

    ... code...

    long KEY = "APPNAME.COM".hashCode ();

    persist is PersistentStore.getPersistentObject (KEY);.

    SerialRegistrado = (String) persist.getContents ();

    If (SerialRegistrado == null) {}

    application.popScreen (this);

    new Valida (application, next);

    SerialRegistrado = new String();

    SerialRegistrado = "Epaloco";

    persist.setContents (SerialRegistrado);

    Persist.Commit ();

    }

    If it does not need a signature key, can someonel help me how to identify code that needs a key?

    I checked http://na.blackberry.com/eng/developers/javaappdev/codekeys.jsp but cannot find anything

    Help, please...

    Of PersistentStore API:
    Category: Signed: This element is accessible only by the signed applications. If you intend to use this item, please visit http://www.blackberry.com/go/codesigning for a set of keys for code signing. Code signing is required for applications running on BlackBerry smartphones. development on the BlackBerry Smartphone simulators can occur without code signing.
    Since: JDE 3.6.0

  • Problem adding a data store ESXi 4.1

    Here is my configuration:

    Two hard drives in RAID 1 for ESXi (250GB)

    Four hard drives in RAID 5 for VMS (2.73 TB)

    I read that you can have a store more than 2 TB of data. What I want to do is keep the existing 5 RAID, create two LUNS and add them as two warehouses of data separate (I guess that's the best way to work around the limitation of size). It does not really matter to me whether two LUNS of equal size or if one 2 TB and the other is 730 GB, just what is easier, I guess. My problem is that I don't know how to create LUNS. I looked into the utility Configuration RAID Adaptec BIOS, but I can't do anything other than the basis of creation and deletion of tables. Can anyone lead me in the right direction? Thank you.

    You will need to go through the documentation for the RAID controller. Many but not all will allow you to enter a virtual LUN table or terminology of the disks vary according to the manufacturer. If you do not have this option, you must create two RAID 1 volumes.

  • Kickstart: Local data store destroyed do not reinstall it

    I noticed that when I reinstall ESXi 5 on a server already built, the previous local data store is not destroyed.

    I said to make a 'install' and 'overwritevmfs '.

    install - firstdisk = mptsas, local - overwritevmfs

    in the upper part of the kickstart but the store of previous local data remains.

    I tried to use clearpart

    clearpart - alldrives - overwritevmfs

    Yet the local data store of the previous generation, as well.

    Part of my process of kickstart is to rename the store local data (datastore1) to a meaningful name that includes the hostname so if I reinstall, the data store rename fails (since there is no datastore1 on the 2nd install).  Also, I need to know the name of the data store, as I'm checking out the files ' / ' when installing (via oem.tgz) and move before the first reboot in the section post % (or they will be gone). The only persistent location is the local data store. This also effects kickstart for resettlement syslog that goes to the local data store as well.

    Suggestions on how do I delete a data store local existing during the installation (unless you delete the RAID and re-create)?

    -JC

    I wrote the following script to rename the local old data store ESXi 5.0 using Primo-kickstart script:

    _____________________________________________________________________

    AcceptEULA

    #clearpart - firstdisk = cciss, local - all - overwritevmfs # removes all partitions on local drive (for G1 blade servers) but will not erase the label VMFS

    clearpart - firstdisk = hpsa, local - all - overwritevmfs # removes all partitions on local drive (for G6 blade servers) but will not erase the label VMFS

    install - firstdisk = hpsa, local - overwritevmfs

    rootpw SECRET

    reset

    % include/tmp/networkconfig

    % pre - interpreter = busybox

    # extract information network startup

    VMK_INT = "vmk0".

    VMK_LINE = $(localcli réseau ip interface ipv4 get | grep "${VMK_INT}")

    IPADDR = $(echo "${VMK_LINE}" | awk '{print $2}")

    NETMASK = $(echo "${VMK_LINE}" | awk '{print $3}")

    GATEWAY = $(esxcfg-route | awk '{print $5}')

    DNS = "10.130.0.21,10.130.0.22."

    Hostname = $(nslookup "${IPADDR}" | grep adresse | awk '{print $4}')

    echo ' network - bootproto = static - addvmportgroup = false - device = vmnic0 - ip = ${IPADDR} - netmask = ${MASK} - gateway = ${GATEWAY} - nameserver = ${DNS} - hostname = ${HOSTNAME} "> / MC

    p/networkconfig

    firstboot % - interpreter = busybox

    # Extract the host name of the host number

    # Example: HC - moon01.tapkit .net = ' 01, sc - moon02.tapkit .net = ' 02, sc - moonNN.tapkit .net = 'NN ',.

    HL ='hostname-s | WC-c"

    hostNum = $(nom d'hôte-s | cut-c'expr $hl-2'-'expr $hl-1')

    # Rename the local data store to something more meaningful

    # Find the current local data store NAME (exclude all the SAN HSV200 data store)

    DatastoreName = "$(liste étendue d'esxcli stockage vmfs |) grep ' esxcli - trainer = csv - format-param = fields = "Device, model" list of basic storage device | grep - v "HSV200". grep - v "Device". cut - d-f1' | AWK '{print $1}')'

    NewDataStoreName = "datastore$ hostNum.

    # Rename the data store

    Vim - cmd hostsvc/datastore/rename $DatastoreName $NewDataStoreName

    # copy % first startup script newspapers to persistent data store

    CP /var/log/hostd.log "/ vmfs/volumes/$NewDataStoreName/firstboot-hostd.log".

    CP /var/log/esxi_install.log "/ vmfs/volumes/$NewDataStoreName/firstboot-esxi_install.log".

    # Needed for configuration changes that cannot be performed in esxcli (thank you VMware)

    reset

    _____________________________________________________________________

    I hope this helps...

    A big thank you to William Lam for his great contribution: http://www.virtuallyghetto.com/2011/07/automating-esxi-5x-kickstart-tips.html

    Gilles Marcil

  • vSpehere 4.1.0 an alarm of the use of bad data store

    Hi all

    We have a problem with a data store.

    It is 1.45 TB, GB 794 stocked, 787 GB free.

    vSphere trigger a warning of 'use of data to drive store.

    Definition of warning alarm is located at 95% of disk space.

    Any other data store does not have this problem, alarms will be or will not be triggered by correct.

    I'd be happy to get some clues, how I can solve this problem.

    Thank you!

    have you tried to disable the alarm in question, then turn it back on?  This may correct the false positive.

  • Persistent data and uninstall an app problem.

    Hello

    I'm checking the storage of persistent data with a very silly application, but maybe I'm do sth wrong as that it does not work as I supposed it should.

    My application only checks if there is some content in the store persistent and if not, it creates. I want to check that when the application is uninstalled, these persistent info will be deleted, but as I just test, it is not.

    This is my code:

     public TestP(){
            String info = "nothing";
            synchronized(store) {
                String currentinfo = (String)store.getContents();
                if(currentinfo == null) {
                    //we create it
                    String contents = "something";
                    store.setContents(contents);
                    store.commit();
                } else {
                    //we retrieve it
                    info = currentinfo;
                }
            }
    
            MainScreen ms = new MainScreen();
            ms.add(new LabelField("Testing Persistance..."));
            ms.add(new LabelField(info));
            ms.add(new LabelField("That's all..."));
    
            pushScreen(ms);
        }
    

    And that's how I create the store

    'com.app.test.TestP' at long---> 0xcdbcc77c2e7ecf8cL
    Bank private static PersistentObject = PersistentStore.getPersistentObject (0xcdbcc77c2e7ecf8cL);

    The first time I run my application, the display will return to "nothing" and the text next time 'something '. It's ok, but when I uninstall my application, the first time also shows 'something', which according to me, that he should not be allowed.

    I do something wrong?

    How persistent store information can be removed on an uninstall of the application?

    Concerning

    Your persistent data are of type String, which is a common object of the rim.  It is not necessary for the BB to delete your data - another application can use it.

    However, if you used one of your own classes - even if it comes extends the string and does nothing else - then it will be deleted when your Application is removed, because with your driveway application, there's nothing on the device which includes that Object.

  • How to store/retrieve 'Date' using persistent data?

    Hello everyone - this is my first post on the BlackBerry Support Forums. I'm trying to provide a lot of relevant information as possible, but if I miss anytihng or I did not understand by asking what I want, please let me know.

    Background:

    I use Eclipse IDE ver 3.5.0 and BlackBerry Java plug-in for Eclipse 1.1. I build my application for BlackBerry JRE 5.0.0.

    Question:

    I want to save a "Date" field for persistent data so that I can recover and display in the format of Date once again (no chain). Here's a more detailed explanation.

    My application has three fields on the main screen. They are

    'Name' - AutoTextEditField

    "Gender" - ObjectChoiceField

    "Date of birth" - DateField

    Using persistent data to store the data entered into these fields, as described in the BlackBerry tutorials (http://na.blackberry.com/developers/resources/A13_Storing_Persistent_Data_V2.pdf), I am able to save and retrieve all of these areas, but only in 'Chain' format.

    Unfortunately, this won't work for me for the following reason.

    I create the Date of birth as follows

    "dateOfBirthField = new DateField (" BirthDate: ", System.currentTimeMillis (), DateField.DATE" ");"

    This creates an interface evolved for Date of birth, where the user can select and edit fields month, Date and year separately. When the user saves the information entered and wants to retirve it again, I want to display the date recorded in the same format so that the user can change again in exactly the same way as described above. But if I save it as a string, I can't fill in the field "Date" with the "chain" recovered. That is, I can't do something like

    dateOfBirthField.setDate (info.getElement (StoreInfo.DOB));

    Where "info.getElement (StoreInfo.DOB)" is similar to what is described in the tutorial.

    I searched the web for a possible solution, but never found any. All I found to date stored as a string and recovered just to see what was saved, but not for the changes resulting.

    Someone please let me know if what I am asking is possible. If Yes, can you please suggest a way to do it?

    Thanks in advance.

    Or it can store any object extra Long, no need to create garbage in chains.

    Long I = new Long (1234556);

    long x = i.longValue)

  • How to migrate Office persistent link clones of workstations for the new data store

    Hello. We have clones of persistent link to view running in the environment from our view. We need to migrate these desktops to new storage. Rebalancing is out as this will include a refresh operation - destroy anything and everything installed in c:\ of the user. Is there a method to migrate Desktop clone link persistent to a new data store, while keeping the office in the same exact state (i.e. c:\ is not updated).

    Thank you

    Never say impossible. I came across the solution when I read the article by Duncan Epping:

    http://www.yellow-bricks.com/2012/03/15/Dr-of-view-persistent-linked-clone-desktops/

    I have that for my situation. Basically, replicate data from view in the new storage warehouses. Set up data warehouses replicated without re-signing with the cluster of ESXi. Turn the power off and unsubscribe the vCenter view workstations. Save the workstations from the data store replicated/mounted to vCenter and power over desktop computers.

    VCenter, nothing dramatic has happened if she sees just as vm being unregistered and re-recorded activity from the same exact data store (the same UUID). View Admin is happy because he sees just the events as desktop computers that have been turned off and then subsequently in reverse. Nothing has changed regarding the database to view ADAM, we still use the same data warehouses.

    I have already tested before for a scenario of View DR, and he succeeded. Between remembering who and Duncan's article helped me to adapt the same process for this. Nothing is impossible

  • Why is 'Use different data stores for disks of BONE and View Composer persistent' grayed out?

    I installed 5 (cluster host 2) vsphere, vcenter 5 discover 5 and openfiler (iSCSI VSA) in vmware workstation 7.

    I am trying to simulate a tiered storage configuration and created three warehouses of shared data in order to separate the replica, the linked clones and persistent disk.

    However, when I create my bound clone pool I am able to select a specific data store for the replica and bound but clone the persistent disk option is grayed out.  See photos attached to the pool creation, storage, and network configuration.

    Has anyone any suggestions?

    Thank you!

    Yes, the use of the disc for operating system profiles require a linked clone pool.     The operating system will be on the clone, persistent disk will be a disc loaded end service that survive refreshes and redials, and then the replica will be reading only one copy of the master image.    The replica in general has in the IO and is almost always placed on the SSD or storage faster than you have and the persistent data disk is usually low IO.

  • Problema con Flash y size of data store

    Hola a todos!

    I have a problema y no hay respond to TR.

    Tengo una Máquina con discos in back to back different warehouses, fair el y donde esta el esta en vmx a store of data that allows 512 GB archivos y el segundo disco size of 800 GB lo tengo en data United Nations store as perminte 1024 GB discos, el caso al hacer una instant try me don't dice that no you can. Da el siguente message:

    File < unspecified
    file name > is greater
    that the maximum
    taken size supported by
    data store
    ' < unspecified
    data store >

    no lo entiendo porque yo creia as creaba a fichero delta in each of data warehouses.

    Ah, en el primero me free try 300 GB

    y in el segundo 550 GB free

    He fine con aprovisionado.

    Alguna pista?.

    Gracias.

    Hola Jose, esto no're asi.

    Instant Los is crearan in el directory of the machine, in this case donde tengas el vmx.

    The KB http://kb.vmware.com/kb/1012384you detalla como solucionarlo.

    Puedes mirar también esta KB that you change the ruta por defecto donde alojar los instant como indica.

    http://KB.VMware.com/kb/1002929

    Espero haber sido ayuda.

    Saludos,

  • Strange problem after moving from the virtual computer to a new data store

    I am migrating our VM existing (8 in total) a 'problem' RAID to a new table on a new controller and am having a strange problem. Here are the steps I took (host OS is Ubuntu 8.0.4 LTS x 64):

    (1) off the power the virtual computer from the Web interface

    (2) the directories created for each virtual on the new RAID array computer (in this case a RAID 10 array on LSI 9750-8i controller)

    (3) rSync used to copy the data from RAID1 to be RAID2

    4) has created a new data store on the new RAID through the Web Server of VMWare user interface.

    (5) removed VM of the inventory through the Web, their return, added user interface then choose files .vmx on new data store on RAID2

    They have all power save fine... but three of them are not accessible on the network. I can open a console in the Web Server of VMWare user interface and they all run normally... but I can't their ping or access the respective virtual machine Web GUI. It seems quite arbitrary that those who work and those who are not. In this case... the VM that don't work is a license Autodesk, a Squid proxy server and a VM of cactus. All three of these virtual machines are 32-bit Ubuntu Server VM (two 8.0.4 and a 10.0.4)... and are the only Ubuntu VM on this host. It must be signifigant but I'm not see how.

    If I delete these three virtual machines of the inventory again and add to their original location (on the RAID1) they light up AND work normally. A consultant that we were working seemed surprised, as he had also done this experiment with some of the older VMWare products. I don't see how it would be the physical location of the files of the virtual machine. Any ideas?

    We rely on the migration to ESXi soon but in the meantime, we get these a few VM out of this RAID array problem. I'm stuck.

    Depending on the application, it may be enough to reconfigure the IP parameters (they are very probably on DHCP now) for the newly detected virtual NIC.

    André

Maybe you are looking for

  • Satellite A30 303: error of calibration on power mat * a UJ-811

    Hello, I have a problem with my satellite A30-303.I am trying to record CDs and DVDs. A month ago it gives me an error at the end of the recording. The error is 'Power Calibration Error'.How can I solve this? Thanks for the help. Gonçalo RatoToshiba

  • How to launch my app at startup AND avoid to launch any other process "UI".

    Hi all I would like to run my application at startup of the window, but I need to prevent users from desktop icons by clicking (and viewing), taskbar, desktop and other UI features. In other words, after the connection of Windows that I want to warn

  • Is this a bug in the xy-Graph?

    Hi Forum, I came across this problem while working on this thread (http://forums.ni.com/ni/board/message?board.id=170&message.id=478607#M478607). I add values from 0 to 1 to a graph XY-like in the image below. (And only in this way!) When the user pr

  • Configuration of the system "access denied" Error Message When change of selective startup to Normal startup

    I tried to get my XP to start without using the XP CD. I changed my system Config of selective startup to Normal startup, but I get the following message: "ACCESS DENIED ERROR WAS RETURNED WHILE ATTEMPTING TO CHANGE A SERVICE. YOU MAY NEED TO LOG ON

  • Slow and freezing all the time

    My computer runs windows xp and its also kind of the ancients in regard to computers today, and I recently installed all updates and microsoft security system. Now my computer is running very slowly and crashes all the time! Help please! Its driving