[英]wrong number or types of arguments in call to 'DROP_QUEUE_TABLE'
I am trying to drop a queue using jdbcTemplate().update method. 我正在尝试使用jdbcTemplate()。update方法删除队列。 which is -
这是-
getJdbcTemplate().update("call DBMS_AQADM.DROP_QUEUE_TABLE (?, ?)", qTableName.toUpperCase(),true);
DBMS_AQADM.DROP_QUEUE_TABLE takes two parameters. DBMS_AQADM.DROP_QUEUE_TABLE采用两个参数。 1) queue_table as string and 2) force as boolean.
1)queue_table作为字符串,2)强制为布尔值。
whn I try to run the above code, I am getting - 当我尝试运行上面的代码时,我得到-
PreparedStatementCallback; bad SQL grammar [call DBMS_AQADM.DROP_QUEUE_TABLE (?, ?)]; nested exception is java.sql.SQLException: ORA-06553: PLS-306: wrong number or types of arguments in call to 'DROP_QUEUE_TABLE'
ORA-06553: PLS-306: wrong number or types of arguments in call to 'DROP_QUEUE_TABLE'
but when I am running the following code it works fine- 但是当我运行以下代码时,它可以正常工作-
getJdbcTemplate().update("call DBMS_AQADM.CREATE_QUEUE_TABLE (?, ?)", qTableName.toUpperCase(), payloadType.toUpperCase());
What I am guessing is, the problem is passing oracle objects (which are not varchar or int) as parameters. 我猜的是,问题是将oracle对象(不是varchar或int)作为参数传递。
I really wnat to know is there any way to solve this. 我真的很想知道有没有办法解决这个问题。
BOOLEAN parameters are not supported . 不支持 BOOLEAN参数。 As recomended write your own wrapper procedure with int parameter or pass a PL/SQL block with fixed TRUE parameter:
推荐使用int参数编写您自己的包装过程,或传递具有固定TRUE参数的PL / SQL块:
BEGIN
DBMS_AQADM.DROP_QUEUE_TABLE(
queue_table => ?,
force => TRUE);
END;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.