我是骆驼 sql 存储组件的新手。目前我正在使用 Camel 2.17.5。我正在尝试从骆驼路线调用 oracle 存储过程。这是我的路线:
<setHeader headerName="test">
<simple>John</simple>
</setHeader>
<log loggingLevel="INFO" message="value: ${headers.test}" />
<to uri="sql-stored:HELLO(VARCHAR ${headers.test},OUT VARCHAR outparam1)?dataSource=oracleDataSource"/>
<log loggingLevel="INFO" message="SP result: ${body}" />
这是我的存储过程:
CREATE OR REPLACE PROCEDURE hello(param1 IN varchar2, outparam1 OUT varchar2)
AS
BEGIN
select password INTO outparam1 from dbuser WHERE USERNAME=param1;
END;
但是当我运行我的路线时,它给了我错误:
org.apache.camel.component.sql.stored.template.ast.ParseRuntimeException: org.apache.camel.component.sql.stored.template.generated.ParseException: Encountered " " " " "" at line 1, column 35.
Was expecting one of:
<NUMBER> ...
<IDENTIFIER> ...
at org.apache.camel.component.sql.stored.template.TemplateParser.parseTemplate(TemplateParser.java:36)
at org.apache.camel.component.sql.stored.CallableStatementWrapperFactory.getTemplateStoredProcedure(CallableStatementWrapperFactory.java:71)
你能帮我吗,这里有什么问题?