Copied to clipboard

Flag this post as spam?

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


  • Zakhar 171 posts 397 karma points
    May 19, 2014 @ 12:13
    Zakhar
    0

    Upgrade from 6.1.6 to 6.2 fails

    Hi guys, I'm trying to upgrade to 6.2 from 6.1.6, I copied the files and merged the config files. Going through the upgrade wizard and get this error:

     The database configuration failed with the following message: Cannot insert the value NULL into column 'id', table 'ClientCentre.Umbraco.dbo.umbracoLog'; column does not allow nulls. INSERT fails. The statement has been terminated. Please check log file for additional information (can be found in '/App_Data/Logs/UmbracoTraceLog.txt')
    

    Looks like it tries to insert NULL to PK field on the Log table, I'd happy to skip this, but it doesn't offer such option, Only 'Back' button. The log file isn't very helpful.

    Any suggestions?

    Thank you.

    P.S. I tried to update the table and allow NULL on id column, got this error in the same upgrade wizard

    The database configuration failed with the following message: Object cannot be cast from DBNull to other types. Please check log file for additional information (can be found in '/App_Data/Logs/UmbracoTraceLog.txt')
    
  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    May 19, 2014 @ 12:53
    Jan Skovgaard
    0

    Hi Zakhar

    Do you see anything marked with "ERROR" in the log file?

    What database are you using? And is this happening locally or an a server?

    /Jan

  • Zakhar 171 posts 397 karma points
    May 19, 2014 @ 13:09
    Zakhar
    0

    Hi Jan,

    It happens on my local dev machine, Windows 8.1 and SQL Server 2012. I can't see any ERRORs in log, here it is:

    2014-05-19 12:04:17,660 [30] INFO  Umbraco.Core.ApplicationContext - [Thread 9] CurrentVersion different from configStatus: '6.2.0','6.1.6'
    2014-05-19 12:04:17,660 [30] INFO  Umbraco.Web.UI.Install.InstallerRestService - [Thread 9] Running 'Install' service
    2014-05-19 12:04:17,666 [30] INFO  Umbraco.Core.DatabaseContext - [Thread 9] Database configuration status: Started
    2014-05-19 12:04:17,859 [30] INFO  Umbraco.Core.DatabaseContext - [Thread 9] Database requires upgrade
    2014-05-19 12:04:17,865 [30] INFO  Umbraco.Core.ApplicationContext - [Thread 16] CurrentVersion different from configStatus: '6.2.0','6.1.6'
    2014-05-19 12:04:17,865 [30] INFO  Umbraco.Web.UI.Install.InstallerRestService - [Thread 16] Running 'Upgrade' service
    2014-05-19 12:04:17,868 [30] INFO  Umbraco.Core.DatabaseContext - [Thread 16] Database upgrade started
    2014-05-19 12:04:17,876 [30] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [Thread 16] Initializing database migrations
    2014-05-19 12:04:17,880 [30] INFO  Umbraco.Core.PluginManager - [Thread 16] Starting resolution types of Umbraco.Core.Persistence.Migrations.IMigration
    2014-05-19 12:04:17,888 [30] INFO  Umbraco.Core.PluginManager - [Thread 16] Completed resolution of types of Umbraco.Core.Persistence.Migrations.IMigration, found 20 (took 7ms)
    2014-05-19 12:04:17,904 [30] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [Thread 16] Added UPGRADE migration 'AssignMissingPrimaryForMySqlKeys' to context
    2014-05-19 12:04:17,905 [30] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [Thread 16] Added UPGRADE migration 'AssignMissingPrimaryForMySqlKeys2' to context
    2014-05-19 12:04:17,916 [30] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [Thread 16] Added UPGRADE migration 'AdditionalIndexesAndKeys' to context
    2014-05-19 12:04:17,919 [30] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [Thread 16] Added UPGRADE migration 'ChangePasswordColumn' to context
    2014-05-19 12:04:17,920 [30] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [Thread 16] Added UPGRADE migration 'AddChangeDocumentTypePermission' to context
    2014-05-19 12:04:17,920 [30] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [Thread 16] Added UPGRADE migration 'UpdateToNewMemberPropertyAliases' to context
    2014-05-19 12:04:17,930 [30] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [Thread 16] Executing sql statement 1: ALTER TABLE [umbracoUser] ALTER COLUMN [userPassword] NVARCHAR(500) NOT NULL
    2014-05-19 12:04:18,027 [30] INFO  Umbraco.Web.Strategies.Migrations.ClearMediaXmlCacheForDeletedItemsAfterUpgrade - [Thread 16] Cleared 0 items from the media xml cache that were trashed and not meant to be there
    2014-05-19 12:04:18,049 [30] INFO  Umbraco.Core.PluginManager - [Thread 16] Starting resolution types of Umbraco.Core.Persistence.Mappers.BaseMapper
    2014-05-19 12:04:18,058 [30] INFO  Umbraco.Core.PluginManager - [Thread 16] Completed resolution of types of Umbraco.Core.Persistence.Mappers.BaseMapper, found 20 (took 8ms)
    2014-05-19 12:04:19,592 [30] INFO  Umbraco.Core.PluginManager - [Thread 16] Starting resolution types of umbraco.interfaces.IDataType
    2014-05-19 12:04:19,619 [30] INFO  Umbraco.Core.PluginManager - [Thread 16] Completed resolution of types of umbraco.interfaces.IDataType, found 37 (took 26ms)
    2014-05-19 12:04:19,628 [30] INFO  Umbraco.Core.PluginManager - [Thread 16] Starting resolution types of umbraco.interfaces.ITree
    2014-05-19 12:04:19,679 [30] INFO  Umbraco.Core.PluginManager - [Thread 16] Completed resolution of types of umbraco.interfaces.ITree, found 38 (took 50ms)
    2014-05-19 12:04:20,336 [30] INFO  Umbraco.Core.Persistence.UmbracoDatabase - [Thread 16]    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
       at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
       at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
       at System.Data.SqlClient.SqlDataReader.get_MetaData()
       at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteScalar()
       at StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteScalar()
       at Umbraco.Core.Persistence.PetaPocoCommandExtensions.<>c__DisplayClassa.<ExecuteScalarWithRetry>b__9()
       at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)
       at Umbraco.Core.Persistence.Database.Insert(String tableName, String primaryKeyName, Boolean autoIncrement, Object poco)
    2014-05-19 12:04:20,337 [30] INFO  Umbraco.Core.DatabaseContext - [Thread 16] Database configuration failed with the following error and stack trace: Cannot insert the value NULL into column 'id', table 'ClientCentre.Umbraco.dbo.umbracoLog'; column does not allow nulls. INSERT fails.
    The statement has been terminated.
       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
       at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
       at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
       at System.Data.SqlClient.SqlDataReader.get_MetaData()
       at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteScalar()
       at StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteScalar()
       at Umbraco.Core.Persistence.PetaPocoCommandExtensions.<>c__DisplayClassa.<ExecuteScalarWithRetry>b__9()
       at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)
       at Umbraco.Core.Persistence.Database.Insert(String tableName, String primaryKeyName, Boolean autoIncrement, Object poco)
       at Umbraco.Core.Persistence.Database.Insert(Object poco)
       at Umbraco.Core.Auditing.DataAuditWriteProvider.WriteEntry(Int32 objectId, Int32 userId, DateTime date, String header, String comment)
       at Umbraco.Core.Auditing.AuditTrail.AddEntry(AuditTypes type, String comment, Int32 userId, Int32 objectId)
       at Umbraco.Core.Auditing.Audit.Add(AuditTypes type, String comment, Int32 userId, Int32 objectId)
       at Umbraco.Core.Services.MediaService.RebuildXmlStructures(Int32[] contentTypeIds)
       at Umbraco.Core.Events.TypedEventHandler`2.Invoke(TSender sender, TEventArgs e)
       at Umbraco.Core.Persistence.Migrations.MigrationRunner.Execute(Database database, DatabaseProviders databaseProvider, Boolean isUpgrade)
       at Umbraco.Core.DatabaseContext.UpgradeSchemaAndData()
    2014-05-19 12:04:20,342 [30] INFO  Umbraco.Core.DatabaseContext - [Thread 16] The database schema validation produced the following summary: 
    The following tables were found in the database, but are not in the current schema:
    

    I've got some additional tables in the database added by installed packages and myself.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    May 19, 2014 @ 13:22
    Jan Skovgaard
    0

    Hi Zakhar

    Ok, so the ClientCentre.Umbraco.dbo.umb is one you created or is one created from a package?...

    Perhaps that could be the issue.

    Is there any chance you could spend some time trying to install a fresh version of 6.1.6 and see if it gives you the same trouble upgrading to 6.2.0?

    I'm not sure but I have a suspicion that it may be caused by the naming of the table that is not related to umbraco having the .Umbraco. naming convention?

    /Jan

  • Zakhar 171 posts 397 karma points
    May 19, 2014 @ 13:40
    Zakhar
    0

    Hi Jan,

    There is no dbo.umb table, it's probably dbo.umbracoLog you mean? None of additional tables have Umbraco in their names. The database was called ClientCentre.Umbraco, I renamed it to ClientCentre but get the same error.

    I can try fresh install and upgrade.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    May 19, 2014 @ 13:43
    Jan Skovgaard
    0

    Ah ok...I'm probably misunderstanding something then.

    It's just that in the log it says

    2014-05-19 12:04:20,337 [30] INFO Umbraco.Core.DatabaseContext - [Thread 16] Database configuration failed with the following error and stack trace: Cannot insert the value NULL into column 'id', table 'ClientCentre.Umbraco.dbo.umbracoLog'; column does not allow nulls. INSERT fails. The statement has been terminated. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

    Looking forward to learn how your fresh install/upgrade goes.

    /Jan

  • Zakhar 171 posts 397 karma points
    May 19, 2014 @ 14:14
    Zakhar
    0

    Yeah, there is no 'dbo.umb' in the log:)

    Anyway, I tried fresh install and upgrade, it went well, empty installation upgraded without issues.

    I've done some customisation like adding some content and examine events handling on start up, hijacking routes and installed a couple of packages, but don't see why it should break with such a silly error as not being able to insert a record to the log table:(

    I guess I'll have to stick with 6.1.6 then:(

  • Zakhar 171 posts 397 karma points
    May 19, 2014 @ 15:54
    Zakhar
    0

    Hi Jan,

    Is there a way to run DB upgrade scripts manually?

    Cheers

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    May 19, 2014 @ 16:19
    Jan Skovgaard
    0

    Hi Zakhar

    Databases are not something that I'm reaaally good at...so unfortunately I don't know if there is or if it can be easily done. Don't know the inner workings. Sorry.

    /Jan

  • Zakhar 171 posts 397 karma points
    May 20, 2014 @ 20:41
    Zakhar
    0

    Ok, I've commented out some of my code on startup and cleaned the db, the Upgrade went fine after that and I have 6.2 now.

    I have strange problems with my Surface controllers though, the post action gives me the YSOD:

    Could not find a Surface controller route in the RouteTable for controller name Member
    
    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: System.InvalidOperationException: Could not find a Surface controller route in the RouteTable for controller name Member
    
    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: 
    
    
    [InvalidOperationException: Could not find a Surface controller route in the RouteTable for controller name Member]
       Umbraco.Web.Mvc.RenderRouteHandler.HandlePostedValues(RequestContext requestContext, PostedDataProxyInfo postedInfo) +654
       System.Web.Routing.UrlRoutingModule.PostResolveRequestCache(HttpContextBase context) +12394771
       Umbraco.Web.UmbracoModule.ProcessRequest(HttpContextBase httpContext) +578
       System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +165
    

    Here is my Surface controller:

    public class MemberController : Umbraco.Web.Mvc.SurfaceController {...}
    

    The method I'm trying to call:

    [HttpPost]
    [ValidateAntiForgeryToken]
    public ActionResult HandleLogin(MemberLoginModel model)
    { ... }
    

    And the form declaration:

    @using (Html.BeginUmbracoForm<MemberController>("HandleLogin", null, new { @class = "form-horizontal" }))
    { ... } 
    

    Everything worked perfectly fine in 6.1.6, was something changed in 6.2?

    Thanks, Zakhar

  • Roy VanderPloeg 1 post 21 karma points
    Oct 28, 2014 @ 20:35
    Roy VanderPloeg
    0

     

    I have found the same error when Upgrading from 6.1.6 to 6.2.4.

     

    I recieve the following for any Surface Controllers I have.

    Could not find the surface controller of type Umbraco.Web.UI.ContactFormSurfaceController

    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: System.InvalidOperationException: Could not find the surface controller of type Umbraco.Web.UI.ContactFormSurfaceController

    Source Error: 

    Line 573:            if (surfaceController == null)
    Line 574:                throw new InvalidOperationException("Could not find the surface controller of type " + surfaceType.FullName);
    Line 575: var metaData = PluginController.GetMetadata(surfaceController); Line 576:            if (metaData.AreaName.IsNullOrWhiteSpace() == false)
    Line 577:            {


    Source File: c:\Sites\Umbraco-CMS-release-6.2.4\src\Umbraco.Web\HtmlHelperRenderExtensions.cs    Line: 575 

    Stack Trace: 

    [InvalidOperationException: Could not find the surface controller of type Umbraco.Web.UI.ContactFormSurfaceController]
       Umbraco.Web.HtmlHelperRenderExtensions.BeginUmbracoForm(HtmlHelper html, String action, Type surfaceType, Object additionalRouteVals, IDictionary`2 htmlAttributes, FormMethod method) in c:\Sites\Umbraco-CMS-release-6.2.4\src\Umbraco.Web\HtmlHelperRenderExtensions.cs:575
       Umbraco.Web.HtmlHelperRenderExtensions.BeginUmbracoForm(HtmlHelper html, String action, Type surfaceType, Object additionalRouteVals, IDictionary`2 htmlAttributes) in c:\Sites\Umbraco-CMS-release-6.2.4\src\Umbraco.Web\HtmlHelperRenderExtensions.cs:597
       Umbraco.Web.HtmlHelperRenderExtensions.BeginUmbracoForm(HtmlHelper html, String action, Type surfaceType, Object additionalRouteVals, Object htmlAttributes) in c:\Sites\Umbraco-CMS-release-6.2.4\src\Umbraco.Web\HtmlHelperRenderExtensions.cs:512
       Umbraco.Web.HtmlHelperRenderExtensions.BeginUmbracoForm(HtmlHelper html, String action, Object additionalRouteVals, Object htmlAttributes) in c:\Sites\Umbraco-CMS-release-6.2.4\src\Umbraco.Web\HtmlHelperRenderExtensions.cs:548
       ASP._Page_Views_ContactFormSurface_ContactForm_cshtml.Execute() in c:\Sites\Umbraco-CMS-release-6.2.4\src\Umbraco.Web.UI\Views\ContactFormSurface\ContactForm.cshtml:113
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +280
       System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +125
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +196
       Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer) in c:\Sites\Umbraco-CMS-release-6.2.4\src\Umbraco.Core\Profiling\ProfilingView.cs:24
       System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData) +158
       ASP.<>c__DisplayClass10.<Execute>b__f() in c:\Sites\Umbraco-CMS-release-6.2.4\src\Umbraco.Web.UI\Views\ContactArrow.cshtml:34
       System.Web.WebPages.<>c__DisplayClassb.<RenderSection>b__9(TextWriter tw) +289
       System.Web.WebPages.WebPageBase.Write(HelperResult result) +89
       ASP._Page_Views_Master_cshtml.Execute() in c:\Sites\Umbraco-CMS-release-6.2.4\src\Umbraco.Web.UI\Views\Master.cshtml:138
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +280
       System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +125
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +196
       System.Web.WebPages.WebPageBase.Write(HelperResult result) +89
       System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action`1 body) +233
       System.Web.WebPages.WebPageBase.PopContext() +287
       Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer) in c:\Sites\Umbraco-CMS-release-6.2.4\src\Umbraco.Core\Profiling\ProfilingView.cs:24
       System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +378
       System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +33
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +800336
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +800336
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +263
       System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +787692
       System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +28
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
       System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +65
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
       System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +51
       System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +42
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
       System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +51
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +606
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +288

    Does anyone have any Idea as to why this is happening?

     

    Thanks,

    Roy

Please Sign in or register to post replies

Write your reply to:

Draft