Cannot pass null value to JsonSpinNode prop method

Hi, in a script activity written in Groovy language i have:

SpinJsonNode node = JSON(“{}”);
node.prop(“property_name”, null);

It’s very strange because in the doc org.camunda.spin.json Class SpinJsonNode is present the method isNull() to check if the node represents a null value.

It fails with the following error in logs:

Cannot resolve which method to invoke for [class java.lang.String, null] due to overlapping prototypes between:
[class java.lang.String, interface java.util.List]
[class java.lang.String, interface java.util.Map]

I use Camunda-bpm-tomcat-7.13.0 and Modeler 4.6.0

Exist a solution to this problem?

Thanks in advance

Similar issues already reported: Cannot set a json property with null value in camunda spin

https://jira.camunda.com/browse/CAM-4999

Looks like existing bug.

1 Like