PersistentStore.getPersistentObject returns the null value?

I use a random key to retrieve a shape of the object PersistentStore

persist is PersistentStore.getPersistentObject (KEY);.

Works fine on the Simulator (OS 5), when I take the code signed to the device (BB OS 5.0 Bold 8900)

For some reason, it returns null, without exception. Thereafter any API I inoke on PersistentStore / persist returns null without exception persist even when the null value.

I don't know if it's one thing to eclipse debugger, but even if the debugger shows that objects are null. Controls null applied in the code seems to fail, what does code see these objects as non-null. Pheww! How is it possible.

In this code still shows up as null, then safetyTable and orderedkeys. However, the value null check in the failure code.

At a later stage in the code, when I try to access orderedkeys are null again! Are struggling with this problem for two days, all the pointers would be very comfortable.

                    persist = PersistentStore.getPersistentObject( KEY );
                    persistOrderedKeys = PersistentStore.getPersistentObject(KEY_ORDERED_KEYS);
                    safetyTable = (Hashtable)persist.getContents();
                    orderedKeys = (Vector)persistOrderedKeys.getContents();
                    if (safetyTable == null)
                    {
                        safetyTable = new Hashtable();

                        persist.setContents(safetyTable);
                        persist.commit();
                    }

                    if (orderedKeys==null)
                    {
                        orderedKeys=new Vector();

                        if (safetyTable.size()>0)
                        {
                            Enumeration addressKeys = safetyTable.keys();
                            while(addressKeys.hasMoreElements())
                            {
                                orderedKeys.addElement((String)addressKeys.nextElement());
                            }
                        }
                        persistOrderedKeys.setContents(orderedKeys);
                        persistOrderedKeys.commit();

                    }

"I don't know if it's one thing to eclipse debugger.

I had problems of this kind when I don't have a level of operating system for the device I am debugging on.

Tags: BlackBerry Developers

Similar Questions

  • GetCurrentRow returns the null value while trying to values defined in table advanced VO

    Hi all

    I'm trying to set default values to a bean advanced table according to the selection of LOV in another region. Here is the code and getCurrentRow returns the value null and null pointer exception is throwed. Please let me know where Iam going bad.

       if (pageContext. ) isLovEvent ())

    LovInputSourceId = string pageContext. getLovInputSourceId ();

       if ("poNumber". ) is equal to ()lovInputSourceId))

    pageContext . putDialogMessage (new OAException()"inside Onclick"));

    OAViewObject VO = (OAViewObject) am . findViewObject ()"L3APNonprojbasedpoVO1");

    VO1 OAViewObject = (OAViewObject) am . findViewObject ()"L3APCodingInfoEOVO1");

      VO . setWhereClause (null);

      VO . setWhereClauseParams (null);

      VO . executeQuery ();

      VO1 . setWhereClause (null);

      VO1 . setWhereClauseParams (null);

      VO1 . setWhereClause ("1=2");

      VO1 . executeQuery ();

       if (null! = VO )

       Row ReqRow = (Row) VO.first();  

       if (null ! = ReqRow )

       int idx = VO . getRowCount ();

       for (int xx = 0; xx < idx ; xx ++)

    String Description = (String)VO. getCurrentRow (). getAttribute ()"ItemDescription");

       Number Amount = (Number)VO. getCurrentRow (). getAttribute ("Amount");

       String Company = (String)VO. getCurrentRow (). getAttribute ("Company");

    String ProfitCenter = (String)VO. getCurrentRow (). getAttribute ()'ProfitCenter');

       String Dept = (String)VO. getCurrentRow (). getAttribute ("Dept");

       String Lob = (String)VO. getCurrentRow (). getAttribute ("Lob");

       String Account = (String)VO. getCurrentRow (). getAttribute ("Account");

    pageContext . putDialogMessage (new OAException()"inside loops'));

       if (null! = VO1 )

      { am. invokeMethod ("createRow");

    VO1 . getCurrentRow (). setAttribute ()'Description',Description);

      VO1 . getCurrentRow (). setAttribute ("Amount",Amount);

      VO1 . getCurrentRow (). setAttribute ("Company",Company);

      } ReqRow = (Row)VO.next(); }

       else {}

    }

    }

    Here is the method in AM.

    Public Sub createRow()
    {

    OAViewObject vo = (OAViewObject) getL3APCodingProjectEOVO1 ();

    vo.clearCache ();

    If (!) VO.isPreparedForExecution ())
    {
    System.out.println ("project VO executed");
    vo.setWhereClause (null);
    vo.setWhereClauseParams (null);
    vo.setWhereClause ("1 = 2");
    vo.executeQuery ();
    }
    Line = vo.createRow ();
    vo.insertRow (row);
    row.setNewRowState (Row.STATUS_INITIALIZED);

    }

    I modified your code a bit. This code does not require a method of AM.

    If the problem still not solved.

    If you want you can try this and let us know what happens.

    if (pageContext.isLovEvent())
    {
       String lovInputSourceId = pageContext.getLovInputSourceId();
       if("poNumber".equals(lovInputSourceId))
      {
      pageContext.putDialogMessage(new OAException("Inside Onclick"));
      OAViewObject VO=(OAViewObject)am.findViewObject("L3APNonprojbasedpoVO1");
      OAViewObject VO1=(OAViewObject)am.findViewObject("L3APCodingInfoEOVO1");
      VO.setWhereClause(null);
      VO.setWhereClauseParams(null);
      VO.executeQuery();
    
      VO1.setWhereClause(null);
      VO1.setWhereClauseParams(null);
      VO1.setWhereClause("1=2");
      VO1.executeQuery();
    
      if (VO != null)
      {
      for( Row ReqRow = (Row) VO.first();  ReqRow != null; ReqRow = (Row) VO.next())
      {
      String Description = (String)ReqRow.getAttribute("ItemDescription");
      Number Amount = (Number)ReqRow.getAttribute("Amount");
      String Company = (String)ReqRow.getAttribute("Company");
      String ProfitCenter = (String)ReqRow.getAttribute("ProfitCenter");
      String Dept = (String)ReqRow.getAttribute("Dept");
      String Lob = (String)ReqRow.getAttribute("Lob");
      String Account = (String)ReqRow.getAttribute("Account");
      pageContext.putDialogMessage(new OAException("Inside for Loop"));
    
      if (VO1 != null)
      {
      Row newRow  = VO1.createRow();
      newRow.setAttribute("Description",Description);
      newRow.setAttribute("Amount",Amount);
      newRow.setAttribute("Company",Company);
      VO1.insertRow(newRow);
      }
      }
      }
      }
    }
    

    See you soon

    AJ

  • Returns the null value in HasMap.get ().

    Hi all.
    Just read the docs of java on hashmap and was interested in this topic the get() method:

    A NULL return value does not necessarily mean that the map contains no mapping for the key; It is also possible that the map explicitly maps the key null. The containsKey operation may be used to distinguish these two cases.

    I took in a case, which has been talked about: If the map allow nulls, returned by get() null will be just one key of the pair-> null value. But the second case is not clear to me. Please, show me an example for the latter case, when get() can returned null.

    sphinks wrote:
    I took in a case, which has been talked about: If the map permits null values, returned by get() null will be just a key pair-> null value. But the second case is not clear to me. Please, show me an example for the latter case, when get() can returned null.

    There is no second case. There is a single case, if you put a null value in a map, get() will return null. And because of that, if you need to know if a certain key is in the containsKey() worksheet should be used instead of the get() method.

  • Count (1) returns the null value in the Group of

    Hi the gems... Good afternoon...

    I read that the COUNT() function always returns 0 (zero) if there is no corresponding row in the table.

    The following code returns 0 as expected:
    SELECT COUNT(1) FROM book_table
                 WHERE client_id = 10009
                   AND book_id = 5465465
                   AND book_sub_id = 'gfdf'
                   AND amount = 78686
    But when I used the GROUP BY clause in the query, then he returned to nothing:
    SELECT COUNT(1) FROM book_table
                 WHERE client_id = 10009
                   AND book_id = 5465465
                   AND book_sub_id = 'gfdf'
                   AND amount = 78686
    group by client_id,book_id,book_sub_id,amount
    Why this is happening... Please suggest...

    When you use just rely on its own (and you must use count (*) not count (1) as the optimizer based on CSSTidy will re - write internally to count (*) anyway)... then you say you want a count of all rows.

    When you introduce the group by clause you say thay want returned a number of records within specific groups... but if there are no groups, he cannot give you a line for any group with its county equivalent, because there are no lines for the groups. With the grouping, you have must have at least 1 row per group to get an account for her.

  • Returns the lowest value of two fields

    Hello

    I have two domains that users manually enter in a form.  Value1 and Value2.

    Someone at - it suggestions on the best way to use JavaScript to return the lowest value of the two fields?

    Thank you

    Natalie

    I think I misunderstood what you mean by any, I thought you wanted the calculated value to be None. The two fields value digital formats and modify the script for:

    Custom calculate script

    (function () {}

    Initialize the array

    aNums var = [];

    Get the field values as strings

    var s1 = getField("Value1").valueAsString;

    var S2 = getField("Value2").valueAsString;

    Convert values to numbers if not empty and add to the table

    If aNums.push(+s1) (s1);

    If aNums.push(+s2) (s2);

    Set the value of this lesser field of entries

    If both are blank, this field blank

    Event.Value = aNums.length? Math.min.Apply (null, aNums);:

    })();

  • IDHostAdapter.getInstance () .getXMPString (doc); Returns a null value

    Hello

    I'm trying to read and modify a document XMP data, but I always get a null value when playing it.

    In addition,

    IDHostAdapter.getInstance () .setXMPString (doc, updatedXMPString);

    does not either;

    App: application var = InDesign.app;

    var doc: Document = app.activeDocument;

    var idh:IDHostAdapter = IDHostAdapter.getInstance ();

    var xmpString:String = idh.getXMPString (doc);

    var warpxmpContext:WARPXMPXMPContext = new WARPXMPXMPContext (xmpString);

    warpxmpContext.wARPXMP.publicacion = "periodico";

    var updatedXMPString:String = warpxmpContext.serializeToXML ();

    IDHostAdapter.getInstance () .setXMPString (doc, updatedXMPString);

    var xmpString2:String is IDHostAdapter.getInstance () .getXMPString (doc);.

    Any ideas?

    Thank you

    Hello

    We have an updated version of the adapter host available for download InDesign library:

    http://cssdk.host.Adobe.com/SDK/1.5/patch/id_hostadapter_mac.zip

    Regarding the examples, please see the AssetFragger CS extension example which shows the adding/changing metadata XMP using XMP Namespace Designer and library InDesign Host Adapter.  This extension is available in Builder Extension CS under file > import > CS Extension Builder > samples.  For more information, please visit http://www.adobe.com/devnet/creativesuite/samples.html

    Kind regards

    LEA

    From: Adobe Forums [email protected]<>[email protected]>

    Reply-To: "[email protected]<>[email protected]> ' [email protected]<>[email protected]>" "

    Date: Saturday November 5, 2011 19:45:40 + 0000

    To: laboratory user [email protected]<>[email protected]>

    Topic: IDHostAdapter.getInstance () .getXMPString (doc); Returns a null value

    Re: IDHostAdapter.getInstance () .getXMPString (doc); Returns a null value

    created by substances. http://forums.adobe.com/people/Harbs. > in Creative Suite Extension Builder - see the discussion complete onhttp://forums.adobe.com/message/4009511#4009511

  • resolveNode returns a null value when a variable is used.

    LiveCycle Designer ES2, latest version

    Hello

    The following Javascript code, in the click event of a button, returns a null value for the variable opaque. When I manually enter the expected value the script works perfectly.

    I tried various modifications of the resolveNode line such as var opaque = xfa.resolveNode (qPage); , but without success.

    Also studied all the documents reference Adobe that I could find on the scripts and resolveNode. Any suggestions?

    var qPage = (Cell12.rawValue + "AnchorField");
    App.Alert (qPage);
    Opaque var = xfa.resolveNode ("' $... qPage '");
    App.Alert (opaque);
    var nPage = xfa.layout.absPage (opaque);
    App.Alert (nPage);
    xfa.host.currentPage = nPage;

    Thank you

    Ron

    I tried your sample and it seems to work very well... but I'm not sure 100% that you are trying to do... .going to your initial question on the passage of a variable in the resolveNode resolveNode expects a string, so you must use the following syntax to create the string:

    xfa.resolveNode ("$.." + qPage)

    Note that the variable is outside the quotes as such the string $... is added to the content of qPage. This wil work if qPage is a string as well.

    In your example you have defined qPage as an XFA object so that the syntax above will not work. If you intend to use the same way, you would use qPage.name so that the name of the field will be returned (this is a string) and it will be added to your expression of $ to make the $... ProductAnchorField

    Thus, the expression would be:

    xfa.resolveNode ("$.." + qPage.name)

    Make sense?

    Paul

  • FIRST analytical functions returns the null line

    The following query returns a null line when there is no such thing as a line for the predicate. Is it a bug or expected behaviour. If so what is the meaning of the null row, is it not logical?



    SELECT NVL (max (ah.fyr_end_dt) KEEP (DENSE_RANK FIRST ORDER BY ah.as_of_dt DESC), ' RETURNED NULL')
    Of account_history ah
    WHERE
    Ah.acct_id = 999
    AND trunc (ah.as_of_dt) < = 31 December 08 '
    ;

    Hello

    user4900730 wrote:
    Moreover, in my example how I distinguish the case where a line really exists, but the column is null when there is no such thing as a line and the FIRST function returns the same value null? Hopefullly I should be able to do it in a single SQL and know the difference?

    COUNT (*) > 0, but COUNT (col_x) = 0, then there is a line, but col_x happened to be null.

    For example, the following query shows that there is 1 row in the group with the lowest name ("ADAMS"), but the column comm in all ranks of this group is null:

    SELECT     COUNT (*)    KEEP (DENSE_RANK FIRST ORDER BY ename)
                              AS total_cnt
    ,     COUNT (comm) KEEP (DENSE_RANK FIRST ORDER BY ename)
                              AS comm_cnt
    FROM     scott.emp
    ;
    

    Output:

     TOTAL_CNT   COMM_CNT
    ---------- ----------
             1          0
    

    The employee whose highest name ("WARD") has a number in the comm column.

  • VO.getCurrentRow () returns a null value

    Hi, OTN

    In short, the scenario is:
    View object is based on an entity. There is a form to the JSF page.
    I select a record by clicking next and previous. Then I click on create to display empty fields for the new record.
    When I click on the button, I need to register a field value and a default value for the new fields to records.

    How to:
    I have created a support bean and added customCreateMethod. To start, I want to get the value of current row field, but I can't get the current line.

    public String customCreateMethod() {}

    String amDef = "pattern. AppModule. "
    Config = "AppModuleLocal";

    Am = ApplicationModule
    Configuration.createRootApplicationModule (amDef, config); non-null

    ViewObject vo = am.findViewObject("ContentVersionView1"); non-null


    = problem here:
    vo.getCurrentRow (); Returns a null value

    System.out.println ("index:" + vo.getCurrentRowIndex ()); always returns 0
    }

    I tested variable vo by this code:

    While (vo.hasNext ()) {}
    Line = vo.next ();
    System.out.println (Row.GetAttribute ("IdContent"));
    }

    It works fine.


    How should I me current line?

    Thank you

    Hello

    createRootApplicationModule creates the new instance of the application module, thanks to which you did not receive the current line. Use the code posted by Timo in [this post | http://forums.oracle.com/forums/thread.jspa?threadID=933022] (which has been marked as correct) to get the instance of module of the application.

    Jean Lou

  • where clause to see if they contain the null value

    So I've finalized my function but now am having some problems:

    the bl field (or the v_bl parameter) has null values in it. When I run the function using the "Select FH ('ACCESS', NULL, 8675309') From dual; I get a NULL return value because it uses the variable to compare with q.bl and you can not have q.bl = null in a Where clause.

    The main problem is when the parameters are passed, a line can have the same prob and site, but the bl might be different as null, which would give a different lname.


    In where clause I need to have something that will compare the parameter with the bl field. Sometimes it's null sometimes is not, but we need to find the line concerned. I made the "BOLD" in the question police

    Here are two possible lines in the data
    prob bl site lname
    ACCESS Smith 8675309 (null)
    54321 8675309 Johnson ACCESS

    so in theory, if the function is called with the parameters FH ('ACCESS', NULL, 8675306')
    He would return the lname: Smith

    and conversely FH ("ACCESS", "54321 ', 8675309") would return Johnson

    Here's the function

    create or replace
    Function FH
    (v_prob IN varchar2, v_bl IN varchar2, v_site IN varchar2)
    RETURN varchar2
    AS
    v_lname varchar2 (16);

    BEGIN

    S.Lname SELECT INTO v_lname
    Of
    request q
    JOIN THE
    s response
    On
    (q.order = s.order)

    WHERE
    q.BL = v_bl AND - where it is
    q.site = v_site AND
    q.prob = v_prob AND
    s.Lname IS NOT NULL;

    RETURN v_lname;
    END;



    -When I run the FH ('ACCESS', NULL,' 86753) function, it returns an empty value and not the family name

    Published by: user11210446 on May 28, 2009 17:03

    Published by: user11210446 on May 28, 2009 17:03

    user11210446 wrote:
    If v_bl is Null in the where clause it would even say q.bl = Null which will not work.

    Matches the NULL value
    (1) either you have to say-> q.bl IS NULL
    OR
    (2) WHERE the NVL (q.bl-99) = NVL (v_bl-99) - this will be true if q.bl and v_bl both are NULL
    NULL = NULL evaluates to TRUE, so you use NVL

    SS@XE > select * from dual where null = null ;
    
    no rows selected
    
    SS@XE > select * from dual where null is null ;
    
    D
    -
    X
    
    SS@XE > select * from dual where NVL(null,-1) = NVL(null,-1) ;
    
    D
    -
    X
    

    SS

  • Remove the NULL values and update the value according to the logic

    Hello

    The problem data

    CREATE TABLE VOLA (SRNO, NUMBER, zeroNUMBER, ANUMBER);

    INSERTION of REM in VOLA

    TOGETHER TO DEFINE

    Insert in VOLA (SRNO, ONE) values (1,237.94);

    Insert in VOLA (SRNO, ONE) values (2, null);

    Insert in VOLA (SRNO, ONE) values (3,203.565);

    Insert in VOLA (SRNO, ONE) values (4,170.69);

    Insert in VOLA (SRNO, ONE) values (5,113.67);

    Insert in VOLA (SRNO, ONE) values (6,93.6);

    Insert in VOLA (SRNO, ONE) values (7,82.03);

    Insert in VOLA (SRNO, ONE) values (8,66.675);

    Insert in VOLA (SRNO, ONE) values (9,63.59);

    Insert in VOLA (SRNO, ONE) values (10,61.415);

    Insert in VOLA (SRNO, ONE) values (11,60.015);

    Insert in VOLA (SRNO, ONE) values (12,58.235);

    Insert in VOLA (SRNO, ONE) values (13,57.805);

    Insert in VOLA (SRNO, ONE) values (14,56.965);

    Insert in VOLA (SRNO, ONE) values (15, null);

    Insert in VOLA (SRNO, ONE) values (16, null);

    I have to remove the NULL values in column 1, the problem is that the position of the NULL values are not fixed, and it can be any position. If all the lines of the columns are null, then throw it away.

    If multiple NULL values are here so I have to do the math as follows to update null with the eigenvalues

    1. If the first line is null then take the 2nd value in row and update it.

    2. If the lines between both is null then take avg of prev and next value not null and refresh it.

    3. If the last value in the column is null, then then take prev and update, in this case last two are null, so I have to take value of prev 14 value line update in

    15th and 16th ranks.

    I want to put this pl/sql logic, somehow, that I thought have loop and counter aapproach and loops through the elements and check and update.

    But always looking for something better before looking to write code. No idea or help will be useful for me.

    I * think * you are looking for something like:

    WITH VOLA (SRNO, ONE)

    AS (select 1,237.94 from all the double union)

    Select 2, union null value double all the

    Select 3,203.565 from all the double union

    Select 4,170.69 from all the double union

    Select 5,113.67 from all the double union

    Select 6,93.6 from all the double union

    Select 7,82.03 from all the double union

    Select 8,66.675 from all the double union

    Select 9,63.59 from all the double union

    Select 10,61.415 from all the double union

    Select 11,60.015 from all the double union

    Select 12,58.235 from all the double union

    Select 13,57.805 from all the double union

    Select 14,56.965 from all the double union

    Choose 15, null of union double all the

    SELECT 16, NULL FROM dual)

    GET_VALUES (SELECT SRNO, ONE ACE,

    , LAST_VALUE (WE IGNORE NULLS) (ORDER BY SRNO CSA ROWS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING) AS PREVIOUS_VALUE

    , first_VALUE (ONE IGNORE NULLS) over (ORDER OF SRNO CSA ROWS BETWEEN 1 SUITE AND FOLLOWS without TERMINALS) AS NEXT_VALUE

    FROM VOLA)

    SELECT SRNO, ONE, CASE

    WHEN IT IS NOT NULL, THEN WE

    OTHER CASES

    WHEN PREVIOUS_VALUE IS NOT NULL AND IS NOT NULL THEN (PREVIOUS_VALUE + NEXT_VALUE) NEXT_VALUE / 2

    WHEN THE PREVIOUS_VALUE IS NOT NULL, THEN PREVIOUS_VALUE

    WHEN THE NEXT_VALUE IS NOT NULL, THEN NEXT_VALUE

    END

    END AS NEW_VALUE

    OF GET_VALUES

    /

    HTH

  • Add the Null value at the end of the collection layer

    I need to create layers at the end of the index of the layer and not at the beginning. Is this possible?

    app.project.compItem.layers.addNull () puts a layer at the beginning of the collection of objects, but it should be at the end. Maybe I could add the null value, then rearange the index?

    Like this:

    var myNull = myComp.layers.addNull ();

    myNull.moveToEnd ();

    Dan

  • calculated formula database field trying to insert the null value

    Hello

    I have 3 elements of database text amount, rate and result.
    I enter both values (quantity and frequency), and the property using formula 'result' Gets the computed value.
    On the screen all the values are displayed correctly but when trying to save my information text field 'result' tent to insert the null value.

    Any suggestions?

    Forms 11g

    Thanks in advance

    794018 wrote:
    Hello

    I have 3 elements of database text amount, rate and result.
    I enter both values (quantity and frequency), and the property using formula 'result' Gets the computed value.
    On the screen all the values are displayed correctly but when trying to save my information text field 'result' tent to insert the null value.

    Point formula should not be issue of database. And insert the value in the result column in the database is not good idea.
    Then, if you want to save it. create the database result item and write trigger (When-validate-point) on amount and filed rates and the trigger code, write

    :result:=:amount*:rate;
    

    To display the result on the form, create the database no item and change the formula property and write the formula.

    Hope this will help you

    If someone useful or appropriate, please mark accordingly.

  • The Null value as the default value for an input to a stored procedure parameter

    Hello

    How can we set the default values with the NULL value for the parameter in a stored procedure.
    create or replace procedure emp_proc ( p_test_input in varchar2
                                                        p_emp_id in number,
                                                        p_emp_name in varchar2,
                                                       p_manager_id in number )
    as
      begin
       if ( upper ( p_test_input ) = 'I' )
       then
          insert into emp
          values      ( p_emp_id  ,p_emp_name ,p_Manager_id,sysdate );
       elsif ( upper ( p_test_input ) = 'D' )
       then
          delete from emp
          where       emp_id  = p_emp_id;
       else
          dbms_output.put_line
             ( 'Please input ''A'' for ADD or ''D'' Delete  EMPLOYEE'
             );
       end if;
    end;
    As described above if I want to delete only the functioning

    I want to call this procedure without pass additional parameters.
     EXECUTE  emp_proc('D',1010);
    Published by: Rede on May 28, 2010 12:21

    Published by: Rede on May 28, 2010 12:22
    create or replace procedure emp_proc ( p_test_input in varchar2,
                                                        p_emp_id in number,
                                                        p_emp_name in varchar2 default null,
                                                       p_manager_id in number default null )
    
  • How to convert the Null value to 0 after the outer join?

    Hello guys

    My requirement is in fact 2 of outer join tables (that's how), and I got the outer join works very well, so in my report, I have values null of measures in another table of facts as a result of the outer join...

    Is there a way I can convert these nulls to 0?

    I realized that the null value is not stored in the table, it is just following the outer join because the NULL do not match records in other... So by default, I'm expected to get NULL values...

    Is there way to present these nulls to 0?

    Thanks a lot for your advice

    In response, the syntax will be:

    IFNULL (, 0)

    try and let us know how you go.
    See you soon
    Alastair

Maybe you are looking for