Closed mavoalice closed 2 months ago
Hi, I can provide some additional information about the issue. The problem is that resource assignment in the XER file contains non-null
value for the property remain_crv
but at the same time it is missing property restart_date
(accessed through assignment.getRemainingEarlyStart()
).
Problem leading to the NPE starts here:
net.sf.mpxj.primavera.PrimaveraReader#processAssignments
TimephasedWorkContainer timephasedRemainingWork = TimephasedHelper.read(effectiveCalendar, assignment.getRemainingEarlyStart(), row.getString("remain_crv"));
I can provide you the file to replicate the issue via email. No problem is encountered when importing the file to P6 and it just ignores the budgeted, actual and remaining units setting them all to 0.
@lnevaril if you could provide a sample file that would be very helpful - thanks!
I've updated MPXJ to handle this, the changes will be in the next release which I'll try to get out today.
When reading a P6 XER file with code below.
var reader = new UniversalProjectReader(); projectFiles = reader.readAll(fileContent);
some of them (we know about 4 now, but I don't have simple XER file that I could provide) fail with exception below on readAll operation:
I assume there is a missing NPE check in ProjectCalendar class on date? As in getException and getWorkWeek the date is checked for null.
Version used: 13.1.0, but fails also on 13.3.0, Java 21