Here is my PostgreSQL raw query which is working fine.
select * from employee where to_json(array( select jsonb_array_elements(employeeids) ->> 'id'))::
jsonb?|array['22', '17', '23', '24'] AND empname =?;
but when I run the java code it's excepting me to give two values, but the first? is part of the query, for which I need not supply any value.