Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-5057

Infinispan Hotrod error when '-' in Source model name

XMLWordPrintable

      There are different constraints on Source model name in Teiid and query passed through hotrod client.
      For a source model:

      Source model
      <model name="Source-1" type="PHYSICAL" visible="true">
              <source name="jdg7-source-1" translator-name="infinispan-hotrod" connection-jndi-name="java:/jdg71HotrodDS" />
              <metadata type="DDL"><![CDATA[
                   CREATE FOREIGN TABLE SmallA (
                     StringKey string PRIMARY KEY,
                     DoubleNum double
                     ) OPTIONS(UPDATABLE true, "teiid_ispn:cache" 'cache_name');
                  ]]>
              </metadata>
              <metadata type = "NATIVE"/>
          </model>
      

      The vdb becomes active:

      server.log
      14:29:40,953 INFO  [org.teiid.RUNTIME.VDBLifeCycleListener] (teiid-async-threads - 3) TEIID40003 VDB jdg71_crud.1 is set to ACTIVE
      

      Then on query:

      select query
      SELECT * FROM SMallA
      

      Following error occurs in Teiid:

      server.log
      14:29:49,350 WARN  [org.infinispan.client.hotrod.impl.protocol.Codec21] (Worker3_QueryProcessorQueue7) ISPN004005: Error received from the server: org.infinispan.objectfilter.ParsingException: ISPN028526: Invalid query: SELECT g_0.StringKey, g_0.DoubleNum FROM Source-1.SmallA g_0 ; Parser error messages: [[statement, selectStatement, querySpec, selectFrom, fromClause, persisterSpaces, persisterSpace, persisterSpaceRoot, mainEntityPersisterReference, aliasClause]: line 1:47 state 0 (decision=22) no viable alt; token=[@14,47:47='-',<84>,1:47], [statement]: line 1:50 mismatched token: [@16,50:55='SmallA',<59>,1:50]; expecting type EOF].
      14:29:49,351 ERROR [org.teiid.CONNECTOR] (Worker3_QueryProcessorQueue7) Connector worker process failed for atomic-request=429MasxTtgFj.0.0.2: org.infinispan.client.hotrod.exceptions.HotRodClientException:Request for messageId=29 returned server error (status=0x85): org.infinispan.objectfilter.ParsingException: ISPN028526: Invalid query: SELECT g_0.StringKey, g_0.DoubleNum FROM Source-1.SmallA g_0 ; Parser error messages: [[statement, selectStatement, querySpec, selectFrom, fromClause, persisterSpaces, persisterSpace, persisterSpaceRoot, mainEntityPersisterReference, aliasClause]: line 1:47 state 0 (decision=22) no viable alt; token=[@14,47:47='-',<84>,1:47], [statement]: line 1:50 mismatched token: [@16,50:55='SmallA',<59>,1:50]; expecting type EOF].
      	at org.infinispan.client.hotrod.impl.protocol.Codec20.checkForErrorsInResponseStatus(Codec20.java:363) [infinispan-client-hotrod-8.4.0.Final-redhat-2.jar:8.4.0.Final-redhat-2]
      	at org.infinispan.client.hotrod.impl.protocol.Codec20.readPartialHeader(Codec20.java:152) [infinispan-client-hotrod-8.4.0.Final-redhat-2.jar:8.4.0.Final-redhat-2]
      	at org.infinispan.client.hotrod.impl.protocol.Codec20.readHeader(Codec20.java:138) [infinispan-client-hotrod-8.4.0.Final-redhat-2.jar:8.4.0.Final-redhat-2]
      	at org.infinispan.client.hotrod.impl.operations.HotRodOperation.readHeaderAndValidate(HotRodOperation.java:60) [infinispan-client-hotrod-8.4.0.Final-redhat-2.jar:8.4.0.Final-redhat-2]
      	at org.infinispan.client.hotrod.impl.operations.QueryOperation.executeOperation(QueryOperation.java:68) [infinispan-client-hotrod-8.4.0.Final-redhat-2.jar:8.4.0.Final-redhat-2]
      	at org.infinispan.client.hotrod.impl.operations.QueryOperation.executeOperation(QueryOperation.java:30) [infinispan-client-hotrod-8.4.0.Final-redhat-2.jar:8.4.0.Final-redhat-2]
      	at org.infinispan.client.hotrod.impl.operations.RetryOnFailureOperation.execute(RetryOnFailureOperation.java:56) [infinispan-client-hotrod-8.4.0.Final-redhat-2.jar:8.4.0.Final-redhat-2]
      	at org.infinispan.client.hotrod.impl.query.RemoteQuery.executeQuery(RemoteQuery.java:68) [infinispan-client-hotrod-8.4.0.Final-redhat-2.jar:8.4.0.Final-redhat-2]
      	at org.infinispan.client.hotrod.impl.query.RemoteQuery.list(RemoteQuery.java:53) [infinispan-client-hotrod-8.4.0.Final-redhat-2.jar:8.4.0.Final-redhat-2]
      	at org.teiid.translator.infinispan.hotrod.InfinispanResponse.fetchNextBatch(InfinispanResponse.java:74) [translator-infinispan-hotrod-8.12.11.6_4-redhat-6.jar:8.12.11.6_4-redhat-6]
      	at org.teiid.translator.infinispan.hotrod.InfinispanResponse.getNextRow(InfinispanResponse.java:90) [translator-infinispan-hotrod-8.12.11.6_4-redhat-6.jar:8.12.11.6_4-redhat-6]
      	at org.teiid.translator.infinispan.hotrod.InfinispanQueryExecution.next(InfinispanQueryExecution.java:136) [translator-infinispan-hotrod-8.12.11.6_4-redhat-6.jar:8.12.11.6_4-redhat-6]
      	at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.handleBatch(ConnectorWorkItem.java:433) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
      	at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.more(ConnectorWorkItem.java:236) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_121]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_121]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_121]
      	at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_121]
      	at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
      	at com.sun.proxy.$Proxy79.more(Unknown Source)
      	at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:309) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
      	at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
      	at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_121]
      	at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
      	at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:280) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
      	at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
      	at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_121]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_121]
      	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_121]
      
      14:29:49,356 WARN  [org.teiid.PROCESSOR] (Worker2_QueryProcessorQueue8) TEIID30020 Processing exception for request 429MasxTtgFj.0 'TEIID30504 jdg7-source-1: org.infinispan.objectfilter.ParsingException: ISPN028526: Invalid query: SELECT g_0.StringKey, g_0.DoubleNum FROM Source-1.SmallA g_0 ; Parser error messages: [[statement, selectStatement, querySpec, selectFrom, fromClause, persisterSpaces, persisterSpace, persisterSpaceRoot, mainEntityPersisterReference, aliasClause]: line 1:47 state 0 (decision=22) no viable alt; token=[@14,47:47='-',<84>,1:47], [statement]: line 1:50 mismatched token: [@16,50:55='SmallA',<59>,1:50]; expecting type EOF].'. Originally TeiidProcessingException Codec20.java:363. Enable more detailed logging to see the entire stacktrace.
      

      And in JDG's log:

      JDG log
      08:29:49,267 ERROR [stderr] (HotRod-hotrod-securedServerHandler-10-30) line 1:47 no viable alternative at input '-'
      

      The issue is '-' in Source model's name.

              rhn-engineering-rareddy Ramesh Reddy
              jstastny@redhat.com Jan Stastny
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: