0

I have create a BDC model with a .Net assembly linking to a LOB system. Checking the model in Visual Studio is all good. I upload the solution to SharePoint 2013 Enterprise and create a new external list based on the external content type in my BDC model. So far, so good. But when I try to open the list to show all items (ReadList) it fails with user error

Die Daten können nicht gerendert werden. Wenn das Problem weiterhin besteht, wenden Sie sich an den Webserveradministrator. (Data could not be rendered. Contact your system administrator)

In ULS there is a type load exception stating that my entity class OTUserEntity could not be loaded from Microsoft.BusinessData ??? (it's from, not by...).

But, when I debug the solution in Visual Studio I can see my code running and the class OTUserEntity being instatiated without problem. Still resulting in the same user error and ULS exception.

I already changed the naming as suggested in this post: InvalidMetadataObjectException while viewing external list but without luck.

I also did and IISRESET and even rebootet to avoid and old version dll conflict.

(Re-) Connecting the assembly to the LobSystem by doing Import-SPBusinessDataCatalogDotNetAssembly also did not help. Ideas? Please!

Ben

ULS:

InnerException 1: System.TypeLoadException: Der Typ "OmnitrackerProfileSyncBDC.OmnitrackerProfileSyncBDCModel.OTUserEntity" in der Assembly "Microsoft.BusinessData, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" konnte nicht geladen werden. bei System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type) bei System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase) bei Microsoft.SharePoint.BusinessData.Infrastructure.DotNetTypeReflector.ResolveDotNetType(String abstractTypeName, ILobSystemStruct lobSystemStruct) bei Microsoft.SharePoint.BusinessData.Infrastructure.DotNetTypeReflector.GetDotNetType(ITypeDescriptor typeDescriptor) Error while executing web part: Microsoft.BusinessData.MetadataModel.InvalidMetadataObjectException: Der Typ, der durch den 'TypeName' 'OmnitrackerProfileSyncBDC.OmnitrackerProfileSyncBDCModel.OTUserEntity' des 'TypeDescriptors' für den Parameter mit dem Namen 'oTUsersList' für die Methode mit dem Namen 'ReadList' für die Entität (externer Inhaltstyp) mit dem Namen 'OTUsers' im Namespace 'OmnitrackerProfileSyncBDC.OmnitrackerProfileSyncBDCModel' beschrieben wird, kann nicht geladen werden. ---> System.TypeLoadException: Der Typ "OmnitrackerProfileSyncBDC.OmnitrackerProfileSyncBDCModel.OTUserEntity" in der Assembly "Microsoft.BusinessData, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" konnte nicht geladen werden. bei System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type) bei System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase) bei Microsoft.SharePoint.BusinessData.Infrastructure.DotNetTypeReflector.ResolveDotNetType(String abstractTypeName, ILobSystemStruct lobSystemStruct) bei Microsoft.SharePoint.BusinessData.Infrastructure.DotNetTypeReflector.GetDotNetType(ITypeDescriptor typeDescriptor) --- Ende der internen Ausnahmestapelüberwachung --- bei Microsoft.SharePoint.BusinessData.Infrastructure.DotNetTypeReflector.GetDotNetType(ITypeDescriptor typeDescriptor) bei Microsoft.SharePoint.BusinessData.Infrastructure.DotNetTypeReflector.GetValueFromInstanceUsingChildTypeDescriptor(Object instance, ITypeDescriptor typeDescriptor) bei Microsoft.SharePoint.BusinessData.Runtime.FieldValueHelpers.GetValue(Object adapter, ITypeDescriptor root, String dotNotation, IDictionary2 cache) bei Microsoft.SharePoint.BusinessData.Runtime.FieldValueDictionary.get_Item(String fieldDotNotation) bei Microsoft.SharePoint.SPListDataSource.GetFilteredEntityInstancesInternal(XmlDocument xdQueryView, Boolean fFormatDates, Boolean fUTCToLocal, String firstRowId, Int32 firstRowIndex, Boolean fBackwardsPaging, String& bdcidFirstRow, String& bdcidNextPageRow, List1& lstColumnNames, Dictionary2& dictColumnsUsed, List1& mapRowOrdering, List1& lstEntityData) bei Microsoft.SharePoint.SPListDataSource.GetFilteredEntityInstances(XmlDocument xdQueryView, Boolean fFormatDates, Boolean fUTCToLocal, String firstRowId, Int32 firstRowIndex, Boolean fBackwardsPaging, String& bdcidFirstRow, String& bdcidNextPageRow, List1& lstColumnNames, Dictionary2& dictColumnsUsed, List1& mapRowOrdering, List`1& lstEntityData) bei Microsoft.SharePoint.SPListItemCollection.EnsureEntityDataViewAndOrdering(String& bdcidFirstRow, String& bdcidNextPageFirstRow) bei Microsoft.SharePoint.SPListItemCollection.EnsureListItemsData() bei Microsoft.SharePoint.SPListItemCollection.get_Count() bei Microsoft.SharePoint.WebControls.SPDataSourceView.ExecuteSelect(DataSourceSelectArguments selectArguments, String aggregateString, Boolean wantReturn, BaseXsltListWebPart webpart, SPListItem& listItem, SPListItemCollection& listItems, String[]& fieldList) bei Microsoft.SharePoint.WebControls.SingleDataSource.GetXPathNavigatorInternal() bei Microsoft.SharePoint.WebControls.SingleDataSource.GetXPathNavigator() bei Microsoft.SharePoint.SPList.RenderListData(XsltListViewWebPart xslWebPart, SPView view, TextWriter output) bei Microsoft.SharePoint.ApplicationPages.InplaceViewEditor.Execute(String strCmd) bei Microsoft.SharePoint.ApplicationPages.InplaceViewEditor.OnLoad(EventArgs e)

Also posted on MSDN forum

0

Solved it. Two things were going wrong.

Firstly, Visual Studio scaffolded the BDC model such that reference to the type in the BDC model was like

<TypeDescriptor TypeName="MyBDCModel, MyEntityType" Name="MyEntityType">

Instead the type should be refernced by the fully qualified assembly name:

<TypeDescriptor TypeName="MyEntityNamespace.MyEntityType, MyEntitysAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=19cbd0ec1bd88206, processorArchitecture=MSIL" Name="MyEntityType">

Secondly, the missing type were located in another project/assembly in the same solution. For a BDC model using other projects one has to link those to the BDC model. You do this by opening the model's folder's property window -> Assemblies -> [...]. In the window that opens add the needed assemblies.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.