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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Replace files of an extension directly in ThingworxStorage

emadar
5-Regular Member

Replace files of an extension directly in ThingworxStorage

Hello everyone,

Let's say I have an extension that I manually imported in Thingworx.

Now I want to update this specific extension by changing it from ThingworxStorage.

I saw that the changes were indead in thingworx after the restart of tomcat so my question is:

Is it a good way of doing this? Will I have any problem by using this method to update my extensions?

Thank you !

13 REPLIES 13
supandey
19-Tanzanite
(To:emadar)

Elie, the appropriate way would be to uninstall the existing extension and then import the new version of the extension. Is this an extension from the Marketplace?

Note while removing the extension you will have to ensure that there are no depending entities on that extension else the uninstall will fail.

For uninstalling the Extension navigate to Manage under Extensions

and this should take you to the page where you'll see all the installed extensions, just select the one you want to remove and click delete

emadar
5-Regular Member
(To:supandey)

Hi and thanks for your answer. The whole point of me using directly the ThingworxStorage is to create a script that change and replace all of my extensions.

As far as I can see when I replace my extension directly, the jar is indead appearing correctly, but I have a file called metadata.xml that contains all of my mashups that even though it is updated doesnt seem to appear on thingworx after tomcat Restart.

So it may be possible I'll need to do as you said, or maybe do you have a solution for that? (Or for automatically import extensions into thingworx).

supandey
19-Tanzanite
(To:emadar)

How are you addressing the entries in the DB table when you attempt to automate the removal of extension and import them automatically? Because i have seen DB entries for the extensions that are installed on the ThingWorx server, are you also removing them when you uninstall using your script?

emadar
5-Regular Member
(To:supandey)

This is exactly what I want to know I think.

If I remove the directory database, TWX removes everything (every mashup and everything, and it doesn't use the files from ThingWorxStorage which is actually normal behavior I think).

Actually the .jar files of my extensions have been updated, but the Mashup/things of my metadata.xml didn't got updated. I want to find a way for thingworx to refresh and reimporting the metadata.xml.

Any ideas?

emadar
5-Regular Member
(To:emadar)

Another question that could fix this problem is: From an extension, can I replace the entities that have been added just by adding the entities themselves? (then i could just import the metadata.xml).

Thanks !

supandey
19-Tanzanite
(To:emadar)

You want to overwrite the entities that were created using your own extension?

emadar
5-Regular Member
(To:supandey)

Yes, that is what I wanted to do, but changed my mind and I'm gonna use the rest API to do delete and import request, I believe it's gonna be more simple

supandey
19-Tanzanite
(To:emadar)

Can't agree more on that

emadar
5-Regular Member
(To:supandey)

I have an error trying to delete an extension in twx, it writes :

Extension Package deletion failed: Unable to Invoke Service DeleteExtensionPackage on PlatformSubsystem : Cannot delete ExtensionPackage [My extension] because the following Extension Entities are still in use.


No matter if I restart tomcat, or anything... Thanks for the help!

supandey
19-Tanzanite
(To:emadar)

Did you confirm if there are no more entities depending on your Extension? Restarting will not help in this case if there still are entities existing on the server which were created using your extension

emadar
5-Regular Member
(To:supandey)

So I need to remove those entities?

supandey
19-Tanzanite
(To:emadar)

Yes, you'll have to absolutely make sure to remove those entities created using the extension which you are trying to remove/delete from ThingWorx.

supandey
19-Tanzanite
(To:emadar)

This is exactly what I want to know I think.

If I remove the directory database, TWX removes everything (every mashup and everything, and it doesn't use the files from ThingWorxStorage which is actually normal behavior I think).

Which Database are you running together with ThingWorx? And yes this is normal behaviour because esp- when you are running embedded persistence provider all the database data is stored there so removing that folder will lead to the behaviour you are seeing. I don't think, may be someone else here knows otherwise, there's any OOTB feature which you can invoke to check for the update.

Top Tags