I have a solution which contains a module. In one of my calculations in the referenced module I get the following error:
Exception executing calculation: mbrship_validity_display of table obj_mbrship, error: org.mozilla.javascript.EvaluatorException: The choice of Java constructor js_dateFormat matching JavaScript argument types (null,string) is ambiguous; candidate constructors are:
class java.lang.String js_dateFormat(java.lang.Object,java.lang.String)
class java.util.Date js_dateFormat(java.lang.String,java.lang.String) (/Users/tsr/servoy_workspace/Output/datasources/dca_db/obj_mbrship/obj_mbrship_calculations.js#27)org.mozilla.javascript.EvaluatorException: The choice of Java constructor js_dateFormat matching JavaScript argument types (null,string) is ambiguous; candidate constructors are:
class java.lang.String js_dateFormat(java.lang.Object,java.lang.String)
class java.util.Date js_dateFormat(java.lang.String,java.lang.String) (/Users/tsr/servoy_workspace/Output/datasources/dca_db/obj_mbrship/obj_mbrship_calculations.js#27)
If I’m in the main solution, I don’t get the error, if I’m in the referenced solution (Output) I do get it. However, the calculation executes and returns the correct string in both solutions.
function mbrship_validity_display()
{
return "Gültig von " + plugins.it2be_tools.dateFormat(valid_from, 'dd.MM.yyyy') + " bis " + plugins.it2be_tools.dateFormat(valid_to, 'dd.MM.yyyy');
}
Why do I get the message in the “Problems” tab?
Thanks,
Reto