The SQL statements are as follows, with the parameters in Oracle executing normally, and the error in the Java program Java.sql.SQLSyntaxErrorException ORA-00907: Missing closing parenthesis
Select Re.*,
Tbp.taskid,
Tbp.processtype,
Tbp.processstatus,
Tbp.timelimit,
Tbp.createtime Posttime,
Tbp.procontent dealcontent
From BIZ_T_TASKTROUBLEPROCESSTBP
Right Join (select t.*
Frombiz_t_tasktrouble T
where 1 = 1
and T.status In:status
and t.protype in:inprotypes) re
On tbp.ttrid = Re.ttrid
Key place marked red, parameters passed Sp.put ("Inprotypes", Arrays.aslist (protypes));
After the parameters are taken, and t.protype in (' 1 ', ' 2 ', ' 3 ', ' 4 ', ' 5 ', ' 6 '), since the parameter originally has a closing parenthesis on the right side,
So when the parameter is converted it is treated as a closing parenthesis by default, so when Java executes SQL is generated, there is actually a missing parenthesis.
Improved notation, and and T.protype in (: inprotypes)) re
Run correctly, by
SQL statement correct, but error java.sql.SQLSyntaxErrorException ORA-00907: missing closing parenthesis