Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Simon Osborne 108 posts 150 karma points
    Feb 24, 2012 @ 09:24
    Simon Osborne
    0

    NHibernate error on custom Award

    I am getting the following error in relation to a custom Award called FreeProductAward:


    Server Error in '/' Application.

    Cannot instantiate abstract class or interface: UCommerce.EntitiesV2.Award

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: NHibernate.InstantiationException: Cannot instantiate abstract class or interface: UCommerce.EntitiesV2.Award

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


    Stack Trace:

    [InstantiationException: Cannot instantiate abstract class or interface: UCommerce.EntitiesV2.Award]
       NHibernate.Tuple.PocoInstantiator.Instantiate() +288
       NHibernate.Tuple.PocoInstantiator.Instantiate(Object id) +56
       NHibernate.Tuple.Entity.AbstractEntityTuplizer.Instantiate(Object id) +29
       NHibernate.Persister.Entity.AbstractEntityPersister.Instantiate(Object id, EntityMode entityMode) +31
       NHibernate.Impl.SessionImpl.Instantiate(IEntityPersister persister, Object id) +170
       NHibernate.Impl.SessionImpl.Instantiate(String clazz, Object id) +138
       NHibernate.Loader.Loader.InstanceNotYetLoaded(IDataReader dr, Int32 i, ILoadable persister, EntityKey key, LockMode lockMode, String rowIdAlias, EntityKey optionalObjectKey, Object optionalObject, IList hydratedObjects, ISessionImplementor session) +82
       NHibernate.Loader.Loader.GetRow(IDataReader rs, ILoadable[] persisters, EntityKey[] keys, Object optionalObject, EntityKey optionalObjectKey, LockMode[] lockModes, IList hydratedObjects, ISessionImplementor session) +287
       NHibernate.Loader.Loader.GetRowFromResultSet(IDataReader resultSet, ISessionImplementor session, QueryParameters queryParameters, LockMode[] lockModeArray, EntityKey optionalObjectKey, IList hydratedObjects, EntityKey[] keys, Boolean returnProxies) +156
       NHibernate.Impl.MultiQueryImpl.DoList() +1501
    
    [HibernateException: Failed to execute multi query: [select award0_.AwardId as AwardId3_, award0_.CampaignItemId as Campaign2_3_, award0_.Name as Name3_, award0_1_.AmountOffOrderLinesAwardId as AmountOf1_4_, award0_1_.AmountOff as AmountOff4_, award0_2_.AmountOffOrderTotalAwardId as AmountOf1_5_, award0_2_.AmountOff as AmountOff5_, award0_3_.AmountOffUnitAwardId as AmountOf1_6_, award0_3_.AmountOff as AmountOff6_, award0_4_.PercentOffOrderLinesAwardId as PercentO1_7_, award0_4_.PercentOff as PercentOff7_, award0_5_.PercentOffOrderTotalAwardId as PercentO1_8_, award0_5_.PercentOff as PercentOff8_, award0_6_.PercentOffShippingTotalAwardId as PercentO1_9_, award0_6_.PercentOff as PercentOff9_, case when award0_1_.AmountOffOrderLinesAwardId is not null then 1 when award0_2_.AmountOffOrderTotalAwardId is not null then 2 when award0_3_.AmountOffUnitAwardId is not null then 3 when award0_4_.PercentOffOrderLinesAwardId is not null then 4 when award0_5_.PercentOffOrderTotalAwardId is not null then 5 when award0_6_.PercentOffShippingTotalAwardId is not null then 6 when award0_.AwardId is not null then 0 end as clazz_ from uCommerce_Award award0_ left outer join uCommerce_AmountOffOrderLinesAward award0_1_ on award0_.AwardId=award0_1_.AmountOffOrderLinesAwardId left outer join uCommerce_AmountOffOrderTotalAward award0_2_ on award0_.AwardId=award0_2_.AmountOffOrderTotalAwardId left outer join uCommerce_AmountOffUnitAward award0_3_ on award0_.AwardId=award0_3_.AmountOffUnitAwardId left outer join uCommerce_PercentOffOrderLinesAward award0_4_ on award0_.AwardId=award0_4_.PercentOffOrderLinesAwardId left outer join uCommerce_PercentOffOrderTotalAward award0_5_ on award0_.AwardId=award0_5_.PercentOffOrderTotalAwardId left outer join uCommerce_PercentOffShippingTotalAward award0_6_ on award0_.AwardId=award0_6_.PercentOffShippingTotalAwardId where award0_.CampaignItemId=@p0;
    ]]
       NHibernate.Impl.MultiQueryImpl.DoList() +2170
       NHibernate.Impl.MultiQueryImpl.List() +396
       NHibernate.Impl.FutureQueryBatch.GetResultsFrom(IMultiQuery multiApproach) +10
       NHibernate.Impl.FutureBatch`2.GetResults() +95
       NHibernate.Impl.FutureBatch`2.get_Results() +16
       NHibernate.Impl.FutureBatch`2.GetCurrentResult(Int32 currentIndex) +30
       NHibernate.Impl.<>c__DisplayClass4`1.<GetEnumerator>b__3() +53
       NHibernate.Impl.<get_Enumerable>d__0.MoveNext() +73
       System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +7667556
       System.Linq.Enumerable.ToList(IEnumerable`1 source) +61
       UCommerce.EntitiesV2.Queries.Marketing.AllAwardsForCampaignItemQuery.Execute(ISession session) +103
       UCommerce.EntitiesV2.Repository`1.Select(ICannedQuery`1 query) +53
       UCommerce.Marketing.Awards.AwardResolvers.DefaultAwardResolver.GetAwards(CampaignItem campaignItem) +41
       UCommerce.Marketing.Awards.AwardResolvers.AwardAggregator.GetAwards(CampaignItem campaignItem) +99
       UCommerce.Presentation.Presenters.Marketing.EditCampaignItemPresenter.BindView() +258
       UCommerce.Presentation.Presenters.Marketing.EditCampaignItemPresenter.View_Load(Object sender, EventArgs e) +5
       System.EventHandler.Invoke(Object sender, EventArgs e) +0
       System.Web.UI.Control.OnLoad(EventArgs e) +99
       umbraco.BasePages.BasePage.OnLoad(EventArgs e) +49
       UCommerce.Presentation.Web.Umbraco.UmbracoProtectedPage.OnLoad(EventArgs e) +22
       System.Web.UI.Adapters.ControlAdapter.OnLoad(EventArgs e) +15
       System.Web.UI.Control.LoadRecursive() +8696093
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
    



    Version Information: Microsoft .NET Framework Version:2.0.50727.3623; ASP.NET Version:2.0.50727.5053

     

    This was working so I ma confused why I am now getting this error.

    Will the issue be to do with my Award class structure or is it with the Resolver, or Config?

     

    Thanks for your help.

     


  • Simon Osborne 108 posts 150 karma points
    Feb 27, 2012 @ 01:05
    Simon Osborne
    0

    Was a stray row in the ucommerce_Award table that related to my custom award - this was causing the DefaultAwardResolver to fall over.

Please Sign in or register to post replies

Write your reply to:

Draft