Upgrade 7.0.6 to Gold R8 error

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Upgrade 7.0.6 to Gold R8 error

Post by AbleMods » Tue Feb 17, 2015 6:25 am

We tried upgrading a 7.0.6 install to Gold R8 today and upgrade.aspx kept throwing this error. Any ideas?
Server Error in '/storegold' Application.

null id in CommerceBuilder.Catalog.Webpage entry (don't flush the Session after an exception occurs)

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.AssertionFailure: null id in CommerceBuilder.Catalog.Webpage entry (don't flush the Session after an exception occurs)

Source Error:


Line 95: storeUrlSt.FieldValue = storeUrl;
Line 96: }
Line 97: storeUrlSt.Save();
Line 98:
Line 99: //store.Settings.Save();

Source File: c:\Sites\storegold\Install\Upgrade.aspx.cs Line: 97

Stack Trace:


[AssertionFailure: null id in CommerceBuilder.Catalog.Webpage entry (don't flush the Session after an exception occurs)]
NHibernate.Event.Default.DefaultFlushEntityEventListener.CheckId(Object obj, IEntityPersister persister, Object id, EntityMode entityMode) +267
NHibernate.Event.Default.DefaultFlushEntityEventListener.GetValues(Object entity, EntityEntry entry, EntityMode entityMode, Boolean mightBeDirty, ISessionImplementor session) +95
NHibernate.Event.Default.DefaultFlushEntityEventListener.OnFlushEntity(FlushEntityEvent event) +139
NHibernate.Event.Default.AbstractFlushingEventListener.FlushEntities(FlushEvent event) +448
NHibernate.Event.Default.AbstractFlushingEventListener.FlushEverythingToExecutions(FlushEvent event) +303
NHibernate.Event.Default.DefaultFlushEventListener.OnFlush(FlushEvent event) +161
NHibernate.Impl.SessionImpl.Flush() +501
CommerceBuilder.DomainModel.RepositoryWithTypedId`2.Save(TEntity item) +483

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +76
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +193
System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +35
CommerceBuilder.DomainModel.EntityWithTypedId`1.Save() +605
Install_Upgrade.UpgradeButton_Click(Object sender, EventArgs e) in c:\Sites\trustedtours_com\storegold\Install\Upgrade.aspx.cs:97
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +155
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3554

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Upgrade 7.0.6 to Gold R8 error

Post by AbleMods » Tue Feb 17, 2015 8:06 am

Figured it out. SQL replication is somehow interfering with nHibernate.

Is Able's implementation of nHibernate compatible with SQL replication?
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: Upgrade 7.0.6 to Gold R8 error

Post by Katie » Tue Feb 17, 2015 12:43 pm

SQL replication? I'm not sure what that means. Are you restoring a backup of the AC7 database, or something different?
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Upgrade 7.0.6 to Gold R8 error

Post by AbleMods » Tue Feb 17, 2015 2:32 pm

The full version of SQL Server supports a feature called "replication". SQL replication is used to maintain a real-time copy of a specific database on a separate SQL server. Every transaction committed to the primary 'publisher' is replicated and applied to the copy known as the 'subscriber'.

You can even have multiple subscribers to a single publisher. This would allow you to distribute the live database across multiple secondary database servers elsewhere in your hosting environment.

Having a real-time database replicated to a second database server allows you to offload heavy-workload reporting and queries. That way your big reports don't slow down the production SQL box.

In this client scenario, we are using it for fault tolerance. We have two SQL servers running on the network. The DB1 server is the primary and where all the Able sites store their data. Each DB1 database is configured to replicate every change to a copy of that database found on DB2.

In the event that DB1 goes down, we simply edit the database.config files and point all the sites to DB2. All sites are back up within seconds and the data completely matches the moment DB1 went down. No scrambling to find the last full backup, no searching for transaction log backups, no waiting for a server restore.

SQL replication can even be configured as a two-way street. Any changes to DB2 will automatically be replicated back to DB1 once the DB1 server becomes available again.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: Upgrade 7.0.6 to Gold R8 error

Post by Katie » Tue Feb 17, 2015 3:20 pm

That seems like a really nice feature, especially from a service provider's perspective.

I found this error reported before here - viewtopic.php?f=65&t=17630

It looks like we made some change to the upgrade script, but that was in Gold R7, so you should have had those changes already. I wonder if Gold R9 would work any better.
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Upgrade 7.0.6 to Gold R8 error

Post by AbleMods » Tue Feb 17, 2015 3:48 pm

Yea when it works LOL

I think that post you linked was mostly due to script timeouts for larger databases. Ran into that before, this one is different.

Might be worth a little internal testing if the devs have two SQL boxes available. Only one (the publisher) has to be full SQL Server. Subscriber boxes can be SQL Express.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

Post Reply