StroreDataBound Error: Object reference not set to an instance of an object

  1. #1

    StroreDataBound Error: Object reference not set to an instance of an object

    Hi guys,

    I have an error a little bit similar to this thread: http://forums.ext.net/showthread.php...om-code-behind
    Only that it isn't a calendar.

    I have a user control (uc) on the master page. There's only a store (XML from a Web-Service) and a window it (including a few properties to access it). In the Page_Load event I set the store Url with

      CType(JobStore.Proxy.Proxy, HttpProxy).Url = My.Settings.JobSearchUrl.Replace("{CUST_ID}", Session("myvar"))
    It comes up fine the first time but when I switch the "myvar" I get this stack trace:

    System.NullReferenceException was unhandled by user code
    HResult=-2147467261
    Message=Object reference not set to an instance of an object.
    Source=System.Xml
    StackTrace:
    at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
    at System.Xml.XmlDocument.Load(XmlReader reader)
    at System.Web.UI.WebControls.XmlDataSource.PopulateXm lDocument(XmlDocument document, CacheDependency& dataCacheDependency, CacheDependency& transformCacheDependency)
    at System.Web.UI.WebControls.XmlDataSource.GetXmlDocu ment()
    at System.Web.UI.WebControls.XmlDataSourceView.Execut eSelect(DataSourceSelectArguments arguments)
    at System.Web.UI.DataSourceView.Select(DataSourceSele ctArguments arguments, DataSourceViewSelectCallback callback)
    at Ext.Net.StoreDataBound.PerformSelect() in C:\Users\Geoffrey McGill\Documents\Visual Studio 2010\Projects\Ext.NET\v1\Ext.Net\Ext\Data\StoreDat aBound.cs:line 790
    at Ext.Net.StoreDataBound.DataBind() in C:\Users\Geoffrey McGill\Documents\Visual Studio 2010\Projects\Ext.NET\v1\Ext.Net\Ext\Data\StoreDat aBound.cs:line 254
    at Ext.Net.StoreDataBound.EnsureDataBound() in C:\Users\Geoffrey McGill\Documents\Visual Studio 2010\Projects\Ext.NET\v1\Ext.Net\Ext\Data\StoreDat aBound.cs:line 318
    at Ext.Net.StoreDataBound.OnPreRender(EventArgs e) in C:\Users\Geoffrey McGill\Documents\Visual Studio 2010\Projects\Ext.NET\v1\Ext.Net\Ext\Data\StoreDat aBound.cs:line 388
    ....
    at System.Web.UI.Control.PreRenderRecursiveInternal()
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    I couldn't figure out why this comes up. It seems that the Xml is written in an non-existing store.
    Something really useful regarding to this problem I haven't found in the forum until now.

    I have no idea, how to prevent or solve that. In the StoreDataBound.cs line 388 etc. isn't any unusual in.

    Any ideas?

    Regards,

    Frank
  2. #2
    Hello!

    System.NullReferenceException was unhandled by user code
    HResult=-2147467261
    Message=Object reference not set to an instance of an object.
    Source=System.Xml
    StackTrace:
    at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
    at System.Xml.XmlDocument.Load(XmlReader reader)
    I think that the main problem is not in Ext.NET Store it's in your XML because StackTrace shows that exception occurs in a XmlLoader. Please, double check it.
  3. #3
    Hi Baidaly,

    it includes field definitions and field sizes. The usual Microsoft stuff as a result of a returned DataTable.
    The XML itself looks fine.

    Regards,

    Frank

Similar Threads

  1. Replies: 1
    Last Post: Jun 27, 2012, 9:19 PM
  2. Replies: 1
    Last Post: May 03, 2010, 2:32 PM
  3. Replies: 4
    Last Post: Apr 12, 2010, 1:01 PM
  4. Replies: 0
    Last Post: Jun 03, 2009, 4:18 AM
  5. [CLOSED] Ext Object Reference
    By Ben in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 08, 2009, 7:03 PM

Posting Permissions