Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] null pointer exception

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] null pointer exception


Chronological Thread 
  • From: "GW Brown, Information Systems and Computing" <>
  • To: Jim Fox <>,
  • Subject: Re: [grouper-users] null pointer exception
  • Date: Tue, 06 Mar 2007 10:32:38 +0000

Jim,

This bug relates to the caller page mechanism. Various pages 'save' request and session information (before any processing) and tag it with a 'callerPageId'. The callerPageId can then be used to re-instate the appropriate values.

In this case the search form submits to 'searchNewMembers' which then sets results as a request attribute and forwards to 'populateAssignNewMembers'. Both actions were saving request information with 'populateAssignNewMembers' overwriting that set by 'searchNewMembers'. Clicking 'Cancel' returns the browser to 'populateAssignNewMembers', however, request attributes are not retrieved (they are generated after a page has been 'saved'), so 'populateAssignNewMembers' does not have appropriate input - hence the NullPointerException.

There are times when 'populateAssignNewMembers' is called directly, so it still needs to be able to save page information. To fix the problem I have added a check in the 'save' method which returns without saving page information if page data has previously been saved.

I've attached a copy of GrouperCapableAction which has this fix, but I haven't tested it extensively...If you overwrite the existing file in grouper-ui/java/src/edu/internet2/middleware/grouper/ui/actions, and rebuild the UI, it should fix the problem.

Gary

--On 05 March 2007 13:07 -0800 Jim Fox
<>
wrote:



I get a nullpointer exception with this sequence

(as admin)

Go to a stem page and click "edit stem"

( get populateEditStem page )

Click on "save and assign privileges"

( get saveStem page )

Click "Search" for a user

( get searchNewMembers page )

click on a member to see detail

( get populateSubjectSummary page )

Click "Cancel"


( get Unexpected error - java.lang.NullPointerException:null

java.lang.NullPointerException at

edu.internet2.middleware.grouper.ui.actions.
PopulateAssignNewMembersAction.grouperExecute
(PopulateAssignNewMembersAction.java:283)
at
edu.internet2.middleware.grouper.ui.actions.
GrouperCapableAction.execute
(GrouperCapableAction.java:224)
...

Looks like it went to "PopulateAssignNewMembersAction" with no
"members" data.

Jim





----------------------
GW Brown, Information Systems and Computing

Attachment: GrouperCapableAction.java
Description: Binary data




Archive powered by MHonArc 2.6.16.

Top of Page