Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I wrote a custom BDC model, and it works. I can create a list, look at the items, look at a single item, create external data columns in other lists, etc.

Now I created a content source to index this. When I run a full crawl it errors

Error while crawling LOB contents. ( Object reference not set to an instance of an object. )

My ULS logs have

11/23/2011 13:25:57.60      w3wp.exe (0x0CF4)                            0x23C0     SharePoint Server Search           Admin Audit                        96     Information     A full crawl was started on 'Yellow Pages' by domain\dave.lozzi.     026ffd1d-3d5f-4d20-a976-6f23203bd5e9
11/23/2011 13:26:04.14      w3wp.exe (0x1558)                            0x0A98     Business Connectivity Services     Business Data                      9f4d     Unexpected     'BDC' BdcServiceApplication logging server side MetadataObjectNotFoundException before marshalling and rethrowing on client side: IEntity could not be found by Entity Namespace = Mine.BDC.YellowPagesModel, Name = FlatFileEntity Stack Trace:    at Microsoft.SharePoint.BusinessData.SharedService.EntityAccessor.GetEntityWithNameAndNamespace(String namespace, String name, Guid partitionId, DbSessionWrapper dbSessionWrapper)     at Microsoft.SharePoint.BusinessData.SharedService.BdcServiceApplication.<>c__DisplayClassa7.<Microsoft.SharePoint.BusinessData.SharedService.IBdcServiceApplication.GetEntityWithNameAndNamespace>b__a6()     at Microsoft.SharePoint.BusinessData.SharedService.BdcServiceApplication.Execute[T](String operationName, UInt32 maxRunningTime, ExecuteDelegate`1 operation)...     8cf8f71c-4df6-49b4-b432-72359bd955e4
11/23/2011 13:26:04.14*     w3wp.exe (0x1558)                            0x0A98     Business Connectivity Services     Business Data                      9f4d     Unexpected     ...  ------------------------      8cf8f71c-4df6-49b4-b432-72359bd955e4
11/23/2011 13:26:04.42      w3wp.exe (0x0DE8)                            0x1474     SharePoint Foundation              General                            bqk1     High         External List: Lookup of entity namespace 'Mine.BDC.YellowPagesModel', name 'FlatFileEntity' failed. Exception: IEntity could not be found by Entity Namespace = Mine.BDC.YellowPagesModel, Name = FlatFileEntity Stack Trace:    at Microsoft.SharePoint.BusinessData.MetadataModel.Static.DataAccess.EntityMaterializer.GetEntityByNameAndNamespace(String namespace, String name)     at Microsoft.SharePoint.BusinessData.MetadataModel.DatabaseBackedMetadataCatalog.GetEntity(String namespace, String name)     at Microsoft.SharePoint.SPListDataSource.InitializeByEntityNameAndNamespace(SPWeb webContext)      a1e90a47-f50f-4ad3-9c58-37e653773737
11/23/2011 13:26:05.02      mssdmn.exe (0x1BC0)                          0x2368     SharePoint Server Search           PHSts                              dvt6     High         SetSTSErrorInfo ErrorMessage = Error from SharePoint site: Entity (External Content Type) cannot be found with Namespace = 'Mine.BDC.YellowPagesModel', Name = 'FlatFileEntity'. hr = 80131600  [sts3util.cxx:5120]  d:\office\source\search\native\gather\protocols\sts3\sts3util.cxx    
11/23/2011 13:26:05.02      mssdmn.exe (0x1BC0)                          0x2368     SharePoint Server Search           PHSts                              dvu0     High         STS3::StoreCachedError: Object initialization failed.  Message:  "Error from SharePoint site: Entity (External Content Type) cannot be found with Namespace = 'Mine.BDC.YellowPagesModel', Name = 'FlatFileEntity'." HR: 80131600  [sts3util.cxx:5214]  d:\office\source\search\native\gather\protocols\sts3\sts3util.cxx    
11/23/2011 13:26:05.02      mssdmn.exe (0x1BC0)                          0x2368     SharePoint Server Search           PHSts                              dvr6     High         STS3::COWSList::Initialize: List Id {091787dd-7466-4669-9334-96f20204dd75} Return error to caller, hr=80131600 errorMessage Error from SharePoint site: Entity (External Content Type) cannot be found with Namespace = 'Mine.BDC.YellowPagesModel', Name = 'FlatFileEntity'.  [sts3util.cxx:4350]  d:\office\source\search\native\gather\protocols\sts3\sts3util.cxx    
11/23/2011 13:26:05.02      mssdmn.exe (0x1BC0)                          0x2368     SharePoint Server Search           PHSts                              dv6a     High         CSTS3Accessor::InitURLType: Return error to caller, hr=80131600                 [sts3acc.cxx:1995]  d:\office\source\search\native\gather\protocols\sts3\sts3acc.cxx    
11/23/2011 13:26:05.02      mssdmn.exe (0x1BC0)                          0x2368     SharePoint Server Search           PHSts                              dv3t     High         CSTS3Accessor::InitURLType fails, Url sts4://watspd01:81/siteurl=/siteid={ea53d092-1451-4007-9d63-784ca431f3ef}/weburl=/webid={a3465bf2-e7f3-49f4-837d-d9a604ca49e6}/listid={091787dd-7466-4669-9334-96f20204dd75}, hr=80131600  [sts3acc.cxx:259]  d:\office\source\search\native\gather\protocols\sts3\sts3acc.cxx    
11/23/2011 13:26:05.02      mssdmn.exe (0x1BC0)                          0x2368     SharePoint Server Search           PHSts                              dvb1     High         CSTS3Accessor::Init fails, Url sts4://watspd01:81/siteurl=/siteid={ea53d092-1451-4007-9d63-784ca431f3ef}/weburl=/webid={a3465bf2-e7f3-49f4-837d-d9a604ca49e6}/listid={091787dd-7466-4669-9334-96f20204dd75}, hr=80131600  [sts3handler.cxx:312]  d:\office\source\search\native\gather\protocols\sts3\sts3handler.cxx    
11/23/2011 13:26:05.02      mssdmn.exe (0x1BC0)                          0x2368     SharePoint Server Search           PHSts                              dvb2     High         CSTS3Handler::CreateAccessorExD: Return error to caller, hr=80131600            [sts3handler.cxx:330]  d:\office\source\search\native\gather\protocols\sts3\sts3handler.cxx    
11/23/2011 13:26:05.02      mssdmn.exe (0x1BC0)                          0x2368     SharePoint Server Search           FilterDaemon                       e4ye     High         FLTRDMN: Errorinfo is "Error from SharePoint site: Entity (External Content Type) cannot be found with Namespace = 'Mine.BDC.YellowPagesModel', Name = 'FlatFileEntity'."  [fltrsink.cxx:553]  d:\office\source\search\native\mssdmn\fltrsink.cxx    
11/23/2011 13:26:05.02      w3wp.exe (0x0DE8)                            0x18EC     SharePoint Foundation              General                            avfx     High         SOAP exception: Microsoft.SharePoint.SPException: Entity (External Content Type) cannot be found with Namespace = 'http://watspd01:81', Name = 'New external content type'.     at Microsoft.SharePoint.SPListDataSource.get_Entity()     at Microsoft.SharePoint.SPListDataSource.GetFieldCollectionFromEntity()     at Microsoft.SharePoint.SPListDataSource.ScoutEntityFieldCollectionForViableSPFields(SPFieldCollection fldcollParent, IFieldCollection& fldcoll, Int32[]& rgifldViableSPFields, Int32& cfldViableSPFields, AssociationManager& assocmgr)     at Microsoft.SharePoint.SPFieldCollection.EnsureFieldsFromEntity()     at Microsoft.SharePoint.SPFieldCollection.Undirty()     at Microsoft.SharePoint.SPBaseCollection.GetEnumerator()     at Microsoft.SharePoint.SoapServer.SiteDataImpl.GetListXml(XmlTex...     fdf78ac6-d2dd-423e-8bed-d319d564a344
11/23/2011 13:26:05.02*     w3wp.exe (0x0DE8)                            0x18EC     SharePoint Foundation              General                            avfx     High         ...tWriter w, SPWeb spWeb, SPList spList, Boolean ignoreSecurityIfInherit, Int32 schemaVersion)     at Microsoft.SharePoint.SoapServer.SiteDataImpl.GetContent(ObjectType objectType, String objectId, String folderUrl, String itemId, Boolean retrieveChildItems, Boolean securityOnly, String& lastItemIdOnPage)     at Microsoft.SharePoint.SoapServer.SiteData.GetContent(ObjectType objectType, String objectId, String folderUrl, String itemId, Boolean retrieveChildItems, Boolean securityOnly, String& lastItemIdOnPage)     fdf78ac6-d2dd-423e-8bed-d319d564a344

And ideas?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

We found the issue. I was using SPContext in the ReadList method. SPContext doesn't exist for the timer job services running. Applied a work around and it runs great!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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