Skip to main content
16-Pearl
October 6, 2023
Solved

Extension Import Error for Distributed Subscription

  • October 6, 2023
  • 2 replies
  • 3042 views

I'm developing an application using ThingWorx 9.4.0.  I used the "Package" feature of my Project entity to create a .zip file.  When trying to import into my package as an Extension into our Test/QA platform, I'm getting the following error (redacted bits in <>).

Application Log:

 

 

Extension Exception: Error parsing /files/ThingworxStorage/extensions/temp/<ProjectName>-1.1.0_<GUID>/<ProjectName>-1.1.0/Entities/ThingShapes/Entities.xml: (88, 37): cvc-complex-type.3.2.2: Attribute 'aspect.isDistributed' is not allowed to appear in element 'Subscription'.

 

 

 

Our Test platform is a HA cluster implementation, so it doesn't make any sense why the project is failing with the error "isDistributed is not allowed".  I verified that it wasn't a problem with this single project by creating a separate test project with a simple subscription and trying to import it to my Test system.  I got the same error.

Is this a bug in the platform or is there possibly some system configuration we missed?

 

 

Best answer by VladimirRosu_116627

The warning is generated by the lack of the haCompatible attribute that should be added in the metadata.xml at the ExtensionPackage node level. Set it to true. If the Package functionality is not doing this, then it would need to be fixed, but in the meantime you can add it manually.

Now, regarding the failure of the extension import process for the first time, there should be something in the ApplicationLog. Try to reset the application log filter to make sure you get the latest entries, as I've observed that this sometimes happens on my end as well (I switch to the ApplicatioLog tab but that has old data, so I need to reset the filters ).

(Not sure why clicking the second time gives out that error).

2 replies

19-Tanzanite
October 10, 2023

I've just created in 9.4.1 a project with a ThingShape, added a ThingShape to it that contained a Subscription. I verified it contained the attribute you mentioned, but it was imported correctly.

Two questions:

1. Can you install quickly a 9.4.1 and check this behavior?

2. (Curiosity) I have a single node system, non-HA, and I don't see the "Distributable". When you create a Subscription in a ThingShape I assume you can enable "distributable", right?

16-Pearl
October 10, 2023

Thanks for the reply.

I will look into trying 9.4.1.  

About the single node system, I've noticed that single node systems do not show the "Distributed" checkbox for subscriptions while cluster systems do.  We originally had our Development platform set up as a single node.  After getting the "isDistributed" error, I tried modifying our Development system to run as a cluster and re-exporting my app to see if that would resolve the issue.  It did not.  

Now that I'm writing this out, I wonder if it's something to do with the Composer checkbox being "Distributed" while the attribute in the xml is "isDistributed"?

Ascherer17_0-1696965115787.png

 

19-Tanzanite
October 23, 2023

Sorry for the long delay.

Thanks for confirming the non-HA behavior, it makes sense.

There's no relationship between the attribute name "aspect.isDistributed" and the Composer label (as it will anyway display the text depending on your ThingWorx user locale).

Did you manage to try this in 9.4.1 (or maybe identified the culprit anyway)?

13-Aquamarine
November 30, 2023

How did you resolve error for single node system ? Error -- Attribute 'aspect.isDistributed' is not allowed to appear in element 'Subscription'.

16-Pearl
November 30, 2023

I believe updating to Thingworx 9.4.1 fixed this problem however my workaround was this:

1. Extract the .zip package.

2. Open in Notepad the entities xml with the affected subscription (ZipFolder/Entities/ThingShapes/Entities.xml in my case).

3. Find the affected Subscription and delete the aspect.isDistributed="false"  line (see image). Save the file.

4. Zip the folder back up and import as extension.

Ascherer17_0-1701357828639.png

 

As @VladimirRosu_116627 stated, "The warning is generated by the lack of the haCompatible attribute that should be added in the metadata.xml at the ExtensionPackage node level."  I have not tried adding this attribute to the metadata xml, but that may be worth a shot also.