views:

28

answers:

2

During the installation of the Poll module (Sitecore 6.2 package: 1.1.0 OMS version), an error occurs preventing the completion of the installation.

I downloaded the package from here: http://trac.sitecore.net/Poll

We are using: Sitecore.NET 6.2.0 (rev. 100507)

I've tried repeating the install several times, restoring the database and overwriting the files when prompted, but still encounter this error pasted below.

The following error occurs:

System.TypeLoadException: Could not load type 'Sitecore.Analytics.Data.AnalyticsDataContext' from assembly 'Sitecore.Analytics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. at Sitecore.Modules.OMSPoll.Domain.PollAnalyticsDataProvider.PollExists(String pollName) at Sitecore.Modules.OMSPoll.Domain.PollEventHandler.CheckIsPollItemNameDuplicate(String pollName) at Sitecore.Modules.OMSPoll.Domain.PollEventHandler.OnItemCreating(Object sender, EventArgs args) at Sitecore.Events.Event.EventSubscribers.RaiseEvent(String eventName, Object[] parameters, EventResult result) at Sitecore.Events.Event.EventSubscribers.RaiseEvent(String eventName, Object[] parameters) at Sitecore.Events.Event.RaiseEvent(String eventName, Object[] parameters) at Sitecore.Events.Event.RaiseItemCreating(Object sender, ItemCreatingEventArgs args) at Sitecore.Events.Event.DataEngine_CreatingItem(Object sender, ExecutingEventArgs1 e) at System.EventHandler1.Invoke(Object sender, TEventArgs e) at Sitecore.Data.Engines.EngineCommand2.CanExecute() at Sitecore.Data.Engines.EngineCommand2.Execute() at Sitecore.Data.Engines.DataEngine.CreateItem(String itemName, Item destination, ID templateId, ID newId) at Sitecore.Data.Managers.ItemProvider.DoCreateItem(String itemName, Item destination, ID templateId, ID newId) at Sitecore.Data.Managers.ItemProvider.CreateItem(String itemName, Item destination, ID templateId, ID newId, SecurityCheck securityCheck) at Sitecore.Data.Managers.ItemManager.CreateItem(String itemName, Item destination, ID templateId, ID newId, SecurityCheck securityCheck) at Sitecore.Data.Managers.ItemManager.CreateItem(String itemName, Item destination, ID templateId, ID newId) at Sitecore.Nexus.Data.DataCommands.AddFromTemplateCommand.(String itemName, Item destination, ID templateId, ID newId) at Sitecore.Nexus.Data.DataCommands.AddFromTemplateCommand.Execute(ID templateId, Item destination, String itemName, ID newId) at Sitecore.Nexus.Data.NexusDataApi.AddFromTemplate(ID templateId, Item destination, String itemName, ID newId) at Sitecore.Data.Engines.DataCommands.AddFromTemplateCommand.DoExecute() at Sitecore.Data.Engines.EngineCommand2.Execute() at Sitecore.Data.Engines.DataEngine.AddFromTemplate(String itemName, ID templateId, Item destination, ID newId) at Sitecore.Install.Items.ItemInstaller.CreateLightweightItem(ItemReference item, XmlVersionParser parser) at Sitecore.Install.Items.ItemInstaller.InstallItem(BehaviourOptions installOptions, Item targetItem, ItemReference item, XmlVersionParser parser) at Sitecore.Install.Items.ItemInstaller.GetVersionInstallMode(PackageEntry entry, ItemReference reference, XmlVersionParser parser, ItemInstallerContext context) at Sitecore.Install.Items.ItemInstaller.InstallEntry(PackageEntry entry) at Sitecore.Install.Items.ItemInstaller.Flush() at Sitecore.Install.Items.LegacyItemUnpacker.Flush() at Sitecore.Install.Framework.SinkDispatcher.Flush() at Sitecore.Install.Utils.EntrySorter.Flush() at Sitecore.Install.Framework.EntryBuilder.Flush() at Sitecore.Install.Zip.PackageReader.Populate(ISink1 sink) at Sitecore.Install.Utils.EntrySorter.Populate(ISink1 sink) at Sitecore.Install.Installer.InstallPackage(String path, ISource1 source, IProcessingContext context) at Sitecore.Install.Installer.InstallPackage(String path, IProcessingContext context) at Sitecore.Shell.Applications.Install.Dialogs.InstallPackage.InstallPackageForm.AsyncHelper.b__0() at Sitecore.Shell.Applications.Install.Dialogs.InstallPackage.InstallPackageForm.AsyncHelper.CatchExceptions(ThreadStart start)

Local I can install but get the following error when i use the Poll Branch to create a new poll:

Kan type Sitecore.Analytics.Data.AnalyticsDataContext niet laden vanuit assembly Sitecore.Analytics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px} b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px} H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } pre {font-family:"Lucida Console";font-size: .9em} .marker {font-weight: bold; color: black;text-decoration: none;} .version {color: gray;} .error {margin-bottom: 10px;} .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

<body bgcolor="white">

        <span><H1>Serverfout in toepassing /.<hr width=100% size=1 color=silver></H1>

        <h2> <i>Kan type Sitecore.Analytics.Data.AnalyticsDataContext niet laden vanuit assembly Sitecore.Analytics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.</i> </h2></span>

        <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

        <b> Beschrijving: </b>Er is een onverwerkte uitzondering opgetreden tijdens het uitvoeren van de huidige webaanvraag. Raadpleeg de stacktracering voor meer informatie over deze fout en de oorsprong ervan in de code.

        <br><br>

        <b> Details van uitzondering: </b>System.TypeLoadException: Kan type Sitecore.Analytics.Data.AnalyticsDataContext niet laden vanuit assembly Sitecore.Analytics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.<br><br>

        <b>Fout in bron:</b> <br><br>

        <table width=100% bgcolor="#ffffcc">
           <tr>
              <td>
                  <code>

Er is een onverwerkte uitzondering gegenereerd tijdens het uitvoeren van de huidige webaanvraag. Aan de hand van de onderstaande tracering van de uitzonderingsstack kunt u meer informatie verkrijgen over de oorsprong en de locatie van de uitzondering.

              </td>
           </tr>
        </table>

        <br>

        <b>Stacktracering:</b> <br><br>

        <table width=100% bgcolor="#ffffcc">
           <tr>
              <td>
                  <code><pre>

[TypeLoadException: Kan type Sitecore.Analytics.Data.AnalyticsDataContext niet laden vanuit assembly Sitecore.Analytics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.] Sitecore.Modules.OMSPoll.Domain.PollAnalyticsDataProvider.PollExists(String pollName) +0 Sitecore.Modules.OMSPoll.Domain.PollEventHandler.CheckIsPollItemNameDuplicate(String pollName) +128 Sitecore.Modules.OMSPoll.Controls.OMSPollWizardForm.get_IsPollExists() +93 Sitecore.Modules.OMSPoll.Controls.OMSPollWizardForm.ActivePageChanging(String pageFrom, String& pageTo) +97 Sitecore.Web.UI.Pages.WizardForm.set_Active(String value) +80 Sitecore.Web.UI.Pages.WizardForm.Next() +92 Sitecore.Web.UI.Pages.WizardForm.OnNext(Object sender, EventArgs formEventArgs) +40 Sitecore.Web.UI.HtmlControls.Button.DoClick(Message message) +40

[TargetInvocationException: Het doel van een aanroep heeft een uitzondering veroorzaakt.] System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0 System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +71 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +261 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29 Sitecore.Reflection.ReflectionUtil.InvokeMethod(MethodInfo method, Object[] parameters, Object obj) +45 Sitecore.Reflection.ReflectionUtil.CallMethod(Type type, Object obj, String methodName, Boolean includeNonPublic, Boolean includeInherited, Boolean includeStatic, Object[] parameters) +87 Sitecore.Reflection.ReflectionUtil.CallMethod(Object obj, String methodName, Boolean includeNonPublic, Boolean includeInherited, Object[] parameters) +43 Sitecore.Web.UI.HtmlControls.Component.HandleMessage(Message message) +133 Sitecore.Web.UI.HtmlControls.Control.HandleMessage(Message message) +497 Sitecore.Shell.Framework.Commands.ClientEventCommand.SendEventMessage() +105 Sitecore.Shell.Framework.Commands.ClientEventCommand.Execute(CommandContext context) +10 Sitecore.Web.UI.Sheer.ClientPage.RaiseEvent() +64 Sitecore.Web.UI.Sheer.ClientPage.OnPreRender(EventArgs e) +268 System.Web.UI.Control.PreRenderRecursiveInternal() +80 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842

              </td>
           </tr>
        </table>

        <br>

        <hr width=100% size=1 color=silver>

        <b>Versiegegevens:</b>&nbsp;Microsoft .NET Framework Versie:2.0.50727.4206; ASP.NET Versie:2.0.50727.4209

        </font>

</body>

A: 

Looks like you haven't installed OMS on your solution, and it is a prerequisite for what you are trying to do.

Sitecore OMS is not installed by default, on any Sitecore release (that I am aware of).

Download link here: Sitecore OMS Download on SDN

Mark Cassidy
OMS is installed in my version of Sitecore 6.2 i'm even able to run multiple sorts of reports. Thx for thinking with me tho :).
Younes
A: 

The solution to this problem is:

Sitecore CMS 6.2.0 rev.091012 has introduced some breaking API changes so that you can't use LINQ to SQL directly from your code. This means that you have to rebuild the Shared Source Module against your own version of Sitecore.

To rebuild against own version this is what I did:

  • Open the Poll Module Project in VS and rebuild the OMSPoll. dll
  • Open the Shared Source code in Visual Studio
  • Remove all Sitecore related Dll's from the assembly references (Sitecore.Client, Sitecore.Kernel)
  • Reference to the newly build version of the OMSPoll.dll
  • Reference to the Sitecore.Client and Sitecore.Kernel that is being used in your Sitecore project
  • Reference to the correct Sitecore.Analytics.dll
  • Rebuild the Shared Source Module (Poll)
  • Open the default package.zip and replace the dll's inside by the ones that you've newly build.
  • Install the package

Good luck whenever you encounter this problem!

Younes