cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Extension Import Error for Distributed Subscription

Ascherer17
14-Alexandrite

Extension Import Error for Distributed Subscription

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?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

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).

View solution in original post

7 REPLIES 7

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?

Ascherer17
14-Alexandrite
(To:VladimirRosu)

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

 

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)?

Ascherer17
14-Alexandrite
(To:VladimirRosu)

The story appears to get stranger.

 

I created a "Test" project including only a Timer with a subscription to its own "Timer" event; I checked both the "Enabled" and "Distributed" boxes.  I packaged the project as an extension.  This was on a HA cluster with Thingworx 9.4.0.

 

I went to import this project extension (.zip file) into my Thingworx 9.4.1 instance.  It Validated fine, besides the usual "this is not a HA extension" warning (by the way, is there a way to define packaged projects as HA extensions?).  Trying to import the extension fails!  On the first try there was no error in the Application log.  Trying to click import a second time gave me this error in the Application log:

An unexpected server error occurred: no zip in java.library.path: [/app/tomcat/webapps/Thingworx/WEB-INF/extensions]

 

After refreshing the browser, I checked the "Installed Extension Packages" and my extension shows up in the list.  Attempting to import the extension again provides a confirmation that the import was skipped because it's already installed.

 

So its not giving me the "isDistributed" error, but the system is still acting a bit erroneous.  

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).

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

Ascherer17
14-Alexandrite
(To:SwapnilP)

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 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.


Top Tags