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 2016/05/01 16:11:27 UTC

SQL Stored Procedure Component(2.17.0) Parsing Error

HI,

I tried to use new available procedure in Apache Camel 2.17.0 for calling
stored procedure and getting following error

Code:

from("file://D:/?fileName=test1.txt&noop=true")
		 .split( body().tokenize("\n") ).streaming()
		 .process(new LineParser())
		 .log("Col0: ${body[0]} col1: ${body[1]} ")
		 .to("sql-stored:termSubsc(INTEGER ${body[0]},INTEGER
${body[1]})?dataSource=#oracleDS");

DefaultErrorHandler            ERROR Failed delivery for (MessageId:
ID-1462111577116-0-5 on ExchangeId: ID-1462111577116-0-4). Exhausted after
delivery attempt: 1 caught:
org.apache.camel.component.sql.stored.template.ast.ParseRuntimeException:
org.apache.camel.component.sql.stored.template.generated.ParseException:
Encountered " <IDENTIFIER> "${body "" at line 1, column 24.
Was expecting one of:
    <SIMPLE_EXP_TOKEN> ...
    <PARAMETER_POS_TOKEN> ...





--
View this message in context: http://camel.465427.n5.nabble.com/SQL-Stored-Procedure-Component-2-17-0-Parsing-Error-tp5782030.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: SQL Stored Procedure Component(2.17.0) Parsing Error

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

I logged a ticket and am fixing this
https://issues.apache.org/jira/browse/CAMEL-9932

On Sun, May 1, 2016 at 5:23 PM, Claus Ibsen <cl...@gmail.com> wrote:
> You cannot use ${body[1]} currently.
>
> We may need to add [ ] chars to the grammar
>
> On Sun, May 1, 2016 at 4:11 PM, imranrazakhan <im...@gmail.com> wrote:
>> HI,
>>
>> I tried to use new available procedure in Apache Camel 2.17.0 for calling
>> stored procedure and getting following error
>>
>> Code:
>>
>> from("file://D:/?fileName=test1.txt&noop=true")
>>                  .split( body().tokenize("\n") ).streaming()
>>                  .process(new LineParser())
>>                  .log("Col0: ${body[0]} col1: ${body[1]} ")
>>                  .to("sql-stored:termSubsc(INTEGER ${body[0]},INTEGER
>> ${body[1]})?dataSource=#oracleDS");
>>
>> DefaultErrorHandler            ERROR Failed delivery for (MessageId:
>> ID-1462111577116-0-5 on ExchangeId: ID-1462111577116-0-4). Exhausted after
>> delivery attempt: 1 caught:
>> org.apache.camel.component.sql.stored.template.ast.ParseRuntimeException:
>> org.apache.camel.component.sql.stored.template.generated.ParseException:
>> Encountered " <IDENTIFIER> "${body "" at line 1, column 24.
>> Was expecting one of:
>>     <SIMPLE_EXP_TOKEN> ...
>>     <PARAMETER_POS_TOKEN> ...
>>
>>
>>
>>
>>
>> --
>> View this message in context: http://camel.465427.n5.nabble.com/SQL-Stored-Procedure-Component-2-17-0-Parsing-Error-tp5782030.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



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

Re: SQL Stored Procedure Component(2.17.0) Parsing Error

Posted by Claus Ibsen <cl...@gmail.com>.
You cannot use ${body[1]} currently.

We may need to add [ ] chars to the grammar

On Sun, May 1, 2016 at 4:11 PM, imranrazakhan <im...@gmail.com> wrote:
> HI,
>
> I tried to use new available procedure in Apache Camel 2.17.0 for calling
> stored procedure and getting following error
>
> Code:
>
> from("file://D:/?fileName=test1.txt&noop=true")
>                  .split( body().tokenize("\n") ).streaming()
>                  .process(new LineParser())
>                  .log("Col0: ${body[0]} col1: ${body[1]} ")
>                  .to("sql-stored:termSubsc(INTEGER ${body[0]},INTEGER
> ${body[1]})?dataSource=#oracleDS");
>
> DefaultErrorHandler            ERROR Failed delivery for (MessageId:
> ID-1462111577116-0-5 on ExchangeId: ID-1462111577116-0-4). Exhausted after
> delivery attempt: 1 caught:
> org.apache.camel.component.sql.stored.template.ast.ParseRuntimeException:
> org.apache.camel.component.sql.stored.template.generated.ParseException:
> Encountered " <IDENTIFIER> "${body "" at line 1, column 24.
> Was expecting one of:
>     <SIMPLE_EXP_TOKEN> ...
>     <PARAMETER_POS_TOKEN> ...
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/SQL-Stored-Procedure-Component-2-17-0-Parsing-Error-tp5782030.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