It's all about the answers!

Ask a question

Using AbstractMigrationHandler for Component Migration Fails

Senthil Mani (122) | asked Jul 08 '10, 3:23 a.m.
We currently have component model and the corresponding repository with data in Jazz I am trying to migrate this data to Jazz 2 repository. I have written a specific migration handler which extends AbstractMigrationHandler and just overrides the preSave() method as follows.
public IItem preSave(IItem item, boolean isCurrent, IUnknownProperties unknownProperties) throws TeamRepositoryException {
// links are public
System.out.println("Setting context id to public");
return item;

Also in the plugin.xml - i have this proper extension point definition.

The component Id to which the model is attached is "com.example.model" and i have the MyMigrationHandler to do the migration.

However, when i try run the repotools -import, there are errors in the log as follows:
Required property must not be null: contextId

Look like the MyMigrationHandler.preSave never gets executed.
Can someone help me here?

Be the first one to answer this question!

Register or to post your answer.