System.TypeLoadException in IBM.Data.DB2Types.DB2DynArray - db2

I am new to use the DB2. I have added a reference for IBM.Data.DB2 DLL. The Path of the DLL is from X86 directory and also the Local Copy is set to False.
I am using the VisualStudio 2015 with the debug property of is set for x86.
I am able to build the project successfully, but getting following runtime error:
Server Error in '/' Application.
Could not load type 'IBM.Data.DB2Types.DB2DynArray' from assembly 'IBM.Data.DB2, Version=9.7.4.4, Culture=neutral, PublicKeyToken=7c307b91aa13d208'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.TypeLoadException: Could not load type 'IBM.Data.DB2Types.DB2DynArray' from assembly 'IBM.Data.DB2, Version=9.7.4.4, Culture=neutral, PublicKeyToken=7c307b91aa13d208'.
Let me know if anyone can help me on it or need any other details to investigate it.

If your code explicitly uses the class DB2DynArray , it looks like IBM removed that class from Db2 starting from V9.7 (i.e. DB2DynArray was available in versions up to V9.5 only).
Note that Db2-LUW V9.5 and V9.7 are no longer supported by IBM (current Db2 for Linux/Unix/Windows version is V11.x).
Consider an alternate solution unless the risks of running an unsupported version are signed-off by the business.
IBM registration is required to download Db2-versions(including fixpack) from this site.

Related

Matlab .Net Assembly compatible with .Net Core1.1

I am trying to use Matab module compiled as .Net assembly in a .Net Core Project, but I receive the following exception:
Unhandled Exception: System.IO.FileNotFoundException: Could not load
file or ass embly 'MWArray, Version=2.17.1.0, Culture=neutral,
PublicKeyToken=e1d84a0da19db8 6f'. The system cannot find the file
specified. at ConsoleAppCore1._1.Program.Main(String[] args)
MCR_R2017b_win64_installer.exe is installed on the system and I am able to load same Matlab module in .Net4.5 project.
Any clue to make it work with .Net Core1.1?
Simply NO - mathworks supports only "classic"/desktop .net framework on Windows platforms
Please refer to this: mathworks doc

TypeInitializationException accessing MonoGame GraphicsAdapter.Adapters, could not load type 'SharpDX.Rectangle'

Converting VB code from XNA 3.1 to MonoGame.
Any attempt to access class GraphicsAdapter throws the exception below. For example, trying to enumerate GraphicsAdapters. On this line:
For Each adapter As GraphicsAdapter In GraphicsAdapter.Adapters
Result is an exception:
System.TypeInitializationException occurred
HResult=-2146233036
Message=The type initializer for 'Microsoft.Xna.Framework.Graphics.GraphicsAdapter' threw an exception.
Source=MonoGame.Framework
TypeName=Microsoft.Xna.Framework.Graphics.GraphicsAdapter
StackTrace:
at Microsoft.Xna.Framework.Graphics.GraphicsAdapter.get_Adapters()
at ...my code...
InnerException:
HResult=-2146233054
Message=Could not load type 'SharpDX.Rectangle' from assembly 'SharpDX, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1'.
Source=MonoGame.Framework
TypeName=SharpDX.Rectangle
StackTrace:
at Microsoft.Xna.Framework.Graphics.GraphicsAdapter.CreateAdapter(Adapter1 device, Output monitor)
at Microsoft.Xna.Framework.Graphics.GraphicsAdapter.PlatformInitializeAdapters(ReadOnlyCollection`1& adapters)
at Microsoft.Xna.Framework.Graphics.GraphicsAdapter..cctor()
Note the inner exception:
Could not load type 'SharpDX.Rectangle' from assembly 'SharpDX, ...Version=4.0.1.0, ...
The project references these assemblies (among others):
MonoGame.Framework version=3.6.0.1625
from NuGet "MonoGame.Framework.WindowsDX", file
packages\MonoGame.Framework.WindowsDX.3.6.0.1625\lib\net40\MonoGame.Framework.dll
SharpDX version=4.0.1.0
SharpDX.Direct2D1 version=4.0.1.0
SharpDX.Direct3D9 version=4.0.1.0
SharpDX.DXGI version=4.0.1.0
SharpDX.Mathematics version=4.0.1.0
So I don't see why it would fail this way.
What could be wrong? Not compatible with this SharpDX version?
NOTE: These are all up-to-date packages from NuGet, in Visual Studio 2015. Targeting .Net 4.5.2.
UPDATE
To prove it isn't a problem with SharpDX, I put this line before that GraphicsAdapter line:
Dim testRect As SharpDX.Rectangle = New Rectangle()
This successfully created testRect. No Exception until attempt to access GraphicsAdapter. Also tried all the other Shared (static) properties of GraphicsAdapter, such as GraphicsAdapter.DefaultDevice. Any one fails with same exception.
I posted the same question to MonoGame forums:
http://community.monogame.net/t/solved-typeinitializationexception-accessing-graphicsadapter-adapters-could-not-load-type-sharpdx-rectangle/9803
Cause of problem:
Current release of MonoGame.Framework for WindowsDX (Windows OS + DirectX drivers), 3.6.0.1625 is built against SharpDX 2.6.3, and is not compatible with more recent SharpDX versions.
(Interim) Solution:
The developer branch of MonoGame does target the current SharpDX. Builds can be obtained from MonoGame's teamcity (free registration required).
Tested MonoGame.Framework build 3.7.0.994; it worked with SharpDX 4.0.1:
http://teamcity.monogame.net/viewLog.html?buildId=56483&tab=artifacts&buildTypeId=MonoGame_PackagingWindows
That build installs most SharpDX dlls to
C:\Program Files (x86)\MonoGame\v3.0\Assemblies\Windows
However, SharpDX.Mathematics.dll is currently missing,
so I still install SharpDX from NuGet, rather than using those.
Standard location for MonoGame releases:
(look for at least 3.7, which is not there yet, as I write this):
http://www.monogame.net/downloads/
(If instead of NuGet packages for MonoGame and SharpDX, I had downloaded MonoGame 3.6 installer and used its version of SharpDX dlls at C:\Program Files (x86)\MonoGame\v3.0\Assemblies\Windows, then I would not have had this incompatibility. However, that was not recent enough SharpDX for my purposes. This should be resolved by release of MonoGame 3.7)

Scripts fail with error that Microsoft.ServiceFabric.Internal.Strings.dll is unavailable when "Microsoft Service Fabric" is installed

After upgrading to the latest tools, runtime and SDK (5.5.216.0), PowerShell scripts, such as TestConfiguration.ps1, fail with an error that Microsoft.ServiceFabric.Internal.Strings.dll version 5.0.0.0 can't be found. As soon as I deinstall 'Microsoft Service Fabric' from the control panel, it works just fine. This behavior seems very similar to the Newtonsoft.Json.dll issue that was resolved in 5.5.216.0, just with a different assembly this time around.
Is this a known issue?
It quickly gets tedious to have to uninstall 'Microsoft Service Fabric' when I run certain scripts and then have to install it again for others that require it.
Example of error:
PS C:\git\sf-admin\DeploymentScripts\Microsoft.Azure.ServiceFabric.WindowsServer> .\TestConfiguration.ps1 ..\ClusterConfig.Production.Shared.json
Trace folder doesn't exist. Creating trace folder: C:\git\sf-admin\DeploymentScripts\Microsoft.Azure.ServiceFabric.WindowsServer\DeploymentTraces
Running Best Practices Analyzer...
Standalone package dependent files not found. Check package structure. Error: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.ServiceFabric.Internal.Strings, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or on
e of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.ServiceFabric.Internal.Strings, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
at Microsoft.ServiceFabric.ClusterManagementCommon.ValidatorExtensions.ThrowValidationExceptionIfNull[T](T parameter, String parameterName)
at Microsoft.ServiceFabric.DeploymentManager.BPA.BestPracticesAnalyzer.IsJsonConfigModelValid(StandAloneInstallerJsonModelBase config)
Thanks,
Hans
I believe you're getting that error due to the SDK/Runtime installing dll's to the GAC which are being picked up.
Try running moving your Microsoft.Azure.ServiceFabric.WindowsServer folder to another machine and running TestConfiguration.ps1 again.
If you're running the scripts from a box without internet access then you'll need to specify the location of the .cab which contains the runtime
-FabricRuntimePackagePath C:\temp\Microsoft.Azure.ServiceFabric.WindowsServer.5.5.216.0\MicrosoftAzureServiceFabric5.5.216.0.cab

Get-PnPProvisioning Template Error - SharePoint 2016

I am trying to extract the data using the SharePointPnPPowerShell2016 module.
When I call Get-PnPProvisioningTemplate it start to run, it goes through some of the settings Regional Settings, Supported UI Languages, Audit Settings, Site Security, Fields, Content Types, but then throws an error
Message :Could not load type 'Microsoft.SharePoint.Client.DocumentSet.DocumentSetTemplate' from assembly 'Microsoft.SharePoint.Client.DocumentManagement, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'.
StackTrace : at OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.ObjectContentType.GetEntities(Web web, PnPMonitoredScope scope, ProvisioningTemplateCreationInformation creationInfo, ProvisioningTemplate template)
at OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.ObjectContentType.ExtractObjects(Web web, ProvisioningTemplate template, ProvisioningTemplateCreationInformation creationInfo)
at OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.SiteToTemplateConversion.GetRemoteTemplate(Web web, ProvisioningTemplateCreationInformation creationInfo)
at Microsoft.SharePoint.Client.WebExtensions.GetProvisioningTemplate(Web web, ProvisioningTemplateCreationInformation creationInfo)
at PnPVSExtract_cj.Program.Main(String[] args) in c:\users\a0721713\documents\visual studio 2015\Projects\PnPVSExtract_cj\PnPVSExtract_cj\Program.cs:line 66
Date :11/14/2016 4:56:31 PM
I am running another environment with very similar set up, and it progress to List Instances and runs without problems.
Any ideas would help!
I have seen that error when a outdated version of the CSOM assemblies had been installed;
try installing the latest version of the SharePoint Server 2016 Client Components SDK

Issue with HTML module after upgradation from DNN version 4.9.5 to DNN version 6.1.2

If I upgraded from DNN version 4.4 to version 4.9.5 and then to version 6.1.2 then it gives me the error
Error: Buying is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: The type
initializer for 'DotNetNuke.Modules.Html.DataProvider' threw an
exception. ---> System.TypeInitializationException: The type
initializer for 'DotNetNuke.Modules.Html.DataProvider' threw an
exception. ---> System.InvalidCastException: Unable to cast object of
type 'DotNetNuke.Modules.HTML.SqlDataProvider' to type
'DotNetNuke.Modules.Html.DataProvider'. at
DotNetNuke.Modules.Html.DataProvider.CreateProvider() at
DotNetNuke.Modules.Html.DataProvider..cctor() --- End of inner
exception stack trace --- at
DotNetNuke.Modules.Html.DataProvider.Instance() at
DotNetNuke.Modules.Html.WorkflowStateController.GetWorkflows(Int32
PortalID) at
DotNetNuke.Modules.Html.HtmlTextController.GetWorkflow(Int32 ModuleId,
Int32 TabId, Int32 PortalId) at
DotNetNuke.Modules.Html.HtmlModule.OnInit(EventArgs e) --- End of
inner exception stack trace ---
For HTML module only
Like Devjosh said, it appears your HTML module was incorrectly installed. You will need to replace the DotNetNuke.Modules.Html.dll file in your DotNetNuke installation's "bin" folder. If you can login to the site, you can also try re-installing the module by going to the Host > Extensions page, clicking the "Available Extensions" tab, expanding the "Modules" section, then clicking the "Install" button next to the HTML module.
I would suggest looking in the App_Code folder, if you still have an HTML module folder in there, delete it.
Check your BIN folder for DLLs that have HTML in the name, there should only be one I believe, called dotnetnuke.modules.html.dll