1 Reply Latest reply on Apr 1, 2019 12:35 PM by rareddy

    Teiid 12.1.0 Reading from Infinispan 9.4.9.Final

    l.fugaro

      Hi all,

      I have some issues in reading from a remote Infinispan cache.

      I can read the remote cache by using a simple main Java application, settings  properly server host:port, and the cache name.

       

      Here is my VDB definition:

       

      <?xml version="1.0" encoding="UTF-8" standalone="no"?>
      <vdb name="UserVDB" version="1">
          <property name ="lib" value ="com.foogaro.cdc.infinispan.model"></property>
          <model name="VDBUser">
              <source connection-jndi-name="java:/infinispanUser" name="infinispan" translator-name="infinispan-hotrod"/>
              <metadata type="DDL"><![CDATA[
      
              CREATE FOREIGN TABLE Utenti (userId varchar(100) PRIMARY KEY, name varchar(100), lastname varchar(100), username varchar (100), email varchar(255)) OPTIONS (NAMEINSOURCE 'vdbUsers', UPDATABLE true, "teiid_ispn:cache" 'vdbUsers');
      
              ]]>
              </metadata>
              <metadata type="NATIVE"/>
          </model>
      
      </vdb>
      
      
      
      
      
      

       

      And here is my resource adapter definition:

       

      <resource-adapter id="ispnUser">
          <module slot="main" id="org.jboss.teiid.resource-adapter.infinispan.hotrod"/>
          <connection-definitions>
              <connection-definition class-name="org.teiid.resource.adapter.infinispan.hotrod.InfinispanManagedConnectionFactory" jndi-name="java:/infinispanUser" enabled="true" use-java-context="true" pool-name="infinispanUser">
                  <config-property name="RemoteServerList">
                      cdc-infinispan:11222
                  </config-property>
              </connection-definition>
          </connection-definitions>
      </resource-adapter>
      
      
      

       

      The error I get is the following:

       

      14:05:31,742 INFO  [org.jboss.as] (Controller Boot Thread)  WFLYSRV0025: WildFly Full 15.0.1.Final (WildFly Core 7.0.0.Final) started in 11611ms - Started 726 of 947 services (443 services are lazy, passive or on-demand)
      14:05:31,920 INFO  [org.teiid.PROCESSOR.MATVIEWS] (Worker0_QueryProcessorQueue4) 7rmTSOLFuc/0 TEIID30014 Loaded materialized view table #MAT_PG_CATALOG.PG_TYPE with row count 48.
      14:05:31,933 INFO  [org.teiid.PROCESSOR.MATVIEWS] (Worker3_QueryProcessorQueue5) YTeqluQ27w1B TEIID30014 Loaded materialized view table #MAT_PG_CATALOG.MATPG_DATATYPE with row count 56.
      14:05:32,031 INFO  [org.teiid.PROCESSOR.MATVIEWS] (Worker1_QueryProcessorQueue1) rKJyxKjX4gf4 TEIID30014 Loaded materialized view table #MAT_PG_CATALOG.PG_ATTRIBUTE with row count 491.
      14:06:08,569 WARN  [org.infinispan.client.hotrod.impl.protocol.Codec21] (Worker1_QueryProcessorQueue6) s0nIe1W5ZswZ ISPN004005: Error received from the server: java.lang.IllegalArgumentException: Message descriptor not found : com.foogaro.cdc.infinispan.model.VDBUser
      14:06:08,570 ERROR [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue6) s0nIe1W5ZswZ Connector worker process failed for atomic-request=s0nIe1W5ZswZ.0.0.0: org.infinispan.client.hotrod.exceptions.HotRodClientException:Request for messageId=10 returned server error (status=0x85): java.lang.IllegalArgumentException: Message descriptor not found : com.foogaro.cdc.infinispan.model.VDBUser
          at org.infinispan.client.hotrod.impl.protocol.Codec20.checkForErrorsInResponseStatus(Codec20.java:363)
          at org.infinispan.client.hotrod.impl.protocol.Codec20.readPartialHeader(Codec20.java:152)
          at org.infinispan.client.hotrod.impl.protocol.Codec20.readHeader(Codec20.java:138)
          at org.infinispan.client.hotrod.impl.operations.HotRodOperation.readHeaderAndValidate(HotRodOperation.java:60)
          at org.infinispan.client.hotrod.impl.operations.QueryOperation.executeOperation(QueryOperation.java:84)
          at org.infinispan.client.hotrod.impl.operations.QueryOperation.executeOperation(QueryOperation.java:31)
          at org.infinispan.client.hotrod.impl.operations.RetryOnFailureOperation.execute(RetryOnFailureOperation.java:56)
          at org.infinispan.client.hotrod.impl.query.RemoteQuery.executeQuery(RemoteQuery.java:69)
          at org.infinispan.client.hotrod.impl.query.RemoteQuery.list(RemoteQuery.java:54)
          at org.teiid.translator.infinispan.hotrod.InfinispanResponse.fetchNextBatch(InfinispanResponse.java:72)
          at org.teiid.translator.infinispan.hotrod.InfinispanResponse.getNextRow(InfinispanResponse.java:96)
          at org.teiid.translator.infinispan.hotrod.InfinispanQueryExecution.next(InfinispanQueryExecution.java:134)
          at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.handleBatch(ConnectorWorkItem.java:465)
          at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.more(ConnectorWorkItem.java:251)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:228)
          at com.sun.proxy.$Proxy43.more(Unknown Source)
          at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:305)
          at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108)
          at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:104)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:59)
          at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:281)
          at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:124)
          at org.teiid.dqp.internal.process.ThreadReuseExecutor$2.run(ThreadReuseExecutor.java:212)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
          at java.lang.Thread.run(Thread.java:748)
      14:06:08,576 WARN  [org.teiid.PROCESSOR] (default task-1) s0nIe1W5ZswZ TEIID30020 Processing exception for request s0nIe1W5ZswZ.0 'TEIID30504 infinispan: java.lang.IllegalArgumentException: Message descriptor not found : com.foogaro.cdc.infinispan.model.VDBUser'. Originally TeiidProcessingException Codec20.java:363. Enable more detailed logging to see the entire stacktrace.
      14:06:08,583 WARN  [org.teiid.PROCESSOR] (default task-1)  TEIID16053 Unable to process odata request due to: TEIID30504 infinispan: java.lang.IllegalArgumentException: Message descriptor not found : com.foogaro.cdc.infinispan.model.VDBUser Increase the log level to see the entire stack trace.
      

       

       

      Any ideas?

       

      Both Infinispan and Teiid have the POJOs jar installed as JBoss module, as follows:

       

      #On Infinispan
      ./bin/ispn-cli.sh --command="module add --name=com.foogaro.cdc.infinispan.model --resources=model-0.0.1.jar"
      
      #On Teiid
      ./bin/jboss-cli.sh --command="module add --name=com.foogaro.cdc.infinispan.model --resources=model-0.0.1.jar"
      
      

       

      Both Infinispan and Teiid have the level of the root-logger ROOT to TRACE.

      No errors in Infinispan.

       

      Any ideas?

       

      Regards,

      Luigi

        • 1. Re: Teiid 12.1.0 Reading from Infinispan 9.4.9.Final
          rareddy

          Luigi,

           

          On the Teiid side the current implementation uses "Infinispan 9.1.2.Final" as libraries. There is no need to define any modules in Teiid side. One thing I want to make sure is, this translator only works with "protobuf" definitions, i.e. you have either using predefined ones, or created a dynamic one created by Teiid. Then using that, you generated the java code to interact directly with Infinispan. I do not see that approach above. See this documentation on the translator Infinispan Translator · GitBook

           

          Ramesh..