Skip to main content

Hi all,


while trying to deploy a deploy package to the production environment (we're using msbuild utility), we get the error "Root element is missing" and the deploy process fails. The same package deploys correctly on the other environments (development, test, UAT).


We also created a test package containing a very simple smartobject (1 field/smartbox only) without any dependency and tried again obtaining the same result (package deploy runs correctly in test and UAT, fails in production).


We checked configuration of the UAT K2 Blackpearl engine against the production one and they seem identical. Our version of K2 Blackpearl seems to be 4.8210.2.0  4.8210.3.0.


 


Has any of you already fighted (and possibly won) with the "Root element is missing" error?


 


Thanks so much!
Fede


 


This is the deploy script:


C:WindowsMicrosoft.NETFrameworkv2.0.50727MSBuild ".DeployTesterDeploymentDeployTester.msbuild /p:Environment=Production"


This is the output of the deploy script:


Microsoft (R) Build Engine Version 2.0.50727.3053


9Microsoft .NET Framework, Version 2.0.50727.3074]


Copyright (C) Microsoft Corporation 2005. All rights reserved.


 


Build started 14/10/2009 10.37.14.


__________________________________________________


Project "C:K2ProcessDeployPackageDeployTesterDeploymentDeployTester.msbuild" (default targets):


 


Target Deploy SmartObjects and Associations:


__________________________________________________


Project "C:K2ProcessDeployPackageDeployTesterDeploymentDeployTester.msbuild" is building "C:K2ProcessDeployPackageDeployTesterDeploymentDeployTester.msbuild" (InitDeploy target(s)):


 


   


14/10/2009 10.37.14:  ===============      Deploy smartobjects and associations: Task started     ===============


   


14/10/2009 10.37.14:  Creating connection on K2ENGINE.XYZ.IT : 5555 ...


14/10/2009 10.37.14:  Connected


 


C:K2ProcessDeployPackageDeployTesterDeploymentDeployTester.msbuild(86,5): error : Deploy smartobjects: Task error: SmartObjectServer Exception: Could not publish SmartObjectDefinition to server: Root element is missing.


C:K2ProcessDeployPackageDeployTesterDeploymentDeployTester.msbuild(86,5): error : . SmartObject: 'DeployTester'


C:K2ProcessDeployPackageDeployTesterDeploymentDeployTester.msbuild(86,5): error :


   


14/10/2009 10.37.17:  ===============      Deploy smartobjects and associations: Task completed   ===============


   


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


 


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


 


Build FAILED.


C:K2ProcessDeployPackageDeployTesterDeploymentDeployTester.msbuild(86,5): error : Deploy smartobjects: Task error: SmartObjectServer Exception: Could not publish SmartObjectDefinition to server: Root element is missing.


C:K2ProcessDeployPackageDeployTesterDeploymentDeployTester.msbuild(86,5): error : . SmartObject: 'DeployTester'


C:K2ProcessDeployPackageDeployTesterDeploymentDeployTester.msbuild(86,5): error :


    0 Warning(s)


    1 Error(s)


 


Time Elapsed 00:00:02.24

What version of SQL are you running? This can occur if the SQL compatibility mode on the smartbox db is set to SQL Server 2000. If you are running SQL Server 2005, you can try running the following query to change it back to 2005: EXEC sp_dbcmptlevel SmartBox, 90;


Was this SmartObject previously deployed to the server?


vernon


Thanks for your quick reply.


K2 engine runs on a Windows Server 2008 (.Net Framework 3.5 SP1); we use a MS SQL Server 2008. I've checked that the compatibility level of both UAT and production Smartbox DB is set to SQL Server 2008 (100) 😞


The K2 Blackpearl version is 4.8210.3.0 (the one listed in my above post was wrong...)


Unluckily this is the very first time we try to deploy a smart object or a workflow process in the production environment.


fede


Please refer to the following post: http://www.k2underground.com/forums/p/9680/28843.aspx#28843 Hopefully this will help, if not can you enable logging on the K2 Server and post the errors if any appear? To enable the logging, the following link provides a basic how to enable logging: http://www.k2underground.com/blogs/johnny/archive/2007/10/06/how-do-i-use-logging-in-k2-blackpearl.aspx In the HostServerLogging.config file, change the following: key="IncludeStackTrace" value="False" /> change False to True. Try to deploy again. And scan through the log and post the errors.


Vernon


I read some days ago the post you've suggested but unfortunately it doesn't fit our needs: our SmartBox DB is clean, this would be the first SmartObject deployment...


I've attached the K2 Host Server log saved during deployment, the error messages seem the same reported by the deployment script.


Thanks for your support :)


 


Fede


This is a shot in the dark but ensure the user used to run the deployment package has db_owner rights on the smartbox db? And just ensure the Field Name="SmartObject Server"in the package is set to the correct server and working.


vernon


After verifying accurately the DB rights, we finally implemented a simple workflow process to test a workflow deployment; in that case we obtained the error:


“SmartObjectServer Exception: Could not publish SmartObjectDefinition to server: Error refreshing ServiceInstance 'WorkflowReportingService'. Service returned : 'Workflow Reporting SO Service: The partner transaction manager has disabled its support for remote/network transactions.”


Surfing the web we found out that the error could be caused by a misconfiguration of the Microsoft Distributed Transaction Coordinator (http://tinyurl.com/yf2svp2 ). It was our case and we finally could be able to deploy with success. :)


Reply