NPE from Assignment Permission check

Description

Seen in production, a large number from a single site.

caused by: java.lang.NullPointerException
at org.sakaiproject.assignment.impl.BaseAssignmentService.unlockCheckWithGroups(BaseAssignmentService.java:406)
at org.sakaiproject.assignment.impl.BaseAssignmentService.allowAddSubmissionCheckGroups(BaseAssignmentService.java:4143)
at org.sakaiproject.assignment.cover.AssignmentService.allowAddSubmissionCheckGroups(AssignmentService.java:257)
at org.sakaiproject.assignment.tool.AssignmentAction.build_student_view_submission_context(AssignmentAction.java:1301)
at org.sakaiproject.assignment.tool.AssignmentAction.buildMainPanelContext(AssignmentAction.java:889)
at sun.reflect.GeneratedMethodAccessor3119.invoke(null:-1)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)

Basically if a null assignment is passed to unlockCheckWithGroups a NPE is guaranteed

Attachments

2

Activity

Gao Jun November 5, 2014 at 2:33 AM

I find the problem in my university as well.

Yet the patch is not good enough, if the assignment is null, then an NPE will thrown at line 387 (before the null check).

I upload a new patch to check the null value before NPE.

And I think this issue should be reopened.
Or, should I create a new ticket?

Jean-François Lévêque September 6, 2013 at 5:46 AM

How can we create a null assignment and reproduce this?

Hudson CI Server July 26, 2013 at 3:53 PM

Integrated in assignment trunk #697 (See http://builds.sakaiproject.org:8080/job/assignment%20trunk/697/)
check for null assignemtn passed to the group (Revision 127490)

Result = SUCCESS

David Horwitz July 22, 2013 at 5:59 AM

patch has been running safely in UCT production for 7 months

David Horwitz February 18, 2013 at 12:51 AM

early indications are that this resolves the issue ...

Fixed

Details

Priority

Fix versions

Components

Assignee

Reporter

Created February 15, 2013 at 5:37 AM
Updated November 5, 2014 at 2:33 AM
Resolved July 22, 2013 at 6:06 AM