9 Replies Latest reply on Jul 22, 2016 12:59 PM by Ramesh Reddy

    parsing exception while using  procedure invokeHttp of Rest Translator

    Durgadatta Sahu Newbie

      Hi I am using following procedure,

       

      exec invokeHttp('POST','"+"select * from EMPLOYEE  where EMP_NAME='Dinesh'"+"', '" + url + "', 'TRUE', '"+header+"')

       

      Here header is a json object ;

       

      I am using TEIID EMBEDDED 9.0.1

       

      During execution the following parsing error is coming .

      Here I am passing EMP_NAME as a string so I have to enclose it within single quote , there the parsing error is coming .

       

      Please help me out , how to send the string with single quote .

       

       

       

       

      Caused by: org.teiid.api.exception.query.QueryParserException: TEIID31100 Parsing error: Encountered "'POST','select * from EMPLOYEE where EMP_NAME ='[*]Dinesh[*]''," at line 1, column 72.

      Was expecting: "and" | "between" | "in" | "is" | "like" | "like_regex" | "not" | "or" | "similar" | "," ...

      at org.teiid.query.parser.QueryParser.convertParserException(QueryParser.java:214)

      at org.teiid.query.parser.QueryParser.parseCommand(QueryParser.java:164)

      at org.teiid.query.parser.QueryParser.parseCommand(QueryParser.java:140)

      at org.teiid.dqp.internal.process.Request.parseCommand(Request.java:305)

      at org.teiid.dqp.internal.process.Request.generatePlan(Request.java:399)

      at org.teiid.dqp.internal.process.PreparedStatementRequest.generatePlan(PreparedStatementRequest.java:119)

      at org.teiid.dqp.internal.process.Request.processRequest(Request.java:473)

      at org.teiid.dqp.internal.process.PreparedStatementRequest.processRequest(PreparedStatementRequest.java:294)

      at org.teiid.dqp.internal.process.RequestWorkItem.processNew(RequestWorkItem.java:642)

      at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:337)

      at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51)

      at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274)

      at org.teiid.dqp.internal.process.DQPCore.executeRequest(DQPCore.java:313)

      at org.teiid.dqp.internal.process.DQPCore.executeRequest(DQPCore.java:245)

      at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:483)

      at org.teiid.transport.LocalServerConnection$1$1.call(LocalServerConnection.java:177)

      at java.util.concurrent.FutureTask.run(FutureTask.java:266)

      at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)

      at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:260)

      at org.teiid.transport.LocalServerConnection$1.invoke(LocalServerConnection.java:175)

      at com.sun.proxy.$Proxy19.executeRequest(Unknown Source)

      at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:688)

      at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:554)