[Building Sakai] issue with externalAssessmentService
Steve Swinsburg
steve.swinsburg at gmail.com
Wed Sep 11 18:00:17 PDT 2013
Hi Noah,
Yes that is the part. This is subsequently called when finaliseGrades is
called. Prior to 2.9, the externalAssessmentService was injected into
GradebookServiceHibernateImpl - now its in both classes so you are probably
right about the inheritance. A lookup method would be perfect here IMO,
since the bean wiring in that service is unwieldy!
cheers,
Steve
On Wed, Sep 11, 2013 at 1:20 PM, Noah Botimer <nbotimer at unicon.net> wrote:
> Steve,
>
> I'm still confused here. The things you mentioned were added for 2.9. I
> think you're seeing the NPE here, right?
>
> // Student ID -> Assignments
> protected Map<String, Set<Assignment>> getVisibleExternalAssignments(
> Gradebook gradebook, Collection<String> studentIds,
> List<Assignment> assignments)
> {
> String gradebookUid = gradebook.getUid();
> Map<String, List<String>> allExternals =
> externalAssessmentService.getVisibleExternalAssignments(gradebookUid,
> studentIds);
> Map<String, Assignment> allRequested = new HashMap<String,
> Assignment>();
>
> There may be a way for that to fail because of the rather unwieldy
> inheritance (BaseHibernateManager being abstract, extending
> HibernateDaoSupport, and implementing the methods that are needed to do
> some of the external work -- so we have a couple of beans extending
> BaseHibernateManager, which gets quite confusing). I suppose that should
> probably be a lookup method rather than injected -- or generally
> refactored, but that is a nasty bit of work.
>
> There are also some similar signatures and names. Where is the actual
> calling code for this issue and what does it do? I'm asking because this is
> a new method for 2.9 (though similar signatures have been around for some
> time). I'm not sure exactly what the error conditions are yet, so I need a
> little more info.
>
> Thanks,
> -Noah
>
>
> On 09/10/2013 07:43 PM, Steve Swinsburg wrote:
>
> Looks like its unrelated to being quartz. From what I've seen, code was
> moved around from one class to another but the Spring wiring wasn't changed
> so the dependencies aren't being injected, therefore null.
>
> cheers
> S
>
>
> On Wed, Sep 11, 2013 at 1:59 AM, Noah Botimer <botimer at umich.edu> wrote:
>
>> Pretty odd, but I did touch it last. I will have a look.
>>
>> Unfortunately, I'm pretty unfamiliar with our wrapper on Quartz. Do you
>> have a suggested path or understanding of how the context differs from the
>> tools?
>>
>> Comments on the JIRA issue are fine -- just wanted to mention that I'm
>> on it.
>>
>> Thanks,
>> -Noah
>>
>> On Sep 10, 2013, at 7:23 AM, Steve Swinsburg wrote:
>>
>> Here is the Jira. This is a regression in 2.10, as this bit of code was
>> moved post 2.9, specifically r118469.
>> https://jira.sakaiproject.org/browse/SAK-23908
>>
>>
>> On Tue, Sep 10, 2013 at 9:16 PM, Steve Swinsburg <
>> steve.swinsburg at gmail.com> wrote:
>>
>>> Looking through old versions of this, this code was originally in
>>> GradebookServiceHibernateImpl.java, but its been moved to
>>> BaseHibernateManager.java. It hasnt been wired up correctly and the setters
>>> arent even used. There is something very wrong with this bit of code...
>>>
>>>
>>> On Tue, Sep 10, 2013 at 8:44 PM, Steve Swinsburg <
>>> steve.swinsburg at gmail.com> wrote:
>>>
>>>> Updating this, the startup error was an old one and is a red herring.
>>>> The NPE remains though. Does anyone who worked on the external assignments
>>>> work know why this might be null when run from a quartz job? It just looks
>>>> like a normal bean injection.
>>>>
>>>> Thanks,
>>>> Steve
>>>>
>>>>
>>>> On Tue, Sep 10, 2013 at 7:42 AM, Steve Swinsburg <
>>>> steve.swinsburg at gmail.com> wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> I'm am having an issue with the gradebook service specifically to do
>>>>> with the externalAssessmentService. In the
>>>>> Gradebook getVisibleExternalAssignments.getVisibleExternalAssignments
>>>>> method, there is a call to
>>>>> the externalAssessmentService.getVisibleExternalAssignments method. The
>>>>> issue is, that from within the context of a quartz job, this is null, so
>>>>> throws a NPE.
>>>>>
>>>>> So does anyone that worked on this area know what the reason for
>>>>> this is?
>>>>>
>>>>> Here is the main part of the stacktrace:
>>>>>
>>>>> Caused by: java.lang.NullPointerException
>>>>> at
>>>>> org.sakaiproject.component.gradebook.BaseHibernateManager.getVisibleExternalAssignments(BaseHibernateManager.java:1421)
>>>>> at
>>>>> org.sakaiproject.component.gradebook.BaseHibernateManager$34.doInHibernate(BaseHibernateManager.java:1474)
>>>>> at
>>>>> org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
>>>>> at
>>>>> org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:339)
>>>>> at
>>>>> org.sakaiproject.component.gradebook.BaseHibernateManager.finalizeNullGradeRecords(BaseHibernateManager.java:1469)
>>>>> at
>>>>> org.sakaiproject.component.gradebook.GradebookServiceHibernateImpl.finalizeGrades(GradebookServiceHibernateImpl.java:2671)
>>>>>
>>>>> I note that in current trunk, on startup, I receive this bean error:
>>>>> Offending resource: file
>>>>> [/Users/steve/dev/sakai/tomcat/apache-tomcat-7.0.37-trunk/components/sakai-assignment-pack/WEB-INF/components.xml]
>>>>> Bean 'org.sakaiproject.assignment.impl.AssignmentGradeInfoProvider';
>>>>> nested exception is java.lang.NoClassDefFoundError:
>>>>> org/sakaiproject/service/gradebook/shared/ExternalAssignmentProviderCompat
>>>>>
>>>>> Is this a known error? Could it be the cause?
>>>>>
>>>>> thanks,
>>>>> Steve
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>>
>
>
> _______________________________________________
> sakai-dev mailing listsakai-dev at collab.sakaiproject.orghttp://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20130912/43fd50da/attachment.html
More information about the sakai-dev
mailing list