Question

Photo of John Spenler

0

crash when accessing a financial functions

InvalidOperationException in EntityFramework

Message

The cast to value type 'System.Int32' failed because the materialized value is null. Either the result type's generic parameter or the query must use a nullable type.


Stack Trace


   at System.Data.Entity.Core.Common.Internal.Materialization.Shaper.ErrorHandlingValueReader`1.GetValue(DbDataReader reader, Int32 ordinal)

   at System.Data.Entity.Core.Common.Internal.Materialization.Shaper.GetColumnValueWithErrorHandling[TColumn](Int32 ordinal)

   at lambda_method(Closure , Shaper )

   at System.Data.Entity.Core.Common.Internal.Materialization.Coordinator`1.ReadNextElement(Shaper shaper)

   at System.Data.Entity.Core.Common.Internal.Materialization.Shaper`1.SimpleEnumerator.MoveNext()

   at System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()

   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)

   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)

   at Rock.Web.UI.Controls.Grid.SetLinqDataSource[T](IQueryable`1 qry)

   at RockWeb.Blocks.Finance.TransactionList.BindGrid(Boolean isExporting)

   at RockWeb.Blocks.Finance.TransactionList.OnLoad(EventArgs e)

   at System.Web.UI.Control.LoadRecursive()

   at System.Web.UI.Control.LoadRecursive()

   at System.Web.UI.Control.LoadRecursive()

   at System.Web.UI.Control.LoadRecursive()

   at System.Web.UI.Control.LoadRecursive()

   at System.Web.UI.Control.LoadRecursive()

   at System.Web.UI.Control.LoadRecursive()

   at System.Web.UI.Control.LoadRecursive()

   at System.Web.UI.Control.LoadRecursive()

   at System.Web.UI.Control.LoadRecursive()

   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

  • Michael Garrison

    John, can you add more details about what page you were using, what you clicked, etc, when you got this message? What version of Rock do you currently have installed (12.4, 13.3, etc?)

  • Photo of John Spenler

    0

    i determined the problem was created from using the finance import plug-in -- as no payment type was set on each transaction