Community Tip - You can change your system assigned username to something more personal in your community settings. X
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 !
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
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).
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?
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?
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 !
You want to overwrite the entities that were created using your own extension?
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
Can't agree more on that
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!
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
So I need to remove those entities?
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.
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.