cancel
Showing results for 
Search instead for 
Did you mean: 

Null pointer Exception in getDetail

former_member188598
Contributor
0 Kudos

Hi all,

I have created a syncbo with header and item.It is displaying the header values but when we are selecting an instance from header and trying to display its details its giving us Null Pointer Exception.

Also in worklist monitor we can se the corressponding item data in outbound worklist with status S.

Suggest some help.

Regards

Priyanka

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

whenever you display items you most likely run a loop (repeat, For,...) and in there you do some coding to get the number of items. If there are no items, you will get the null pointer exception. You need to check in that case if the top level has items - if not you are not allowed to run this loop, cause you will get an null pointer expection.

You can debug the JSP pages easily. Just create the WAR file, precomoile the JSPs and tick the button: do not delete JSP after compile (or something like that). After the WAR file was created you will see a folder named $JSP. In there all JSPs are in java source code and so you can set break points in there to see the actual behaviour...

Hope that helps!

Regards,

Oliver

Former Member
0 Kudos

Hi,

If you are using DB2E for persistance, I would suggest you to check the database tables, if the child tables are filled with data or not. Null pointer exception is a very common error that you will get when you are looking for some data in the database but the same is not present.

It could so happen that the record might be present in the database, but one of the fields might be throwing this error. For eg. if you have 5 fields in the item table, but only 4 fields come from the backend, but when you are displaying the same on the client, if you are checking for all 5 fields then you might get null pointer exception.

Hope this helps.

Best Regards,

Siva.