cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

compare & allign doesn't work

Rakeshkonjengba
Contributor

Hello ,

 

I am trying to perform compare & align using the java api, even after dispatching and commiting I don't see the changes in my other repsository where I am moving the new contents.

I am getting the below error:

 

Error 0x80020003 when closing target root for a MegaCompareTool alignment.

MEGA Error 0x80020003

       at com.mega.modeling.api.jni.MegaRootJNI.Close(Native Method)

       at com.mega.modeling.api.jni.MegaRootProxy.close(Unknown Source)

       at com.mytest.TestCompareAndAlign2.main(TestCompareAndAlign2.java:58)

 

When omitting the close line,

The alignment is not persisted when using SQL Server.

The alignment is persisted when using file db.

 

Using: MEGA HOPEX V1R2, SQL Server

 

Sample:

//open transaction and source database.....

MegaCollection siteColl = sourceRoot.getCollection(Site.ID);

MegaObject m = siteColl.create("Test Object: " +Util.getDateString("hh:mm:ss"));

siteColl.release();

MegaCollection alignColl = sourceRoot.getSelection("");

alignColl.insert(m);

m.release();

MegaCompareTool compTool = new MegaCompareTool(sourceRoot, target);

compTool.compareObjects(alignColl);

compTool.align();

alignColl.release();

MegaRoot rootSource = compTool.getRootSource();

rootSource.megaCommit();

rootSource.close();

rootSource.release();

compTool.close();

//commit transaction

 

Could anymore suggest on how to perform compare & align uysing the java API?

 

many thanks in advance!

 

Regards,

Rakesh

 

0 Replies