Closed coemgenuslcp closed 2 years ago
I could reproduce the error.
It is caused by the GraalVM Javascript implementation used in PML.
The root error is:
java.util.MissingResourceException: Could not find the bundle com/ibm/icu/impl/data/icudt70b/supplementalData
I checked the relevant jar file and saw a file named supplementalData.res
, but there is no file named supplementalData
. So it seems to be a bug in the Javascript implementation. I couldn't find a workaround for this. Hope the bug will be solved in a future version.
Anyway, in the next PML version (that includes 'embedded scripting') there will be a dedicated timeUtils
object with functions like currentLocalDate()
that will return a string in the ISO8601 format YYYY-MM-DD
. So you will be able to write:
context.write ( timeUtils.currentLocalDate() );
UPDATE:
I made a few more tests. The error is not caused by new Date()
. It is caused by the implicit conversion to string when context.write()
is called.
Hence, you could use a workaround like this:
const date = new Date();
const year = date.getFullYear();
const month = date.getMonth() + 1; // 0-based
const day = date.getDate();
const dateAsString = `${year}-${month}-${day}`;
context.write ( dateAsString );
I've closed the issue because it is not related to PML.
The following user-defined node
yields the following error in PML 2.2.0 2021-12-14.
errors.log