Working with ExtensionMigratorBase - "Export file missing version information"
Hey all, I was trying to tinker with the ExtensionMigratorBase class to see how it all works and how this might be able to help me out. It is easy to code up using the Eclipse extension but I am unable to actually get any code to run.
public class QueueServerMigration extends ExtensionMigratorBase {
private Logger log = LogUtilities.getInstance().getApplicationLogger(QueueServerMigration.class);
public QueueServerMigration() {
super();
log.error("Entered QueueServerMigration.Constructor()");
}
@Override
public void migrate(ImportedEntityCollection imports) throws Exception {
log.error("Entered QueueServerMigration.migrate()");
}
@Override
public void postMigrate(ImportedEntityCollection imports) throws Exception {
super.postMigrate(imports);
log.error("Entered QueueServerMigration.postMigrate()");
}
None of these logs show up for me, nor when I am attached to Tomcat can I hit breakpoints.
I do get an error in the Thingworx Application Log, which I do not understand: "Export file missing version information. No migration will be performed."
The previous log is this "Starting entity import of C:\ThingworxStorage\extensions\temp\DeviceTemplate.QueueServer_a6764a4b-30c2-4f5b-9b93-d04dce45b21b\DeviceTemplate.QueueServer\metadata.xml"
This implies that my metadata.xml file is missing package version information, but it is not: packageVersion="1.0.4"
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Entities>
<ExtensionPackages>
<ExtensionPackage description="QueueServer and related Device Template"
migratorClass="com.devicify.extension.QueueServerMigration"
minimumThingWorxVersion="7.2.3" name="DeviceTemplate.QueueServer"
packageVersion="1.0.4" vendor="Devicify">
<JarResources>
<FileResource description="" file="DeviceTemplate.QueueServer.jar" type="JAR" />
</JarResources>
</ExtensionPackage>
</ExtensionPackages>
</Entities>
The extension imports fine, all is well, it's just the migration code never executes.
Any ideas? There is not exactly a ton of information out there on this, that I can find at least.
