camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-10870) camel-sql stored procedures don't support negative vendor-specific JDBC types
Date Tue, 21 Feb 2017 13:32:44 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-10870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15875968#comment-15875968
] 

ASF GitHub Bot commented on CAMEL-10870:
----------------------------------------

Github user adessaigne closed the pull request at:

    https://github.com/apache/camel/pull/1479


> camel-sql stored procedures don't support negative vendor-specific JDBC types
> -----------------------------------------------------------------------------
>
>                 Key: CAMEL-10870
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10870
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-sql
>            Reporter: Antoine DESSAIGNE
>            Assignee: Claus Ibsen
>             Fix For: 2.18.3, 2.19.0
>
>
> When you use a vendor-specific JDBC type in {{camel-sql}} you need to use its value instead
of its label.
> For instance, if you use oracle if you want to call a stored procedure that returns a
{{FIXED_CHAR}} type you need to write:
> {noformat}
> <to uri="sql-stored:PROCEDURE1(OUT 999 result)?dataSource=oracle"/>
> {noformat}
> All values are defined here: https://docs.oracle.com/cd/E16338_01/appdev.112/e13995/constant-values.html#oracle_jdbc_OracleTypes_ARRAY
> You can notice that there are negative values in this list ({{CURSOR}} for instance).
Unfortunately the negative values aren't handled by the parser which leads to the following
exception
> {noformat}
> org.apache.camel.component.sql.stored.template.ast.ParseRuntimeException: Field -10 not
found from java.procedureName.Types
> 	at org.apache.camel.component.sql.stored.template.ast.ParseHelper.parseSqlType(ParseHelper.java:41)
> 	at org.apache.camel.component.sql.stored.template.generated.SSPTParser.OutParameter(SSPTParser.java:92)
> 	at org.apache.camel.component.sql.stored.template.generated.SSPTParser.Parameter(SSPTParser.java:60)
> 	at org.apache.camel.component.sql.stored.template.generated.SSPTParser.parse(SSPTParser.java:23)
> 	at org.apache.camel.component.sql.stored.template.TemplateParser.parseTemplate(TemplateParser.java:31)
> 	at org.apache.camel.component.sql.stored.CallableStatementWrapperFactory.getTemplateStoredProcedure(CallableStatementWrapperFactory.java:71)
> 	at org.apache.camel.component.sql.stored.CallableStatementWrapper.populateStatement(CallableStatementWrapper.java:104)
> 	at org.apache.camel.component.sql.stored.SqlStoredProducer$1.execute(SqlStoredProducer.java:69)
> 	at org.apache.camel.component.sql.stored.CallableStatementWrapper.call(CallableStatementWrapper.java:55)
> 	at org.apache.camel.component.sql.stored.SqlStoredProducer.process(SqlStoredProducer.java:43)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message