error when using Excel Exporter to export createdDate

0
Hi, I am using Excel Exporter to export data to import to another apps. Everything is fine except for “createdDate” field.  When I try to export createdDate, it show the below error:  >com.mendix.modules.microflowengine.MicroflowException: com.mendix.systemwideinterfaces.MendixRuntimeException: org.joda.time.IllegalFieldValueException: Value 29 for dayOfMonth must be in the range [1,28]     at IngredientsMasterMaintenance.ExportFile (JavaAction : 'GenerateExcelDoc')     at IngredientsMasterMaintenance.ExportIngredients (SubMicroflow : 'ExportFile') When I remove the createdDate field, the error is gone. I am using mendix 8.10.2 . MxModelRefelection 6.0.0, Excel Exporter 6.0.4 Please help me with this problem. Thank for reading.
asked
2 answers
5

- There seems to be a bug in Joda library related to this but it was fixed 4-5 years before. Unfortunately, if the joda library being referred is older then you might face the issue. As Tim suggested, reimporting the latest version of widget might solve the issue.

- check if you are passing the year properly. I think when year is not passed it assigns the year as 1970. Since 1970 is not a leap year, it calculates the max number of days in February 1970 as 28.

- Also in Java's Calendar the months are numbered from 0, but in Joda Time they are numbered from 1. So may be adding 1 to your month might fix the problem.

answered
0

Likely the date Excel Exporter tries to export is 29-th of august, which is perfectly fine. It might also be 29-th of February, which should also be fine, but makes this a different problem. Apparently there is some extra check on the date's dayOfMonth and the error is thrown in java's joda. Since the Excel Exporter is very widely used, it is unlikely that an unmodified version of Excel Exporter would throw this error. First try might be to reimport the Excel Exporter. Second try might be to get closer to the code that throws the error by pressing F6 – Deploy for Eclipse – and  opening your application in Eclipse and inform us what you find there.

answered