In this blog post I just want to show how I go about finding more information when I try to debug SharePoint BCS Errors.
We have created our External Content Type, deployed our model and configure a Business Data List Web Part.
Web Part Error
Business Data Connectivity is configured incorrectly. Administrators, see the server log for more information. Correlation ID:66887706-ad9e-409e-9ff8-33c211df28d7
Using the ULS Viewer Way
The first thing we should do is to investigate in the logs.
- Open ULS Viewer
- File > Open From > ULS
- It should pick up your SharePoint log-file directory
- Click ‘OK’
- It should now be monitoring your logs
- Click the Filter icon
- Configure the filter like the following
- Now press Ctrl-x to clear the current log items
- Refresh your SharePoint Web Page
- Check back in the logs for items matching our filter
- I can see the exception here, the correlation token matches so I can be sure this is the right thing which is causing me the trouble. If we click on it we can see more detail
- Now we can see exactly what the issue is and we can begin to investigate our solution.
There is an error in the TypeDescriptors of Parameters on Method with Name ‘GetAllSupercars’ on Entity (External Content Type) with Name ‘Supercar’ in Namespace ‘LightningTools.TheTestBcsModel.BdcModel1’. The TypeDescriptors incompletely define where the Identifiers of Entity ‘Supercar’ are to be read. That Entity expects exactly ‘1’ Identifiers, but only ‘0’ TypeDescriptors were found from which to read them.
Using the ULS Logs + Notepad
- Open the latest logs from the SharePoint Root Logs folder
’C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions14LOGS’
- Turn off (if not already) Word Wrapping in Notepad from ‘Format’ > ‘Word Wrap’
- Perform a Find on your Correlation Token
- You will eventually come across a few hits, you should find the ones with a Category of ‘Business Data’ and a Level of ‘High’, in here you should find our error message. It does not look as pretty as the ULS Viewer but it does allow you to find out the detail required.
Using the BCS Tester Man way
For information on how to find errors using BCS Tester Man, check out our video on here: