SLK 1.4: When attempting to assign a resource to myself, I get an error

Topics: User Forum
Jun 22, 2010 at 7:43 PM

When I click Assign this learning resource to yourself, I get the following error in SharePoint:

An error occurred. More information may be available in the server event log.

The only error in the Application Event Log is:

Event Type:    Error
Event Source:    Windows SharePoint Services 3
Event Category:    None
Event ID:    0
Date:        6/22/2010
Time:        11:37:19 AM
User:        N/A
Computer:    SERVER
Description:
SharePoint Learning Kit Error

System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.SharePointLearningKit.ApplicationPages.ActionsPage.lnkAssignSelf_Click(Object sender, EventArgs e)

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

However, when I take a look at the Assignment Webpart, I can see the learning item added to the To Do section (and go through and complete the assignment, etc.).

Jan 6, 2011 at 12:39 PM

I get the same problem, I've had to revert back to 1.3. Did you ever manage to resolve this?

Jan 6, 2011 at 1:05 PM

I am experiencing this same problem. Please could someone advise steps on how to correct this?

Coordinator
Jan 6, 2011 at 10:03 PM

Do you get the same problem in 1.5. I haven't been able to replicate it.

Richard

SLK Coordinator

http://blog.salamandersoft.co.uk

Jan 6, 2011 at 10:17 PM

I did try 1.5 RC before 1.4, but I couldn't get it to install. I tried running the ps script, but couldn't seem to install it. I also tried stsadm'ing the 1.5 wsp but couldn't get it to upgrade, or install. More information (errors messages) availabe if necessary.

Jan 7, 2011 at 10:26 AM
Edited Jan 7, 2011 at 10:39 AM

I am trying the 1.5 version at the moment but I am receiving the following error message:

Error: Cannot add the specified assembly to the global assembly cache: Microsoft.SharePointLearningKit.dll.

Coordinator
Jan 7, 2011 at 10:32 AM
meastaugh1 wrote:

I did try 1.5 RC before 1.4, but I couldn't get it to install. I tried running the ps script, but couldn't seem to install it. I also tried stsadm'ing the 1.5 wsp but couldn't get it to upgrade, or install. More information (errors messages) availabe if necessary.

What errors did you get?

Coordinator
Jan 7, 2011 at 10:35 AM
matthewhall wrote:

I am trying the 1.5 version at the moment but I am receiving the following error message:

Error: Cannot add the specified assembly to the global assembly cache: Microsoft.SharePointLearningKit.dll.

Are there any old versions of Microsoft.SharePointLearningKit.dll in the GAC already? Look in c:\windows\assembly.


If there are try deleting them and retrying.

Jan 7, 2011 at 10:40 AM

Thank you for your prompt reply. Should I simply delete the file or right click and uninstall?

Jan 7, 2011 at 10:42 AM
richardwillis wrote:
meastaugh1 wrote:

I did try 1.5 RC before 1.4, but I couldn't get it to install. I tried running the ps script, but couldn't seem to install it. I also tried stsadm'ing the 1.5 wsp but couldn't get it to upgrade, or install. More information (errors messages) availabe if necessary.

What errors did you get?

 When I try to add the solution (stsadm -o addsolution -filename sharepointlearningkit.wsp), I get this error:

Feature definition with Id 00057005-c978-11da-ba52-00042350e42e failed validatio
n, file 'SharePointLearningKitAdmin\elements.xml', line 5, character 28: The 'Im
ageUrl' attribute is not declared.
sharepointlearningkit.wsp: The Solution installation failed.

Jan 7, 2011 at 11:13 AM
richardwillis wrote:
matthewhall wrote:

I am trying the 1.5 version at the moment but I am receiving the following error message:

Error: Cannot add the specified assembly to the global assembly cache: Microsoft.SharePointLearningKit.dll.

Are there any old versions of Microsoft.SharePointLearningKit.dll in the GAC already? Look in c:\windows\assembly.


If there are try deleting them and retrying.

 There is a file with the name Microsoft.SharePointLearningKit which refers to the first version we had installed. I have tried deleting / uninstalling this however it states that it cannot access the file as it is in use by another process.

Jan 7, 2011 at 12:13 PM

Thanks Richard - Deployment has now been sucessful however I now have the following issues:

There is no link on the Application Management page to configure SLK (although this has been done).

When trying to assign a piece of work to myself I receive the following error:

Object reference not set to an instance of an object.   at Microsoft.SharePointLearningKit.ApplicationPages.ActionsPage.CreateSelfAssignment() 
   at Microsoft.SharePointLearningKit.ApplicationPages.ActionsPage.AssignToSelf() 
   at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) 
   at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) 
   at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) 
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Also when trying to view an assignment that has been given to a student I receive:

The assignment (ID 19) does not exist or you may not have permission to access it.

Any help would be greatly appreciated.

Thanks.

Coordinator
Jan 7, 2011 at 1:52 PM
meastaugh1 wrote:

 When I try to add the solution (stsadm -o addsolution -filename sharepointlearningkit.wsp), I get this error:

Feature definition with Id 00057005-c978-11da-ba52-00042350e42e failed validatio
n, file 'SharePointLearningKitAdmin\elements.xml', line 5, character 28: The 'Im
ageUrl' attribute is not declared.
sharepointlearningkit.wsp: The Solution installation failed.

That looks like you are putting the 2010 version on SharePoint 2007.

Jan 7, 2011 at 2:38 PM
richardwillis wrote:
meastaugh1 wrote:

 When I try to add the solution (stsadm -o addsolution -filename sharepointlearningkit.wsp), I get this error:

Feature definition with Id 00057005-c978-11da-ba52-00042350e42e failed validatio
n, file 'SharePointLearningKitAdmin\elements.xml', line 5, character 28: The 'Im
ageUrl' attribute is not declared.
sharepointlearningkit.wsp: The Solution installation failed.

That looks like you are putting the 2010 version on SharePoint 2007.

 oops. I've downloaded the correct version and installed it, but I can't deploy it. I get the error:

Error: Cannot add the specified assembly to the global assembly cache: Microsoft.LearningComponents.MRCI.dll

I've looked in the assembly folder but can't see a microsoft.learningcomponents entry.

Coordinator
Jan 7, 2011 at 3:58 PM

Are you using SLK-1.5RC-2007.zip? That shouldn't be trying to install Microsoft.LearningComponents.MRCI.dll.

Jan 7, 2011 at 4:12 PM
richardwillis wrote:

Are you using SLK-1.5RC-2007.zip? That shouldn't be trying to install Microsoft.LearningComponents.MRCI.dll.

 That's the one. The solution is 618kb.

Coordinator
Jan 7, 2011 at 4:13 PM

The problem with the NullReferenceException was that a view was missing in the database. We didn't have access to the database to see exactly what was missing, so we created a new one and now it works.


The problem was compounded by the fact that the SLK code was swallowing an Exception. Future releases will remove this so it can bubble up.

Jan 22, 2011 at 4:26 PM

Any ideas on why the learningcomponents error is preventing installation of 1.5? Thanks

Coordinator
Jan 22, 2011 at 5:03 PM

Which version are you using and what is the error?

Jan 23, 2011 at 8:30 PM
Richardwillis wrote:

Which version are you using and what is the error?

 SLK-1.5RC-2007.

I re-downloaded and installed and it seemed to go on ok this time. However, I get the same "object reference not set" error for self-assignment as mentioned by matthewhall. Does your message of Jan 7 at 4:13 PM mean that this will be addressed in a future release? Thanks.

Coordinator
Jan 28, 2011 at 5:46 PM

Yes the release version won't have this problem.


Regards,

Richard

Mar 3, 2011 at 8:00 PM

I tried upgrading to the release version of 1.5, when assigning to self, I get the following error in the browser:

View 'InstructorAssignmentList' not found in the schema.   at Microsoft.LearningComponents.Storage.LearningStore.CreateQuery(String viewName) 
   at Microsoft.SharePointLearningKit.SlkStore.BeginGetAssignmentProperties(LearningStoreJob job, AssignmentItemIdentifier assignmentId, SlkRole slkRole, Boolean basicOnly) 
   at Microsoft.SharePointLearningKit.SlkStore.GetAssignmentProperties(AssignmentItemIdentifier assignmentId, SlkRole slkRole, Boolean basicOnly) 
   at Microsoft.SharePointLearningKit.SlkStore.GetAssignmentProperties(AssignmentItemIdentifier assignmentId, SlkRole slkRole) 
   at Microsoft.SharePointLearningKit.ApplicationPages.ActionsPage.CreateSelfAssignment() 
   at Microsoft.SharePointLearningKit.ApplicationPages.ActionsPage.AssignToSelf() 
   at Microsoft.SharePointLearningKit.ApplicationPages.ActionsPage.lnkAssignSelf_Click(Object sender, EventArgs arguments) 
   at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) 
   at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) 
   at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) 
   at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) 
   at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) 
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 
Mar 24, 2011 at 6:49 PM

Same here, guys. Everything was fine with instalation. However, there is no link on the Application Management page to configure SLK. (version 1.5 - Feb. 10th - for SP2007), and when I try to assign documents I have the following errors:

 

- E-Learning actions:

The value () is not valid for the ItemId parameter.   at Microsoft.SharePointLearningKit.QueryString.Parse(String queryStringName) 
   at Microsoft.SharePointLearningKit.ApplicationPages.ActionsPage.LoadObjects() 
   at Microsoft.SharePointLearningKit.ApplicationPages.ActionsPage.get_SPListItem() 
   at Microsoft.SharePointLearningKit.ApplicationPages.ActionsPage.OnPreRender(EventArgs e) 
   at System.Web.UI.Control.PreRenderRecursiveInternal() 
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

- Assign to site

The ListId parameter is missing or empty.   at Microsoft.SharePointLearningKit.QueryString.Get(String queryStringName, Boolean isOptional) 
   at Microsoft.SharePointLearningKit.QueryString.ParseGuid(String queryStringName) 
   at Microsoft.SharePointLearningKit.ApplicationPages.ActionsPage.LoadObjects() 
   at Microsoft.SharePointLearningKit.ApplicationPages.ActionsPage.get_SPFile() 
   at Microsoft.SharePointLearningKit.ApplicationPages.ActionsPage.LoadSlkObjects() 
   at Microsoft.SharePointLearningKit.ApplicationPages.ActionsPage.get_Location() 
   at Microsoft.SharePointLearningKit.ApplicationPages.ActionsPage.AssignmentSiteUrl(String webUrl) 
   at Microsoft.SharePointLearningKit.ApplicationPages.ActionsPage.AssignToSite() 
   at Microsoft.SharePointLearningKit.ApplicationPages.ActionsPage.OnInit(EventArgs e) 
   at System.Web.UI.Control.InitRecursive(Control namingContainer) 
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

-Assign to self

The ListId parameter is missing or empty.   at Microsoft.SharePointLearningKit.QueryString.Get(String queryStringName, Boolean isOptional) 
   at Microsoft.SharePointLearningKit.QueryString.ParseGuid(String queryStringName) 
   at Microsoft.SharePointLearningKit.ApplicationPages.ActionsPage.LoadObjects() 
   at Microsoft.SharePointLearningKit.ApplicationPages.ActionsPage.get_SPFile() 
   at Microsoft.SharePointLearningKit.ApplicationPages.ActionsPage.LoadSlkObjects() 
   at Microsoft.SharePointLearningKit.ApplicationPages.ActionsPage.get_Location() 
   at Microsoft.SharePointLearningKit.ApplicationPages.ActionsPage.CreateSelfAssignment() 
   at Microsoft.SharePointLearningKit.ApplicationPages.ActionsPage.AssignToSelf() 
   at Microsoft.SharePointLearningKit.ApplicationPages.ActionsPage.OnInit(EventArgs e) 
   at System.Web.UI.Control.InitRecursive(Control namingContainer) 
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Do you guys managed to make it work somehow or are we stuck on this errors?!

Mar 25, 2011 at 8:29 PM

Now I tried the solution for SP2010 and went a little further: It installed and I successfully assigned a document to myself. Everything worked fine, but when I try to assign it to someone else it gives an error.

Just to remind, yes, I have two profiles - teacher and learner - and they have the right permissions.

Any hint?

Coordinator
Mar 27, 2011 at 9:17 PM

Hi Mark,

It sounds like your schema needs updating. To do this you'll need to modify your database. Delete the existing row from the configuration table then locate slkschema.sql in the installation package and pull out the bit which adds the schema to the table.

Richard

Coordinator
Mar 27, 2011 at 9:19 PM

Hi pedrobrito,

What error do you get?

Richard

Mar 28, 2011 at 2:23 PM

Hey Richard, thanks for the prompt answear.

At the server's event log I found this: (part of it is in portuguese, but we you can still see the error log)

--------------------------------------

SharePoint Learning Kit Error
System.IO.FileNotFoundException: O aplicativo Web em http://sharepoint2010.portais.org.br não pôde ser encontrado. Verifique se você digitou a URL corretamente. Se a URL deveria apresentar o conteúdo existente, o administrador do sistema talvez precise adicionar um novo mapeamento da URL solicitada para o aplicativo desejado.  

at Microsoft.SharePoint.SPSite..ctor(SPFarm farm, Uri requestUri, Boolean contextSite, SPUserToken userToken)  

at Microsoft.SharePoint.SPSite..ctor(String requestUrl)   at Microsoft.SharePointLearningKit.SlkStore.<>c__DisplayClassa.<GetMemberships>b__9()  

at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2()   at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)  

at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)  

at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode)  

at Microsoft.SharePointLearningKit.SlkStore.GetMemberships(SPWeb spWeb, IEnumerable`1 additionalInstructors, IEnumerable`1 additionalLearners, ReadOnlyCollection`1& groupFailures, String& groupFailureDetails, Boolean instructorsOnly)  

at Microsoft.SharePointLearningKit.ApplicationPages.AssignmentPropertiesPage.get_SlkMembers()  

at Microsoft.SharePointLearningKit.ApplicationPages.AssignmentPropertiesPage.SetAssignmentProperties()  

at Microsoft.SharePointLearningKit.ApplicationPages.AssignmentPropertiesPage.OnPreRender(EventArgs e)

 

Coordinator
Mar 28, 2011 at 6:23 PM

That looks like you need to set up Alternate Access Mappings.

Mar 31, 2011 at 1:12 PM
Edited Mar 31, 2011 at 2:07 PM

Hey Richard,

Thanks for the advice. It worked on 1st attempt. Not giving the error message anymore. However, when I sign in as instructor and assign a scorm file to two learners, none of them can see that there is an assignment. Both of them have the right permissions (SLK learner, read and contribute). Do you think the problem is with the permissions?

I have putted the "Assignment List" Webpart on the home page of my test website and for the instructor, it shows that i have assigned it to two learners, but when I log in as a learner the wepart doesn't show an assignment. Have you experienced that before?

Thank you very much for the support. I thought this community was abandoned but now I see that it's pretty much active!

-------------

Now it worked. I don't know why or how, but its working.

But i noticed that when the learner finishes the assignment, the "Submit" link doesn't work. The mouse cursor changes and shows like it was a text area, insted of showing like a hand (usual link format), so the learner can't click it. If you go back to the home (where the webpart is) and click on the assignment again then it enables the "Submit" link.

Is it a bug?

One more thing. When both the learners submit their assignments, the webpart doesnt show anything to the instructor. It simply disappear and then the instructor can't really know what is going on, what were their grades, etc. Is it right? That's how it works?

Actually I was paying atention and it does show something on the left bar inside the webpart, but as soon as it loads, it disappear..

Again, Richard, thank you for your time and patience.