Ibm mobilefirst IBM Worklight-如何使用;“出去”;参数
我们正在使用一个SQL适配器,在调用存储过程时出现以下错误。我们的数据库是Oracle11g。下面是我们的适配器和程序Ibm mobilefirst IBM Worklight-如何使用;“出去”;参数,ibm-mobilefirst,worklight-adapters,Ibm Mobilefirst,Worklight Adapters,我们正在使用一个SQL适配器,在调用存储过程时出现以下错误。我们的数据库是Oracle11g。下面是我们的适配器和程序 function deals(param) { return WL.Server.invokeSQLStoredProcedure({ procedure : "deals_proc", parameters : [] }); } 程序是 create or replace procedure deals_proc(c1 out
function deals(param) {
return WL.Server.invokeSQLStoredProcedure({
procedure : "deals_proc",
parameters : []
});
}
程序是
create or replace procedure deals_proc(c1 out sys_refcursor ) AS
begin
open c1 for
select CATEGORYNAME from DEALS;
end deals_proc;
我得到的错误是
{
"errors": [
"Runtime: Failed to retrieve data with procedure : deals_proc"
],
"info": [
],
"isSuccessful": false,
"warnings": [
]
}
控制台中的错误消息为
Failed to retrieve data with procedure : deals_proc
FWLSE0101E: Caused by: [project Test]java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'DEALS_PROC'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
java.lang.RuntimeException: Failed to retrieve data with procedure : deals_proc
Worklight不支持SQL适配器中的
out
参数。见这个问题:
我将您链接到的问题还包含一个答案,如果您希望尝试它(基本上,重写Worklight并在Java代码中实现它),它提供了一个详细的解决方法