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')
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.
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?
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.
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.
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:(
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.
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)
{ ... }
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: {
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:
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
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
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:
I've got some additional tables in the database added by installed packages and myself.
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
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.
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
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:(
Hi Jan,
Is there a way to run DB upgrade scripts manually?
Cheers
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
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:
Here is my Surface controller:
The method I'm trying to call:
And the form declaration:
Everything worked perfectly fine in 6.1.6, was something changed in 6.2?
Thanks, Zakhar
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:
Does anyone have any Idea as to why this is happening?
Thanks,
Roy
is working on a reply...