Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2004
    Location
    Oklahoma City OK -
    Posts
    122

    Unanswered: What could be wrong with this line of code?

    FROM ERROR LOG:
    Code:
    ## Detail 0 ##
    java.lang.NullPointerException
    	at oracle.apps.cust.xxdpOrgDesc.server.xxdpOrgDescAMImpl.DeleteOrgDescRow(xxdpOrgDescAMImpl.java:46)
    REFERENCED LINE OF CODE:

    Code:
    System.out.println("xxDebug inside deleteOrgDescRow()") ;
    Xxdp00OrgDescriptionsVOImpl orgvo = getXxdp00OrgDescriptionsVO1() ;
    Row row[]=orgvo.getAllRowsInRange();              <== This is line # 46

    What could be wrong with this line of code?

  2. #2
    Join Date
    May 2005
    Location
    San Antonio, Texas
    Posts
    134
    orgvo isn't instantiated is my guess is it possible for getXxdp00OrgDescriptionsVO1() to return null?
    Vi veri veniversum vivus vici
    By the power of truth, I, a living man, have conquered the universe

  3. #3
    Join Date
    Oct 2004
    Location
    Oklahoma City OK -
    Posts
    122
    I display a query page.
    I enter a set of query parameters.
    One row is returned.
    I click on the delete icon.
    The delete method is called passing the rowid of the current row.
    I know the rowid is valid and belongs to the desired row.
    (I have queried the database using the rowid.)

    So, no in this case it does not seem likely.

    /**
    *
    * Gets Xxdp00OrgDescriptionsVO1 entity object.
    */
    public oracle.apps.cust.xxdpOrgDesc.server.Xxdp00OrgDescr iptionsEOImpl getXxdp00OrgDescriptionsVO1()
    {
    return (oracle.apps.cust.xxdpOrgDesc.server.Xxdp00OrgDesc riptionsEOImpl)getEntity(0);
    }




    /**
    *
    * Container's getter for Xxdp00OrgDescriptionsVO1
    */
    public Xxdp00OrgDescriptionsVOImpl getXxdp00OrgDescriptionsVO1()
    {
    return (Xxdp00OrgDescriptionsVOImpl)findViewObject("Xxdp0 0OrgDescriptionsVO");
    }


    Code:
     
    /*
     *  Beginning of Delete Method - DeleteOrgDescRow
     */          
    public void DeleteOrgDescRow( String pAction, String pRowID )
    {
    System.out.println("xxDebug inside deleteOrgDescRow()") ;
    Xxdp00OrgDescriptionsVOImpl orgvo = getXxdp00OrgDescriptionsVO1() ;
    System.out.println("ROW_ID IS: "+pRowID) ;
    Row row[] = orgvo.getAllRowsInRange();
    
    
    for ( int i=0;i<row.length;i++)
    {
    System.out.println("i IS: "+i) ;
    Xxdp00OrgDescriptionsVORowImpl rowi = (Xxdp00OrgDescriptionsVORowImpl)row[i];
    System.out.println("xxDebug Checking to delete RowID => " + rowi.getRowID());
    if (rowi.getRowID().toString().equals(pRowID))
    {
    	rowi.remove();
    	getOADBTransaction().commit();
    	return ;
    }
    }
    /*
     * End of Delete Method
     */
    Last edited by wrwelden; 05-20-08 at 10:33.

  4. #4
    Join Date
    May 2005
    Location
    San Antonio, Texas
    Posts
    134
    in the code clip above pRowID may be valid but that doesn't mean orgvo is not null.

    Run through a debugger and see what the value of orgvo is after the assignment.
    Vi veri veniversum vivus vici
    By the power of truth, I, a living man, have conquered the universe

  5. #5
    Join Date
    Jun 2008
    Posts
    1

    Cursor state not valid

    I am calling a store procedure on AS/400 which return result set from SQLRPGLE to java client. I am getting cursor state not valid error when I am testing in WSAD.

    Any suggestions...

Posting Permissions

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