If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > JAVA > What could be wrong with this line of code?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-16-08, 16:11
wrwelden wrwelden is offline
Registered User
 
Join Date: Oct 2004
Location: Oklahoma City OK -
Posts: 122
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?
Reply With Quote
  #2 (permalink)  
Old 05-19-08, 20:02
amthomas amthomas is offline
Registered User
 
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
Reply With Quote
  #3 (permalink)  
Old 05-20-08, 09:03
wrwelden wrwelden is offline
Registered User
 
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 09:33.
Reply With Quote
  #4 (permalink)  
Old 05-22-08, 13:37
amthomas amthomas is offline
Registered User
 
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
Reply With Quote
  #5 (permalink)  
Old 06-10-08, 21:10
Venu Nadimpalli Venu Nadimpalli is offline
Registered User
 
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...
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On