Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

BCS external content type ReadList fails with InvalidMetadataObjectException

$
0
0

Hi All,

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 https://social.msdn.microsoft.com/Forums/en-US/5da4e990-06e6-435d-80c2-000d3a83676f/invalidmetadataobjectexception-while-viewing-external-list?forum=sharepointdevelopmentprevious 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, IDictionary`2 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, List`1& lstColumnNames, Dictionary`2& dictColumnsUsed, List`1& mapRowOrdering, List`1& lstEntityData)     bei Microsoft.SharePoint.SPListDataSource.GetFilteredEntityInstances(XmlDocument xdQueryView, Boolean fFormatDates, Boolean fUTCToLocal, String firstRowId, Int32 firstRowIndex, Boolean fBackwardsPaging, String& bdcidFirstRow, String& bdcidNextPageRow, List`1& lstColumnNames, Dictionary`2& dictColumnsUsed, List`1& 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 http: //sharepoint. stackexchange. com/questions/204339/bcs-external-content-type-readlist-fails-with-invalidmetadataobjectexception




Viewing all articles
Browse latest Browse all 7589

Trending Articles