Installation and deployment
Version 7.x > Installation and deployment > Object conflict problem while export View modes: 
User avatar
Certified Developer 12
Certified Developer 12
chetan2309-gmail - 8/19/2013 2:48:08 AM
   
Object conflict problem while export
Hi,

We are working in a multiple developer environment. My team developer and I work on sometime functionally similar or different tasks.

We ran into this problem off the late. He created an Document type with two transformations. I took his build and worked on some functionality and added third transformation to it. I sent him the entire build and didn't do the selective export.

Now when he tried to to import my build he ran into problem as import terminated abnormally because of these errors. I know why these are errors are coming. However I need to understand how we can avoid these errors. Going forward how can streamline over build process so that we don't run into these problems specially when anyone of us has modified an already existing Doc type.

Thanks in Anticipation
ERROR: Error importing 'Document types' objects (PM - Home)
Message: [DataConnection.HandleError]: Query: ALTER TABLE pm_Home ALTER COLUMN [OverlayText] nvarchar(30) NULL: caused exception: String or binary data would be truncated.
The statement has been terminated. Stack Trace: at CMS.DataEngine.AbstractDataConnection.HandleError(String queryText, SqlException ex)
at CMS.DataProviderSQL.DataConnection.ExecuteQuery(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction)
at CMS.DataEngine.AbstractDataConnection.CMS.SettingsProvider.IDataConnection.ExecuteQuery(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction)
at CMS.DataEngine.AbstractTableManager.ExecuteQuery(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType)
at CMS.DataEngine.AbstractTableManager.AlterTableColumnWithDefaultValue(String tableName, String columnName, String newColumnName, String newColumnType, Boolean newColumnAllowNull, String newColumnDefaultValue)
at CMS.DataEngine.AbstractTableManager.AlterTableColumn(String tableName, String columnName, String newColumnName, String newColumnType, Boolean newColumnAllowNull, String newColumnDefaultValue)
at CMS.DataEngine.TableManager.UpdateTableBySchema(String tableName, String schema, String excludeColumns, Boolean loadOldXML)
at CMS.CMSImportExport.ImportProvider.UpdateObject(SiteImportSettings settings, GeneralizedInfo infoObj, Boolean siteObject, DataSet ds, TranslationHelper th, Boolean updateChild, Int32 targetSiteId, ProcessObjectEnum process, Dictionary`2 importedParentIDs, List`1 postProcessList, List`1 affectedObjects, BaseInfo parentObject, Boolean postProcessing)
at CMS.CMSImportExport.ImportProvider.ImportObjects(SiteImportSettings settings, DataSet ds, String objectType, Boolean siteObjects, TranslationHelper th, Boolean importChild, ProcessObjectEnum processType, Dictionary`2 importedParentIDs) String or binary data would be truncated.
The statement has been terminated. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
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)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at CMS.DataProviderSQL.DataConnection.ExecuteQuery(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction)

ERROR: Error during import process
Message: [DataConnection.HandleError]: Query: ALTER TABLE pm_Home ALTER COLUMN [OverlayText] nvarchar(30) NULL: caused exception: String or binary data would be truncated.
The statement has been terminated. Stack Trace: at CMS.CMSImportExport.ImportProvider.ImportObjects(SiteImportSettings settings, DataSet ds, String objectType, Boolean siteObjects, TranslationHelper th, Boolean importChild, ProcessObjectEnum processType, Dictionary`2 importedParentIDs)
at CMS.CMSImportExport.ImportProvider.ImportObjectType(SiteImportSettings settings, String objectType, Boolean siteObject, TranslationHelper th, ProcessObjectEnum process, Dictionary`2 importedParentIDs)
at CMS.CMSImportExport.ImportProvider.ImportObjectsData(SiteImportSettings settings) String or binary data would be truncated.
The statement has been terminated. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
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)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at CMS.DataProviderSQL.DataConnection.ExecuteQuery(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction)

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 8/19/2013 7:05:12 AM
   
RE:Object conflict problem while export
A few questions:

1). Are you all on the same network?

2). Do you all have access to the SQL Server database either locally or remotelly?

3). Do you all have access to the source code either locally or remotelly?

4). What method (Portal, ASPX, Combination, MVC) are you using for building your Kentico site(s)?

5). Is there anything special about our website or development environment?

Based on your answers I could shed some light on some items that have worked for me and could help resolve your problems.

User avatar
Certified Developer 12
Certified Developer 12
chetan2309-gmail - 8/19/2013 7:22:55 AM
   
RE:Object conflict problem while export
1). Are you all on the same network?

We can be on same network via VPN. However since we are geographically disperesed we are working locally. It's our first multi-developer Kentico implementation

2). Do you all have access to the SQL Server database either locally or remotelly?
Locally. But either arrangements can be made

3). Do you all have access to the source code either locally or remotelly?
Same Locally. But either arrangements can be made

4). What method (Portal, ASPX, Combination, MVC) are you using for building your Kentico site(s)?

Mostly sticking to Portal. Right now we have tried best to use kentico features and not write any custom code

5). Is there anything special about our website or development environment?
Nothing as usual.

Regards,
Chetan

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 8/19/2013 9:08:54 AM
   
RE:Object conflict problem while export
Sounds easy enough.

My suggestion would be to have one person in charge of publishing the code to the client. Then get a code repository in the cloud like GIT Hub or BitBucket or SourceRepo (list could go on and on). This will allow you to share you code among developers with ease and at a very small monthly expense.

Then have a central location for your Kentico database. If that is on the clients server and you have FTP access to it, great. If it is a SQL Server exposed via URL you provide username/password combinations to, great as well.

I've worked in this type of scenario many times and it works nearly perfect. I say nearly because if one person makes a change to a some UI object and it is dependent on some code behind that was changed and either not checked in or not updated locally by another developer, it could throw an error. Typiclly this is resolved by the developer checking the code in or the developer updating their local copy of the code.