[Mono-aspnet-list] LinqDataSourceView NullReferenceException (better format)
sigma54
conwaykyle at mail.com
Tue Feb 21 23:06:37 UTC 2012
Sorry, here is my question again with better formatting to make it readable!
I'm having some trouble porting an ASP.NET web application to Linux. I'm
using DbLinq to connect to MySQL - I created a parameterless constructor so
that LinqDataSource should work. Most things seem to be working well except
that I'm getting a null reference exception when LinqDataSourceView tries to
do a MoveNext although it works fine on Windows with the same configuration.
Anyone have any idea what might be causing the issue?
Thanks!
Kyle
*Code Snippet That Creates LinqDataSource:*
LinqDataSource ds = new LinqDataSource();
ds.AutoGenerateWhereClause = true;
ds.ContextTypeName = "DataClassesDataContext";
ds.TableName = "Clusters";
ds.Select = "new (GenbankAccession, Description, Enum_Phyla.Phylum as
Phylum, OrgName, BPStart, BPEnd, Lineage, ID, UserInfo.User_Name as
Contributor, UserInfo.First_Name as FirstName, UserInfo.Last_Name as
LastName, UserInfo.Lab_Name as LabName, UserInfo.Lab_Url as LabURL,
CompoundFamily.FamilyName as FamilyName,
CompoundFamily.Enum_PathwayType.Type as PathwayTypeName)";
ds.WhereParameters.Add("OrgName", orgname);
ds.WhereParameters.Add("CompoundFamily.FamilyName",
parameters["CompoundFamily"]);
GridView gv = new GridView();
GridViewTemplate.applyStyletoGridView(gv);
gv.ID = setting;
gv.DataSource = ds;
*Here is the stack trace (long): *
System.NullReferenceException: Object reference not set to an instance of an
object
at System.Web.UI.WebControls.LinqDataSourceView+c__IteratorB.MoveNext ()
[0x000d7] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web.Extensions/System.Web.UI.WebControls/LinqDataSourceView.cs:274
at System.Web.UI.WebControls.GridView.CreateChildControls (IEnumerable
data, Boolean dataBinding) [0x00361] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI.WebControls/GridView.cs:1486
at System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding
(IEnumerable data) [0x00012] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI.WebControls/CompositeDataBoundControl.cs:65
at System.Web.UI.WebControls.GridView.PerformDataBinding (IEnumerable
data) [0x00000] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI.WebControls/GridView.cs:1771
at System.Web.UI.WebControls.DataBoundControl.InternalPerformDataBinding
(IEnumerable data) [0x0001e] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI.WebControls/DataBoundControl.cs:251
at System.Web.UI.WebControls.DataBoundControl.OnSelect (IEnumerable data)
[0x00016] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI.WebControls/DataBoundControl.cs:242
at System.Web.UI.DataSourceView.Select
(System.Web.UI.DataSourceSelectArguments selectArgs,
System.Web.UI.DataSourceViewSelectCallback callBack) [0x00020] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI/DataSourceView.cs:149
at System.Web.UI.WebControls.DataBoundControl.PerformSelect () [0x00029]
in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI.WebControls/DataBoundControl.cs:225
at System.Web.UI.WebControls.BaseDataBoundControl.DataBind () [0x00000] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI.WebControls/BaseDataBoundControl.cs:141
at System.Web.UI.WebControls.GridView.DataBind () [0x00012] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI.WebControls/GridView.cs:1756
at OrgListViewTemplate.container_DataBinding (System.Object sender,
System.EventArgs e) [0x00000] in :0
at System.Web.UI.Control.OnDataBinding (System.EventArgs e) [0x00029] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI/Control.cs:1175
at System.Web.UI.Control.DataBind (Boolean raiseOnDataBinding) [0x0003c]
in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI/Control.cs:2041
at System.Web.UI.Control.DataBind () [0x00000] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI/Control.cs:1470
at System.Web.UI.WebControls.ListView.InsertDataItem (System.Object
dataItem, System.Web.UI.Control container, Boolean dataBinding,
System.Collections.ArrayList keyArray, Int32 startIndex, Int32 position,
System.Int32& displayIndex) [0x000b3] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web.Extensions/System.Web.UI.WebControls/ListView.cs:977
at System.Web.UI.WebControls.ListView.CreateItemsWithoutGroups
(System.Web.UI.WebControls.ListViewPagedDataSource dataSource, Boolean
dataBinding, InsertItemPosition insertPosition, System.Collections.ArrayList
keyArray) [0x00162] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web.Extensions/System.Web.UI.WebControls/ListView.cs:1166
at System.Web.UI.WebControls.ListView.CreateChildControls (IEnumerable
dataSource, Boolean dataBinding) [0x00135] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web.Extensions/System.Web.UI.WebControls/ListView.cs:838
at System.Web.UI.WebControls.ListView.PerformDataBinding (IEnumerable
data) [0x00058] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web.Extensions/System.Web.UI.WebControls/ListView.cs:1900
at System.Web.UI.WebControls.DataBoundControl.InternalPerformDataBinding
(IEnumerable data) [0x0001e] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI.WebControls/DataBoundControl.cs:251
at System.Web.UI.WebControls.DataBoundControl.OnSelect (IEnumerable data)
[0x00016] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI.WebControls/DataBoundControl.cs:242
at System.Web.UI.DataSourceView.Select
(System.Web.UI.DataSourceSelectArguments selectArgs,
System.Web.UI.DataSourceViewSelectCallback callBack) [0x00020] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI/DataSourceView.cs:149
at System.Web.UI.WebControls.DataBoundControl.PerformSelect () [0x00029]
in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI.WebControls/DataBoundControl.cs:225
at System.Web.UI.WebControls.ListView.PerformSelect () [0x00006] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web.Extensions/System.Web.UI.WebControls/ListView.cs:1908
at System.Web.UI.WebControls.BaseDataBoundControl.DataBind () [0x00000] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI.WebControls/BaseDataBoundControl.cs:141
at System.Web.UI.Control.DataBindChildren () [0x0003d] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI/Control.cs:1481
at System.Web.UI.Control.DataBind (Boolean raiseOnDataBinding) [0x00047]
in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI/Control.cs:2042
at System.Web.UI.Control.DataBind () [0x00000] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI/Control.cs:1470
at System.Web.UI.Control.DataBindChildren () [0x0003d] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI/Control.cs:1481
at System.Web.UI.Control.DataBind (Boolean raiseOnDataBinding) [0x00047]
in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI/Control.cs:2042
at System.Web.UI.Control.DataBind () [0x00000] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI/Control.cs:1470
at System.Web.UI.WebControls.ListView.InsertDataItem (System.Object
dataItem, System.Web.UI.Control container, Boolean dataBinding,
System.Collections.ArrayList keyArray, Int32 startIndex, Int32 position,
System.Int32& displayIndex) [0x000b3] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web.Extensions/System.Web.UI.WebControls/ListView.cs:977
at System.Web.UI.WebControls.ListView.CreateItemsWithoutGroups
(System.Web.UI.WebControls.ListViewPagedDataSource dataSource, Boolean
dataBinding, InsertItemPosition insertPosition, System.Collections.ArrayList
keyArray) [0x00162] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web.Extensions/System.Web.UI.WebControls/ListView.cs:1166
at System.Web.UI.WebControls.ListView.CreateChildControls (IEnumerable
dataSource, Boolean dataBinding) [0x00135] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web.Extensions/System.Web.UI.WebControls/ListView.cs:838
at System.Web.UI.WebControls.ListView.PerformDataBinding (IEnumerable
data) [0x00058] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web.Extensions/System.Web.UI.WebControls/ListView.cs:1900
at System.Web.UI.WebControls.DataBoundControl.InternalPerformDataBinding
(IEnumerable data) [0x0001e] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI.WebControls/DataBoundControl.cs:251
at System.Web.UI.WebControls.DataBoundControl.OnSelect (IEnumerable data)
[0x00016] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI.WebControls/DataBoundControl.cs:242
at System.Web.UI.DataSourceView.Select
(System.Web.UI.DataSourceSelectArguments selectArgs,
System.Web.UI.DataSourceViewSelectCallback callBack) [0x00020] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI/DataSourceView.cs:149
at System.Web.UI.WebControls.DataBoundControl.PerformSelect () [0x00029]
in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI.WebControls/DataBoundControl.cs:225
at System.Web.UI.WebControls.ListView.PerformSelect () [0x00006] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web.Extensions/System.Web.UI.WebControls/ListView.cs:1908
at System.Web.UI.WebControls.BaseDataBoundControl.DataBind () [0x00000] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI.WebControls/BaseDataBoundControl.cs:141
at BrowseList.instantiateBrowseTemplate (System.String rootpath, Int32
viewtype) [0x00000] in :0
at
NaturalProductsWebsite.Controls.MainListsControl.RadioButtonList1_SelectedIndexChanged
(System.Object sender, System.EventArgs e) [0x00000] in :0
at System.Web.UI.WebControls.ListControl.OnSelectedIndexChanged
(System.EventArgs e) [0x0001c] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI.WebControls/ListControl.cs:455
at System.Web.UI.WebControls.RadioButtonList.RaisePostDataChangedEvent ()
[0x00035] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI.WebControls/RadioButtonList.cs:261
at
System.Web.UI.WebControls.RadioButtonList.System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent
() [0x00000] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI.WebControls/RadioButtonList.cs:271
at System.Web.UI.Page.RaiseChangedEvents () [0x00025] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI/Page.cs:1639
at System.Web.UI.Page.ProcessRaiseEvents () [0x0002b] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI/Page.cs:1498
at System.Web.UI.Page.InternalProcessRequest () [0x001c5] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI/Page.cs:1443
at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context)
[0x0005b] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI/Page.cs:1269
--- End of inner exception stack trace ---
at System.Web.UI.Page.ProcessException (System.Exception e) [0x00053] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI/Page.cs:1307
at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context)
[0x00089] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web.UI/Page.cs:1281
at System.Web.HttpApplication+c__Iterator6.MoveNext () [0x00d81] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web/HttpApplication.cs:1368
at System.Web.HttpApplication.Tick () [0x00000] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Web/System.Web/HttpApplication.cs:932
--
View this message in context: http://mono.1490590.n4.nabble.com/LinqDataSourceView-NullReferenceException-tp4408593p4408662.html
Sent from the Mono - ASP.NET mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-aspnet-list/attachments/20120221/e4a3dbe0/attachment-0001.html>
More information about the Mono-aspnet-list
mailing list