Friday, November 13, 2015

The shim execution failed unexpectedly - Assembly was requested for LobSystem with Name

Error:
Microsoft.BusinessData.Infrastructure.BdcException: The shim execution failed unexpectedly - Assembly was requested for LobSystem with Name


Solution:
Import SPBusinessDataCatalogDotNetAssembly with the path and Lobsystem name (if you use BCSMetaman to geterate model, you can find this name in .bcsmm, otherwise you will have to look into your .bdcm file).

Script:

$url = "http://app"

# You could change the below to c drive like C:\BCSModel.dll for simple path
$assemblyPath = "C:\Windows\assembly\GAC_MSIL\BCSModel.dll\1.0.0.0__146767669ea2f41\BCSModel.dll" $lobSystem = "IPM.BCS.ReferenceData"

Write-Host "Adding assembly to LOBSystem"
$serviceContext = Get-SPServiceContext $url
$lobSystem = Get-SPBusinessDataCatalogMetadataObject -ServiceContext $serviceContext -BdcObjectType lobsystem -Name $lobSystem
Import-SPBusinessDataCatalogDotNetAssembly -LobSystem $lobSystem -Path $assemblyPath -Confirm:$false

Write-Host "Completed"


No comments:

Post a Comment

Access to XMLHttpRequest at 'from origin has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https. .net core angular

Issue: The angular application was getting error from API that the origin has been blocked by CORS policy. Solution: Make sure that the...