Error when upgrading Commerce site to 7.5 via deployment center

Vote:
 

Hi Guys,

I'm getting the following error when running "Upgrade to EPiServer Commerce 7.5.394.2", have you seen this before? Can you provide any advice?

The site is currently 7.0.243.0 which was upgraded from 1 R2 SP2.

Thanks

Mark

Upgrading Commerce Manager database schema
Executing sql script
C:\Program Files (x86)\EPiServer\CMS\7.5.394.2\Install\Modules\EPiServer Commer
ce 7.5.394.2\Install\Database\SQL\ecf_upgrade.sql
Executing sql script
C:\Program Files (x86)\EPiServer\CMS\7.5.394.2\Install\Modules\EPiServer Commer
ce 7.5.394.2\ECF\Data\SqlScripts\Update\ecf_db_CatalogSystem_update.sql
An error has occured and the transaction will be rolled back
The was an error during the rollback phase. Your system may be left in an unstable condition
Cannot create a file when that file already exists.

System.IO.IOException: Cannot create a file when that file already exists.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.InternalMove(String sourceDirName, String destDirName, Boolean checkHost)
at EPiServer.Install.FileSystem.Installers.RemoveDirectoryInstaller.Rollback(IDictionary savedState)
at EPiServer.Install.InstallationManager.RollbackBulkInstall()
Cannot create a file when that file already exists.

Rolledback
String or binary data would be truncated.
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
The statement has been terminated.

#145689
Mar 10, 2016 6:41
Vote:
 

Hi,

It looks like you had a timeout exception when running ecf_db_CatalogSystem_update.sql

I would suggest you to run that script directly against your database to see what caused the timeout.

But remember to back up your database first.

Regards,

/Q

#145693
Mar 10, 2016 8:52
Vote:
 

Thanks Quan,

I ran it directly on my DB and received the following error

Msg 8152, Level 16, State 2, Procedure UpdateDuplicateEntries, Line 13210
String or binary data would be truncated.

I'm just ignoring this as the rest of the script completes without error.  I've hacked the ps1 and just commented out the line which includes this stored proc to execute.  There were a few more small errors but I was able to easily overcome them and the powershell scrtip completes without further error.  So looks like the upgrade from Deployment Center worked...

I'm just updating references in my project and fixing build errors etc...  So hopefully I'm nearly there.

Thanks for you help.

Mark

#145826
Mar 14, 2016 5:24
Vote:
 

I've managed to get the site to build now however I'm getting the following exception on startup, any ideas?

I've double checked the dlls, binding redirects, restarted IIS, cleared out temp .net files etc..

[NullReferenceException: Object reference not set to an instance of an object.]
   Mediachase.Commerce.Catalog.CatalogConnection.get_AppDatabase() +84
   Mediachase.Commerce.Catalog.CatalogContext.get_MetaDataContext() +177
   Mediachase.Commerce.Catalog.CatalogContext..cctor() +305

[TypeInitializationException: The type initializer for 'Mediachase.Commerce.Catalog.CatalogContext' threw an exception.]
   Mediachase.Commerce.Catalog.CatalogContext.get_Current() +0
   StructureMap.Pipeline.LambdaInstance`1.build(Type pluginType, BuildSession session) +44

[StructureMapException: StructureMap Exception Code:  207
Internal exception while creating Instance '693b5189-8ee7-425b-87f8-4a76c82cd931' of PluginType Mediachase.Commerce.Catalog.ICatalogSystem, Mediachase.Commerce, Version=7.5.394.2, Culture=neutral, PublicKeyToken=6e58b501b34abce3.  Check the inner exception for more details.]
   StructureMap.Pipeline.LambdaInstance`1.build(Type pluginType, BuildSession session) +185
   StructureMap.Pipeline.Instance.createRawObject(Type pluginType, BuildSession session) +61
   StructureMap.Pipeline.Instance.Build(Type pluginType, BuildSession session) +49
   StructureMap.Pipeline.ObjectBuilder.Resolve(Type pluginType, Instance instance, BuildSession session) +142
   StructureMap.BuildSession.CreateInstance(Type pluginType, Instance instance) +68
   StructureMap.Pipeline.Instance.createRawObject(Type pluginType, BuildSession session) +61
   StructureMap.Pipeline.Instance.Build(Type pluginType, BuildSession session) +49
   StructureMap.Pipeline.ConstructorInstance.Get(String propertyName, BuildSession session) +90
   lambda_method(Closure , IArguments ) +57
   StructureMap.Construction.<>c__DisplayClass2.<CreateBuilder>b__0(IArguments args) +27
   StructureMap.Pipeline.ConstructorInstance.Build(Type pluginType, BuildSession session, IInstanceBuilder builder) +276
   StructureMap.Pipeline.Instance.createRawObject(Type pluginType, BuildSession session) +61
   StructureMap.Pipeline.Instance.Build(Type pluginType, BuildSession session) +49
   StructureMap.Pipeline.ObjectBuilder.Resolve(Type pluginType, Instance instance, BuildSession session) +142
   StructureMap.BuildSession.CreateInstance(Type pluginType, Instance instance) +68
   EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key) +55

[ActivationException: Activation error occurred while trying to get instance of type PriceServiceDatabase, key ""]
   EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key) +156
   EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance() +62
   Mediachase.Commerce.Initialization.CommerceInitialization.Initialize(InitializationEngine context) +105
   EPiServer.Framework.Initialization.ModuleNode.Execute(Action a, String key) +56
   EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +645
   EPiServer.Framework.Initialization.InitializationEngine.Initialize(HostType hostType) +161
   EPiServer.Framework.Initialization.InitializationModule.Initialize(HostType hostType) +394
   EPiServer.Framework.Initialization.InitializationModule.Init(HttpApplication context) +101
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +618
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +402
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +343

[HttpException (0x80004005): Activation error occurred while trying to get instance of type PriceServiceDatabase, key ""]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +579
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +112
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +712
#146513
Mar 17, 2016 4:22
Vote:
 

Hi,

Make sure you have a connection string named EcfSqlConnection points to your commerce database in connectionStrings.config.

/Q

#146517
Mar 17, 2016 8:49
Vote:
 

Ok I've changed that, it was named "EPiServerDB", I've still got an exception, just slightly different..

[NullReferenceException: Object reference not set to an instance of an object.]
   Mediachase.Commerce.Initialization.CommerceChangeQueueFactory..ctor() +92
   lambda_method(Closure , IArguments ) +71
   StructureMap.Construction.<>c__DisplayClass2.<CreateBuilder>b__0(IArguments args) +26
   StructureMap.Pipeline.ConstructorInstance.Build(Type pluginType, BuildSession session, IInstanceBuilder builder) +100

[StructureMapException: StructureMap Exception Code:  207
Internal exception while creating Instance '0b895f57-b0f5-45ce-9773-b6d564e54042' of PluginType EPiServer.Events.ChangeNotification.EventQueue.IChangeNotificationQueueFactory.  Check the inner exception for more details.]
   StructureMap.Pipeline.ConstructorInstance.Build(Type pluginType, BuildSession session, IInstanceBuilder builder) +540
   StructureMap.Pipeline.SmartInstance`1.build(Type pluginType, BuildSession session) +53
   StructureMap.Pipeline.Instance.createRawObject(Type pluginType, BuildSession session) +61
   StructureMap.Pipeline.Instance.Build(Type pluginType, BuildSession session) +49
   StructureMap.Pipeline.ObjectBuilder.Resolve(Type pluginType, Instance instance, BuildSession session) +142
   StructureMap.BuildSession.CreateInstance(Type pluginType, Instance instance) +68
   StructureMap.Pipeline.Instance.createRawObject(Type pluginType, BuildSession session) +61
   StructureMap.Pipeline.Instance.Build(Type pluginType, BuildSession session) +49
   StructureMap.Pipeline.ConstructorInstance.Get(String propertyName, BuildSession session) +90
   lambda_method(Closure , IArguments ) +57
   StructureMap.Construction.<>c__DisplayClass2.<CreateBuilder>b__0(IArguments args) +27
   StructureMap.Pipeline.ConstructorInstance.Build(Type pluginType, BuildSession session, IInstanceBuilder builder) +276
   StructureMap.Pipeline.SmartInstance`1.build(Type pluginType, BuildSession session) +53
   StructureMap.Pipeline.Instance.createRawObject(Type pluginType, BuildSession session) +61
   StructureMap.Pipeline.Instance.Build(Type pluginType, BuildSession session) +49
   StructureMap.Pipeline.ObjectBuilder.Resolve(Type pluginType, Instance instance, BuildSession session) +142
   StructureMap.BuildSession.CreateInstance(Type pluginType, Instance instance) +68
   EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key) +55

[ActivationException: Activation error occurred while trying to get instance of type IChangeNotificationManager, key ""]
   EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key) +156
   EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance() +62
   Mediachase.Commerce.Initialization.CommerceInitialization.Initialize(InitializationEngine context) +46
   EPiServer.Framework.Initialization.ModuleNode.Execute(Action a, String key) +56
   EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +645
   EPiServer.Framework.Initialization.InitializationEngine.Initialize(HostType hostType) +161
   EPiServer.Framework.Initialization.InitializationModule.Initialize(HostType hostType) +394
   EPiServer.Framework.Initialization.InitializationModule.Init(HttpApplication context) +101
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +618
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +402
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +343

[HttpException (0x80004005): Activation error occurred while trying to get instance of type IChangeNotificationManager, key ""]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +579
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +112
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +712
#146648
Mar 21, 2016 2:52
Vote:
 

Hi,

No, there should be both connectionstrings: EPiServerDB is for CMS database while EcfSqlConnection is for Commerce database.

/Q

#146649
Mar 21, 2016 6:45
Vote:
 

Ok thats corrected, both connection strings are now present, but another new exception.

[InvalidOperationException: Default Geolocation provider not found]
   EPiServer.Personalization.Geolocation.get_Provider() +100
   EPiServer.Personalization.VisitorGroups.Criteria.GeographicLocationCriterion..ctor() +13

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +138
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +105
   System.Activator.CreateInstance(Type type) +12
   EPiServer.Personalization.VisitorGroups.VisitorGroupRole.CreateCriterion(VisitorGroupCriterion visitorGroupCriterion) +238
   EPiServer.Personalization.VisitorGroups.VisitorGroupRole.Initialize(String name, NameValueCollection config) +723
   EPiServer.Security.VirtualRoleRepository`1.RegisterInstance(String name, T instance, Boolean replicateChanges) +39
   EPiServer.Personalization.VisitorGroups.VisitorGroupInitialization.InitializeStoredVisitorGroups(IServiceLocator locator) +250

[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) +128
   System.Delegate.DynamicInvokeImpl(Object[] args) +153
   EPiServer.Framework.Initialization.InitializationEngine.OnInitComplete() +253
   EPiServer.Framework.Initialization.InitializationEngine.Initialize(HostType hostType) +182
   EPiServer.Framework.Initialization.InitializationModule.Initialize(HostType hostType) +394
   EPiServer.Framework.Initialization.InitializationModule.Init(HttpApplication context) +101
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +618
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +402
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +343

[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +579
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +112
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +712
#146650
Mar 21, 2016 7:18
Vote:
 

The geolocation provider has incorrect confiuration in episerverframework.config file.  Make sure databaseFileName exists or add the section.

<geolocation defaultProvider="maxmind">
    <providers>
      <add name="maxmind" type="EPiServer.Personalization.Providers.MaxMind.GeolocationProvider, EPiServer.ApplicationModules" databaseFileName="App_Data\GeoLiteCity.dat" />
    </providers>
  </geolocation>
#146868
Mar 29, 2016 13:45
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.