Cannot invoke "java.util.Map.size()" because "<parameter1>" is null

hi!
i am trying to map my output through mysql connector in camunda desktop it gives this error Cannot invoke “java.util.Map.size()” because “” is null
even though it was working a few days back


my database has a table named counter with a single integer column named tally

this is my process

Hi @star !

It’s because of the Result expression. It can’t be tally, but you can use tally in the Result variable field, as you did.

Try removing the Result expression, and let me know if it worked well :slight_smile:

Jonathan

Hi
Yes it is working without the result expression.

And how will to get the output from the database as a process variable?
as in it shows this

{“resultSet”:[{“tally”:2}]}

but i just want the value 2 in the process variable

Hey
the process is working without the expression.

Thankyou

In your example, you created a Result Variable called tally. So this variable contains the json you posted. You can now manipulate your variable, for instance:

tally.resultSet[1].tally would evaluate to 2.

You can have a look at the SQL Connector output format, and Result Expression documentation as well.

Thank you,
Jonathan

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.