Skip to main content

H!  has any of you encountered this problem before? 


The funny thing is that is says problems that the fields are not unique but actually they are before we created a build from visual studio.  MSBuild complains between three fields.  2 fields conflicts with the "column names in each table must be unique" issue and 1 field with the "root element is missing" issue.


Appreciate you thoughts on this.


Monica 


 


 17/02/2009 19:42:53:  ===============       Deploy smartobjects and associations: Task completed    ===============


Done building target "Deploy SmartObjects and Associations" in project "StaffSuggestionSystem.msbuild" -- FAILED.


Done building project "StaffSuggestionSystem.msbuild" -- FAILED.


Build FAILED.
C:DeploymentStaffSuggestionSystem.msbuild(166,5): error : Deploy smartobjects: Task error: SmartObjectServer Exception: Could not publish SmartObjectDefinition to server: SmartObjectServer Exception: Column names in each table must be unique. Column name 'PersonNo' in table 'dbo.PProfile' is specified more than once.


C:DeploymentStaffSuggestionSystem.msbuild(166,5): error : . SmartObject: 'PProfile'
C:DeploymentStaffSuggestionSystem.msbuild(166,5): error :
    0 Warning(s)
    1 Error(s)


 In the K2 server console, this is what happens :


 Error   10521 SmartObject Runtime.Management General Error: 'SmartObjectServer Exception: Column names in each table must be unique. Column name 'PersonNo' in table 'dbo.PProfile' is specified more than once.'


Error   10521 SmartObject Runtime.Management General Error: 'Could not publish SmartObjectDefinition to server: SmartObjectServer Exception: Column names in each table must be unique. Column name 'PersonNo' in table 'dbo.PProfile' is specified more than once.. SmartObject: 'PProfile''


Error   2025 Error Marshalling SourceCode.SmartObjects.Runtime.SmartObjectManagementServer.PublishSmartObjects, Could not publish SmartObjectDefinition to server: SmartObjectServer Exception: Column names in each table must be unique. Column name 'PersonNo' in table 'dbo.PProfile' is specified more than once.. SmartObject: 'PProfile'Error  


2025 Error Marshalling SourceCode.SmartObjects.Runtime.SmartObjectManagementServer.PublishSmartObjects, Could not publish SmartObjectDefinition to server: SmartObjectServer Exception: Column names in each table must be unique. Column name 'PersonNo' in table 'dbo.PProfile' is specified more than once.. SmartObject: 'PProfile'


Error   8060 ProcessPacket Error, Could not publish SmartObjectDefinition to server: SmartObjectServer Exception: Column names in each table must be unique. Column name 'PersonNo' in table 'dbo.PProfile' is specified more than once.. SmartObject: 'PProfile'

Hi Ramesh


If you deploy a SmartObject with three field but do not populate the SmartObject and re deploy again with remove one of the fields, you will see in the table of the Smartbox db that the field gets removed. This completely changes when you already have data in the SmartObject. With the same scenario explained above but only difference is that you have live data in the SmartObject, you will be allowed to remove the the third field and deploy. The problem is that when you open your table in SQL, the field will not be removed from the table. So when you want to deploy again and re-add the field with the same name you wont be able to do so because of the field that was not removed previously from the table.


 This was logged to add some validation on the fields if a SmartObject was already deployed to avoid situations like this.


Thanks,


 


Reply