Gravatar for rhowe@productiveedge.com

Question by howejr, Aug 18, 2015 5:01 PM

Reflection Exception

Anyone have any idea why we might be getting the following exceptions on Sitecore startup? Using 7.5 Update-2 with the April Coveo for Sitecore release. Thanks in advance!

6040 15:24:03 INFO  Finding and loading global Unity type registrations
6040 15:24:03 WARN  Could not fully inspect assembly Coveo.Framework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null for type loaders. Some types could not be loaded.
Exception: System.Reflection.ReflectionTypeLoadException
Message: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
Source: mscorlib
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.RuntimeModule.GetTypes()
   at System.Reflection.Assembly.GetTypes()
   at ActiveCommerce.IoC.RegistrationFinder.SafeGetTypes(Assembly assembly)

6040 15:24:03 WARN  Loader Exception
Exception: System.TypeLoadException
Message: Method 'FormatValueForIndexStorage' in type 'Coveo.Framework.Conversion.CoveoIndexFieldStorageValueFormatter' from assembly 'Coveo.Framework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.

6040 15:24:03 WARN  Loader Exception
Exception: System.TypeLoadException
Message: Method 'AddTypeMatch' in type 'Coveo.Framework.Fields.CoveoFieldMap' from assembly 'Coveo.Framework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
3 Replies
Gravatar for jflheureux@coveo.com

Answer by Jean-François L'Heureux, Aug 18, 2015 5:32 PM

These warning messages seems to come from the Active Commerce module as we can see in the stack trace: ActiveCommerce.IoC.RegistrationFinder.SafeGetTypes(Assembly assembly).

The Coveo.Framework assembly contains the base implementation of the CoveoIndexFieldStorageValueFormatter and CoveoFieldMap classes for Sitecore 7.0 and 7.1. The Sitecore 7.2, 7.5 and 8.0 implementations of those classes can be found in the Coveo.SearchProvider assembly. The Coveo configuration files references the correct assembly for those classes.

These warning messages shouldn't prevent Coveo nor Active Commerce to work as expected. Does the errors prevent either of the product to work in your environment? If not, I think you can safely ignore those warnings. Contact Active Commerce if you want them to improve their "Finding and loading global Unity type registrations" module to avoid logging warnings like this.

Gravatar for rhowe@productiveedge.com

Comment by howejr, Aug 19, 2015 7:12 AM

Thanks and no they don't seem to impact things working, just an error message in the log we're looking to clean up if possible.

Gravatar for jflheureux@coveo.com

Answer by Jean-François L'Heureux, Aug 18, 2015 5:08 PM

I think you installed the wrong version of the April 2015 Coveo for Sitecore package on your Sitecore 7.5 instance. You may have installed the package for Sitecore 7.0, 7.1, 7.2 or 8.0 instead of the one for Sitecore 7.5.

The correct package name is Coveo for Sitecore 75 3.0 (1000).zip and can be found here: https://developers.coveo.com/display/SC201504/Installing+Coveo+for+Sitecore+on+a+Single+Host

Gravatar for rhowe@productiveedge.com

Comment by howejr, Aug 18, 2015 5:12 PM

That is the name of the file I have sitting on my file system from the install.

Anything I can check inside the file etc?

Gravatar for martin.davies@bekagool.com

Answer by martin davies, Dec 8, 2016 10:59 AM

I just encountered something similar and found that I had missed an entry in my IOC registry (Castle Windsor). Despite the error message it was entirely unrelated to Coveo.

Ask a question