I encountered following Error from the umbraco Log:
At /set-konfigurator/ (Referred by: http://testweb.net/set-konfigurator/): NHibernate.PropertyValueException: not-null property references a null or transient value UCommerce.EntitiesV2.OrderProperty.Value bei NHibernate.Engine.Nullability.CheckNullability(Object[] values, IEntityPersister persister, Boolean isUpdate) bei NHibernate.Event.Default.AbstractSaveEventListener.PerformSaveOrReplicate(Object entity, EntityKey key, IEntityPersister persister, Boolean useIdentityColumn, Object anything, IEventSource source, Boolean requiresImmediateIdAccess) bei NHibernate.Event.Default.AbstractSaveEventListener.SaveWithGeneratedId(Object entity, String entityName, Object anything, IEventSource source, Boolean requiresImmediateIdAccess) bei NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.SaveWithGeneratedOrRequestedId(SaveOrUpdateEvent event) bei NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.EntityIsTransient(SaveOrUpdateEvent event) bei NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.OnSaveOrUpdate(SaveOrUpdateEvent event) bei NHibernate.Impl.SessionImpl.FireSaveOrUpdate(SaveOrUpdateEvent event) bei NHibernate.Impl.SessionImpl.SaveOrUpdate(String entityName, Object obj) bei NHibernate.Engine.Cascade.CascadeCollectionElements(Object child, CollectionType collectionType, CascadeStyle style, IType elemType, Object anything, Boolean isCascadeDeleteEnabled) bei NHibernate.Engine.Cascade.CascadeCollection(Object child, CascadeStyle style, Object anything, CollectionType type) bei NHibernate.Engine.Cascade.CascadeOn(IEntityPersister persister, Object parent, Object anything) bei NHibernate.Event.Default.AbstractSaveEventListener.CascadeAfterSave(IEventSource source, IEntityPersister persister, Object entity, Object anything) bei NHibernate.Event.Default.AbstractSaveEventListener.PerformSaveOrReplicate(Object entity, EntityKey key, IEntityPersister persister, Boolean useIdentityColumn, Object anything, IEventSource source, Boolean requiresImmediateIdAccess) bei NHibernate.Event.Default.AbstractSaveEventListener.SaveWithGeneratedId(Object entity, String entityName, Object anything, IEventSource source, Boolean requiresImmediateIdAccess) bei NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.SaveWithGeneratedOrRequestedId(SaveOrUpdateEvent event) bei NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.EntityIsTransient(SaveOrUpdateEvent event) bei NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.OnSaveOrUpdate(SaveOrUpdateEvent event) bei NHibernate.Impl.SessionImpl.FireSaveOrUpdate(SaveOrUpdateEvent event) bei NHibernate.Impl.SessionImpl.SaveOrUpdate(Object obj) bei UCommerce.EntitiesV2.Repository`1.Save(T entity) bei ScoutRetail.Controls.SetConfigurator.btnBuy_OnClick(Object sender, EventArgs e) in Y:\Workspace\Projekte\...\SetConfigurator.ascx.cs:Zeile 1759. bei System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) bei System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
The codeline which triggers the Error is "basket.Save();" where basket is defined with "var basket = SiteContext.Current.OrderContext.GetBasket().PurchaseOrder;"
The Basket pipeline will save the purchase order at the end of it's task set, so there's no need to save it before that. That could also be part of the problem, the pipeline also takes care of some of the validation.
I don't know if this is the case, but applying 'null' to an order property might also cause this error. If you replace the part where you get the value from the session with this:
We have too many complain which customers have done payment but they get error page, so I tried it on our staging webste and faced following error:
Server Error in '/' Application.
not-null property references a null or transient value UCommerce.EntitiesV2.OrderProperty.Value
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.PropertyValueException: not-null property references a null or transient value UCommerce.EntitiesV2.OrderProperty.Value
Source Error:
Line 97: Utilities.SendEmail("[] Error", message, "")
Line 98: 'RedirectFailure()
Do you have the entire marco script code? It's probably the same problem as above where null (Nothing in VB) is applied to the value of an orderproperty.
NHibernate Error when saving basket
Hi,
I encountered following Error from the umbraco Log:
The codeline which triggers the Error is "basket.Save();" where basket is defined with "var basket = SiteContext.Current.OrderContext.GetBasket().PurchaseOrder;"
The whole function looks like this:
As you can see, I use dynamic orderline properties. Maybe there is a problem with one of them? Any other ideas?
Try removing that line :basket,Save();
The Basket pipeline will save the purchase order at the end of it's task set, so there's no need to save it before that. That could also be part of the problem, the pipeline also takes care of some of the validation.
I don't know if this is the case, but applying 'null' to an order property might also cause this error. If you replace the part where you get the value from the session with this:
This will insert an empty string when the value from the session returns null. That might fix your problem too.
Cheers,
Floris
Thank you very much, I will try that.
Hi Christian,
Did you get it sorted?
Hi Søren, unfortunately the error occured only once until now and could not be reproduced. I think I can't properly test until the website goes life.
Be sure to shoot me an e-mail directly if you see this behavior again so we can get it fixed quickly.
I got almost same error:
We have too many complain which customers have done payment but they get error page, so I tried it on our staging webste and faced following error:
Server Error in '/' Application.
not-null property references a null or transient value UCommerce.EntitiesV2.OrderProperty.Value
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.PropertyValueException: not-null property references a null or transient value UCommerce.EntitiesV2.OrderProperty.Value
Source Error:
Source File: C:\inetpub\---\masterpages\6-OrderConfirmation.master.vb Line: 99
Stack Trace:
Do you have the entire marco script code? It's probably the same problem as above where null (Nothing in VB) is applied to the value of an orderproperty.
In VB:
Where the outcome of newValue returns nothing. When that property is saved it throws an exception. Could you check if this is the case?
is working on a reply...