You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by imranrazakhan <im...@gmail.com> on 2017/05/23 21:26:24 UTC

Oracle Function Calls with Camel-sql 2.19.0

Hi,

Can we call Oracle Function with camel-sql? its working fine for Store
Procedure but throwing error for functions


 Exhausted after delivery attempt: 1 caught: org.springframework.jdb
c.BadSqlGrammarException: CallableStatementCallback; bad SQL grammar [{call
GET_PREPOST_STATUS(?, ?, ?, ?)}]; nested
 exception is java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00221: 'GET_PREPOST_STATUS' is not a procedure or is undefined
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored


Following works for store procedure 

from("timer://foo?fixedRate=true&period=20000") 
		.setHeader("msisdn",simple("XXXX"))
		 .to("sql-stored:GET_PREPOST_STATUS(VARCHAR ${header.msisdn},OUT VARCHAR
PREPOST_PAID, OUT VARCHAR STATUS, OUT VARCHAR IS_CORP)?dataSource=myDS")
		 .to("log:input")
		 .end();




--
View this message in context: http://camel.465427.n5.nabble.com/Oracle-Function-Calls-with-Camel-sql-2-19-0-tp5800096.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Oracle Function Calls with Camel-sql 2.19.0

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Thanks that was helpful, I have logged a ticket
https://issues.apache.org/jira/browse/CAMEL-11319

On Wed, May 24, 2017 at 8:46 AM, imranrazakhan <im...@gmail.com> wrote:
> Hi,
>
> I found below customized solution for Oracle function and dont know if
> Apache Camel can support this in Components
>
> https://github.com/quephird/camel-stored-procedure
>
> It would be nice to have this support out of box in SQL or JDBC Component.
>
> Regards
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Oracle-Function-Calls-with-Camel-sql-2-19-0-tp5800096p5800253.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Re: Oracle Function Calls with Camel-sql 2.19.0

Posted by imranrazakhan <im...@gmail.com>.
Hi,

I found below customized solution for Oracle function and dont know if
Apache Camel can support this in Components

https://github.com/quephird/camel-stored-procedure

It would be nice to have this support out of box in SQL or JDBC Component.

Regards



--
View this message in context: http://camel.465427.n5.nabble.com/Oracle-Function-Calls-with-Camel-sql-2-19-0-tp5800096p5800253.html
Sent from the Camel - Users mailing list archive at Nabble.com.