SP3 Uppgrading problems

Vote:
 

 

I had to directly try the upgrade SP3 for EPiServer CMS.
Well... my site doesn't work anymore.
Does anyone have any suggestions?

Here is the error message

ClassFactory not initialized
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: EPiServer.BaseLibrary.ClassFactoryException: ClassFactory not initialized

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:

[ClassFactoryException: ClassFactory not initialized]
EPiServer.BaseLibrary.ClassFactory.get_Instance() +126
EPiServer.BaseLibrary.ClassFactory.IsRegistered(Type baseType) +8
EPiServer.CacheManager..cctor() +215

[TypeInitializationException: The type initializer for 'EPiServer.CacheManager' threw an exception.]
EPiServer.DataAbstraction.PermissionData.GetPermissionListFromCache(Permission permission) +65
EPiServer.Core.ExceptionManager.RenderHttpRuntimeError(Exception e) +978
EPiServer.Global.Global_Error(Object sender, EventArgs evt) +773

[TypeInitializationException: The type initializer for 'EPiServer.DataAbstraction.UnifiedPathInfo' threw an exception.]
EPiServer.DataAbstraction.UnifiedPathInfo.Load(String path) +0
EPiServer.FileSystem.DefaultAccessControlList..ctor(String path) +100
EPiServer.Web.Hosting.UnifiedDirectory.get_DirectoryAC() +365
EPiServer.Web.Hosting.UnifiedDirectory.QueryAccess() +42
EPiServer.Web.Hosting.UnifiedDirectory.QueryDistinctAccess(AccessLevel access) +14
EPiServer.Web.Hosting.VirtualPathVersioningProvider.GetDirectory(String virtualPath) +191
EPiServer.Web.Hosting.VirtualPathHandler.InitializeProviders(ProviderSettingsCollection providers) +332
EPiServer.Global.InitializeVirtualPathProviders() +117
EPiServer.Global.StaticInitialization() +62
EPiServer.Global.Global_BeginRequest(Object sender, EventArgs e) +119
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64


Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

 

 

#23087
Aug 26, 2008 23:08
Vote:
 

 

Here is the row that gives me trouble.

EPiServer.DataFactory.Instance.SavingPage += new EPiServer.PageEventHandler(Util.EditorFilter2.FilterPage2);

In this case FilterPage2 doesn't do anything.

 

#23098
Aug 27, 2008 7:44
Vote:
 

Hi Marcus,

With SP3 there was some remodelling in how a EPiServer handles the initialization of the application. This was because we were fixing some bugs with enterprise installations and also a step towards making EPiServer working on IIS7 (We're not there yet but in the upcoming R2 release we'll have support for IIS7).

These changes however made it so that it's not possible to hook into the datafactory events in Application_Start. Instead we first hook into Application_FirstBeginRequest and then we have a instance of the DataFactory to work with. Something like this:

protected void Application_Start(Object sender, EventArgs e)     
{
EPiServer.Global.Application_FirstBeginRequest += new EventHandler(Global_Application_FirstBeginRequest);
}
void Global_Application_FirstBeginRequest(object sender, EventArgs e)     
{
EPiServer.DataFactory.Instance.SavingPage += new PageEventHandler(Instance_SavingPage);
}
void Instance_SavingPage(object sender, PageEventArgs e)     
{
//Insert magic here.
}
#23108
Edited, Aug 27, 2008 10:37
Vote:
 

Thank you! It works fine now.

#23109
Aug 27, 2008 10:41
Vote:
 

Got a similar problem after upgrading and have no clue how to fix it:

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: EPiServer.BaseLibrary.ClassFactoryException: ClassFactory not initialized

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:

[ClassFactoryException: ClassFactory not initialized]
   EPiServer.BaseLibrary.ClassFactory.get_Instance() +75
   EPiServer.BaseLibrary.ClassFactory.IsRegistered(Type baseType) +11
   EPiServer.CacheManager..cctor() +230

[TypeInitializationException: The type initializer for 'EPiServer.CacheManager' threw an exception.]
   EPiServer.StaticCacheKey.EnsureKey() +22
   EPiServer.StaticCacheKey..ctor(String keyName) +15
   EPiServer.DataFactoryCache..cctor() +29

[TypeInitializationException: The type initializer for 'EPiServer.DataFactoryCache' threw an exception.]
   EPiServer.DataFactoryCache.Initialize(PageStoreBase df) +0
   EPiServer.DataFactory..ctor() +26
   EPiServer.DataFactory.get_Instance() +45
   EPiServer.Blog.BlogFactory.get_PageStoreBase() +14
   EPiServer.Blog.EventHandlers.Init(HttpApplication context) +90
   System.Web.HttpApplication.InitModulesCommon() +65
   System.Web.HttpApplication.InitModules() +43
   System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +729
   System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +298
   System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +107
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +289

 

 

#23110
Edited, Aug 27, 2008 10:46
Vote:
 

Got the site working again. Had to remove <add name="BlogEventHandlers" type="EPiServer.Blog.EventHandlers, EPiServer.Blog" /> from web.config and now the Blogg stopped working correctly. Guess the demo package has to be updated to reflect that changes described above.

/Oskar

#23112
Edited, Aug 27, 2008 11:03
Vote:
 

Hello everyone,

We've now researched this abit more indepth and discovered that both these issues (Marcus aswell as Oskars) should have worked in SP3.

There shouldn't have been necesary to change anything in global.asax.cs or in the demo package for this to work.

The problem is that we made a mistake when the code was written. We've found the error in our code and corrected it. We're building a new version of SP3 as I'm typing this that will fix it. It will be available as soon as possible. 

#23117
Aug 27, 2008 14:07
Vote:
 
#23118
Aug 27, 2008 14:11
Vote:
 
The new build of SP3; 5.1.422.267 made it work like before for me.  Now I am happy again.   Its available from the EPiServer Manager.
#23151
Aug 28, 2008 14:35
Vote:
 

Yes, as Marcus mentions, there is now a new build of EPiServer SP3 available via EPiServer Manager. The version is now 5.1.422.267. We recommend everyone that has version 5.1.422.266 installed to upgrade to the new version.

If you now install a new SP3 site you'll always get version 5.1.422.267.

#23156
Aug 28, 2008 16:25
Vote:
 

How come EPiServer doesn't provide more information about the upgrade and installation?

I would like to know the manual steps for upgrade SP2 to SP3.

#23157
Aug 28, 2008 20:36
Vote:
 

This can be fixed with a custom http module doing this:

public void Init(HttpApplication context) 
{
EPiServer.Web.InitializationModule.Initialize(EPiServer.Configuration.EPiServerSection.Instance, EPiServer.Configuration.Settings.Instance);
if (!EPiServer.BaseLibrary.ClassFactory.IsRegistered(typeof(EPiServer.Diagnostics.ITransformer)))
{
EPiServer.BaseLibrary.ClassFactory.RegisterClass(typeof(EPiServer.Diagnostics.ITransformer), typeof(EPiServer.Diagnostics.DefaultTransformer));
}
}

See this post:
http://www.kulov.net/blogs/martin/2009/01/typeinitializationexception-in.html

#27279
Edited, Jan 23, 2009 2:48
Vote:
 
Thanks! This helped us a lot. We were running version 5.1.422.266 and just couldn't get the blog templates to work. Now they do. Laughing
#27549
Feb 02, 2009 16:32
Vote:
 

I cannot find the Application_FirstBeginRequest event in EPiServer.Global.

Does anyone know where it is located?

#31161
Jul 06, 2009 16:21
Vote:
 
I can't find the event to hook on to either. Any ideas? Erik, did you find it?

I'm running version 5.2.375.133 of EPiServer.
#31669
Aug 06, 2009 9:29
Vote:
 

This atleast works in EPiServer 5.2.375.133, I am not sure about other versions.

The event Global_Application_FirstBeginRequest is not located in EPiServer.Global but EPiServer.Web.InitializationModule

 

So the handler should not be registered like this
EPiServer.Global.Application_FirstBeginRequest += new EventHandler(Global_Application_FirstBeginRequest);

But rather like this
EPiServer.Web.InitializationModule.FirstBeginRequest += new EventHandler(Global_Application_FirstBeginRequest);

 

 

#31674
Aug 06, 2009 11:51
Vote:
 

Hei, 

I am getting the same error when upgrading the site from CMS 5 SP3 to CMS R2 SP2. 

Any suggestions ?

#79623
Dec 23, 2013 12:37
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.