Date Posted:
Product: TIBCO Spotfire®
Product: TIBCO Spotfire®
Problem:
How to handle dependencies among custom extensions in Spotfire
Solution:
TIBCO Spotfire Server loads all packages in alphabetical order. The packages may be renamed to prevent complications due to this behavior.
Extensions are generally loaded according to the internal dependencies, as long as they are contained in the same package. When packages have inter-dependencies on other packages and the project is deployed on the Spotfire server, all packages will be loaded in alphabetical order. If the packages are not named in a way to facilitate this, an error will occur.
Error message:
Application Setup Error.
Spotfire.Dxp.Internal.Utilities.ApplicationSetupException: Failed to initialize extension. --->
System.ArgumentException: The baseTypeId 'Company.Framework.ExtensionName'
specified by the factory does not correspond to a registered visual.
Example Scenario:
Assume there are three packages named Beta, Theta and Omega.
Package Omega - No dependencies.
Package Theta - Dependencies on Omega.
Package Beta - Dependencies on Omega and Theta.
Workaround:
We know that all packages are loaded in alphabetical order A to Z, therefore we must add a prefix to each package name to make them load in the correct order.
We start with the packages that have no dependencies.
Level 1 - no dependencies:
Package Omega is renamed to 'a-Omega'.
Level 2 - depending on level 1:
Package Theta is renamed 'b-Theta'.
Level 3 - depending on level 1 and 2:
Package Beta is renamed 'c-Beta'.
Final package list:
a-Omega
b-Theta
c-Beta
Note:
This issue does not affect running the project directly from the Package Builder's 'Run Configuration' option. We only need to define the packages in dependency order in the configuration list. Spotfire will load them using the same order (top-to-bottom). The issue also does not affect running the project directly from Visual Studio in debug mode. Spotfire will use the correct dependency order as specified in Visual Studio.
https://docs.tibco.com/pub/sfire_dev/area/doc/html/GUID-42D787B1-E0E4-4A42-9229-96FB9CFB0EC5.html
Comments
0 comments
Article is closed for comments.