[
https://issues.apache.org/jira/browse/CAMEL-10870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15875868#comment-15875868
]
ASF GitHub Bot commented on CAMEL-10870:
----------------------------------------
GitHub user adessaigne opened a pull request:
https://github.com/apache/camel/pull/1479
CAMEL-10870 - Allow to use negative vendor-specific JDBC types in camel-sql
stored procedure
(see JIRA ticket for more information)
Note: the `SSPTParserTokenManager.java` file is automatically updated when
modifying the template, I have no control over this file.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/adessaigne/camel CAMEL-10870
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/camel/pull/1479.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1479
----
commit c3a3f8eae7ff05fba80d3c24c35bb054c2d904e5
Author: Antoine DESSAIGNE <[email protected]>
Date: 2017-02-21T11:58:26Z
CAMEL-10870 - Allow to use negative vendor-specific JDBC types in camel-sql
stored procedure
----
> 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: Bug
> Components: camel-sql
> Reporter: Antoine DESSAIGNE
>
> 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)