Problem when changing Project Start date

Hi,


Aspose Tasks Java 16.11.0, MS Project 2013 & 2016.

When I try to edit the Project Start date of the attached mpp file, I’m getting an exception.

Code used:

Project asProject = new Project(“C:\temp\Problem.mpp”);
asProject.set(Prj.START_DATE, new Date()); // Error here
asProject.save(“c:\temp\ok.mpp”, SaveFileFormat.MPP);
System.out.println(“Done”);

Stacktrace of the error:

Exception in thread “main” class com.aspose.tasks.private.Exceptions.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: value
com.aspose.tasks.private.ah.o.a(Unknown Source)
com.aspose.tasks.private.ah.o.a(Unknown Source)
com.aspose.tasks.private.ah.o.a(Unknown Source)
com.aspose.tasks.Calendar.a(Unknown Source)
com.aspose.tasks.czw.a(Unknown Source)
com.aspose.tasks.czw.a(Unknown Source)
com.aspose.tasks.czw.b(Unknown Source)
com.aspose.tasks.afe.c(Unknown Source)
com.aspose.tasks.zt.b(Unknown Source)
com.aspose.tasks.bff.b(Unknown Source)
com.aspose.tasks.bff.a(Unknown Source)
com.aspose.tasks.bfg.invoke(Unknown Source)
com.aspose.tasks.RescheduleAlgorithm.a(Unknown Source)
com.aspose.tasks.bff.d(Unknown Source)
com.aspose.tasks.bff.a(Unknown Source)
com.aspose.tasks.RescheduleAlgorithm.b(Unknown Source)
com.aspose.tasks.Task.a(Unknown Source)
com.aspose.tasks.xm.b(Unknown Source)
com.aspose.tasks.dcj.a(Unknown Source)
com.aspose.tasks.dcj.a(Unknown Source)
com.aspose.tasks.Task.a(Unknown Source)
com.aspose.tasks.cah.a(Unknown Source)
com.aspose.tasks.cah.a(Unknown Source)
com.aspose.tasks.Project.a(Unknown Source)
com.aspose.tasks.Project.set(Unknown Source)
AsposeSetProjectStartDate.main(AsposeSetProjectStartDate.java:40)
at com.aspose.tasks.private.ah.o.a(Unknown Source)
at com.aspose.tasks.private.ah.o.a(Unknown Source)
at com.aspose.tasks.private.ah.o.a(Unknown Source)
at com.aspose.tasks.Calendar.a(Unknown Source)
at com.aspose.tasks.czw.a(Unknown Source)
at com.aspose.tasks.czw.a(Unknown Source)
at com.aspose.tasks.czw.b(Unknown Source)
at com.aspose.tasks.afe.c(Unknown Source)
at com.aspose.tasks.zt.b(Unknown Source)
at com.aspose.tasks.bff.b(Unknown Source)
at com.aspose.tasks.bff.a(Unknown Source)
at com.aspose.tasks.bfg.invoke(Unknown Source)
at com.aspose.tasks.RescheduleAlgorithm.a(Unknown Source)
at com.aspose.tasks.bff.d(Unknown Source)
at com.aspose.tasks.bff.a(Unknown Source)
at com.aspose.tasks.RescheduleAlgorithm.b(Unknown Source)
at com.aspose.tasks.Task.a(Unknown Source)
at com.aspose.tasks.xm.b(Unknown Source)
at com.aspose.tasks.dcj.a(Unknown Source)
at com.aspose.tasks.dcj.a(Unknown Source)
at com.aspose.tasks.Task.a(Unknown Source)
at com.aspose.tasks.cah.a(Unknown Source)
at com.aspose.tasks.cah.a(Unknown Source)
at com.aspose.tasks.Project.a(Unknown Source)
at com.aspose.tasks.Project.set(Unknown Source)
at AsposeSetProjectStartDate.main(AsposeSetProjectStartDate.java:40)

Is there a problem with the attached mpp file? I can edit the project start date manually in MS Project without problem.

Thanks!

Hi Jay,

We regret the inconvenience caused to you by the issue.

We were able to reproduce the same issue when setting project start date in your attached project. We have logged this issue as TASKSJAVA-286 for further investigation by our product team. We’ll update you once there is any further information or a fix version available in this regard.

Hi Jay,

This is to update you regarding feedback we have received from Product team for the issue logged earlier as TASKSNET-1788. The MPP file shared by you has broken calendars and there exists multiple calendars for a single resource in this file. Due to this reason, the API cannot correctly identify the calendar to use for the resource and uses the broken one by default. Please see attached screenshot for your reference.

Can you please share with us how the source MPP file was created? If it was created with Aspose.Tasks API, please share relevant code for further investigation.

Hi Maria,


Thanks a lot for the information and finding the root cause.

The MPP file was not generated with Aspose, so we’re considering this to be an issue caused by the corrupted MPP file.
We do not expect Aspose to support invalid files - though a more helpful error message would be a nice improvement.
Issue can be closed.

Cheers!

Hi Jay,

Thank you for the feedback. Please feel free to write back to us in case you any further query regarding the API.

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan