A GeMMA user reported that they could no longer use GeMMA. One day it worked the next it didn’t!
The error message they received was “The type initializer for ‘ExtentPlaceHolderCreator’ threw an exception“. The error message is shown when importing data into GeMMA or when closing the Settings form. Both of which are trying to update the gemma database. For example:

The log file showed:-
System.TypeInitializationException: The type initializer for 'ExtentPlaceholderCreator' threw an exception. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.DllNotFoundException: Unable to load DLL 'SqlServerSpatial110.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
The Client had installed a program on their machine that also installed some Microsoft SQL stuff. It is thought that this caused the issue. Even when this was uninstalled the error messages persisted.
After a few remote sessions and support sending over dll’s etc it was found that we could fix the issue by forcing GeMMA to use a specific version of the SQL Server Types Assembly by simply adding the below to the GeMMA.exe.Config:-
<dependentAssembly>
<assemblyIdentity name="Microsoft.SqlServer.Types" publicKeyToken="89845dcd8080cc91" />
<bindingRedirect oldVersion="1.0.0.0-11.0.0.0" newVersion="10.0.0.0" />
</dependentAssembly>
This basically forces GeMMA to use version 10 of Microsoft.SqlServer.Types.
0 Comments