Exception while recalculating the XML project

Thanks for the code @kashif.iqbal . But something went wrong during ‘project.recalculate()’

Exception in thread "main" class com.aspose.tasks.private.Exceptions.ArgumentException: remainingWork
com.aspose.tasks.xp.h(Unknown Source)
com.aspose.tasks.fy.a(Unknown Source)
com.aspose.tasks.fy.a(Unknown Source)
com.aspose.tasks.ResourceAssignment.a(Unknown Source)
com.aspose.tasks.cgi.b(Unknown Source)
com.aspose.tasks.cgi.d(Unknown Source)
com.aspose.tasks.cgc.c(Unknown Source)
com.aspose.tasks.cct.b(Unknown Source)
com.aspose.tasks.cct.a(Unknown Source)
com.aspose.tasks.Project.recalculate(Unknown Source)
com.aspose.tasks.Project.recalculate(Unknown Source)
me.harisree.aspose.utils.AsposeTest.main(AsposeTest.java:96)
	at com.aspose.tasks.xp.h(Unknown Source)
	at com.aspose.tasks.fy.a(Unknown Source)
	at com.aspose.tasks.fy.a(Unknown Source)
	at com.aspose.tasks.ResourceAssignment.a(Unknown Source)
	at com.aspose.tasks.cgi.b(Unknown Source)
	at com.aspose.tasks.cgi.d(Unknown Source)
	at com.aspose.tasks.cgc.c(Unknown Source)
	at com.aspose.tasks.cct.b(Unknown Source)
	at com.aspose.tasks.cct.a(Unknown Source)
	at com.aspose.tasks.Project.recalculate(Unknown Source)
	at com.aspose.tasks.Project.recalculate(Unknown Source)
	at me.harisree.aspose.utils.AsposeTest.main(AsposeTest.java:96)

Code fragment:

		ResourceAssignment ra = project.getResourceAssignments().getByUid(17);
		System.out.println(ra.toString());
		ra.set(Asn.ACTUAL_WORK, project.getDuration(1, TimeUnitType.Day));

		project.recalculate();
		project.save(HOME_DIRECTORY+"Project1_2007_out.mpp", SaveFileFormat.MPP);
		
		System.out.println("Done");

Any hope …? :thinking:

@sreeharibs95,

We are unable to reproduce this issue using our sample files. Could you please share your source MPP file for our testing here?

123.xml.zip (5.5 KB)

  1. Open the xml Project
  2. Do a recalculate
  3. save it as xml itself

Got the same Error as given in the post (above)

Please check;

@sreeharibs95,

Thank you for sharing the sample file. This issue is reproduced and logged under Id:TASKSJAVA-505 for further investigation by us. We will write back here as soon as analysis is done and feedback is ready to share.