4 Replies Latest reply on Apr 10, 2018 12:48 AM by Murty Kirlampalli

    Can teiid able to fetch results with Apache Ignite Datasource?

    Murty Kirlampalli Newbie

      Hi, I tried to connect teiid with Apache Ignite data source, But it failed with following error message. Please clarify. I am attaching the code and files.

       

      I created Apache Ignite database and created "student"  table and I able to fetch the data also.

       

      But when I tried with teiid, It is failed to fetch results

       

      Java Code :

       

      EmbeddedServer server = new EmbeddedServer();

      DataSource sqlServerDatasource = MultiDataSourceHelper.newDataSource("org.apache.ignite.IgniteJdbcThinDriver", "jdbc:ignite:thin://127.0.0.1/");

      server.addConnectionFactory("java:/ignite-ds", sqlServerDatasource);

      SQLServerExecutionFactory sqlServerExecutionFactory = new SQLServerExecutionFactory() ;

      sqlServerExecutionFactory.setSupportsDirectQueryProcedure(true);

      sqlServerExecutionFactory.start();

      server.addTranslator("translator-ignite-ds", sqlServerExecutionFactory);

       

      EmbeddedConfiguration config = new EmbeddedConfiguration();

      config.setTransactionManager(MultiDataSourceHelper.getTransactionManager());

      server.start(config);

        

      server.deployVDB(TestTeiid.class.getClassLoader().getResourceAsStream("TestIgnite.xml"));

       

      Connection c = server.getDriver().connect("jdbc:teiid:TestVDB", null);

       

      execute(c, "select * from student", false);

       

       

      VDB file :

      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

      <vdb name="TestVDB" version="1">

      <model name="PUBLIC">

      <source name="ignite-connector" translator-name="translator-ignite-ds"

      connection-jndi-name="java:/ignite-ds" />

      </model>

      </vdb>

       

       

      Error Message :

       

      Exception in thread "main" org.teiid.metadata.MetadataException: TEIID60011 No column found on table PUBLIC.PUBLIC.STUDENT with name _KEY

      at org.teiid.metadata.MetadataFactory.assignColumn(MetadataFactory.java:380)

      at org.teiid.metadata.MetadataFactory.assignColumns(MetadataFactory.java:489)

      at org.teiid.metadata.MetadataFactory.addPrimaryKey(MetadataFactory.java:288)

      at org.teiid.translator.jdbc.JDBCMetadataProcessor.getPrimaryKeys(JDBCMetadataProcessor.java:570)

      at org.teiid.translator.jdbc.JDBCMetadataProcessor.getConnectorMetadata(JDBCMetadataProcessor.java:175)

      at org.teiid.translator.jdbc.JDBCExecutionFactory.getMetadata(JDBCExecutionFactory.java:302)

      at org.teiid.translator.jdbc.JDBCExecutionFactory.getMetadata(JDBCExecutionFactory.java:65)

      at org.teiid.query.metadata.NativeMetadataRepository.getMetadata(NativeMetadataRepository.java:92)

      at org.teiid.query.metadata.NativeMetadataRepository.loadMetadata(NativeMetadataRepository.java:58)

      at org.teiid.query.metadata.ChainingMetadataRepository.loadMetadata(ChainingMetadataRepository.java:51)

      at org.teiid.runtime.EmbeddedServer.loadMetadata(EmbeddedServer.java:878)

      at org.teiid.runtime.AbstractVDBDeployer.loadMetadata(AbstractVDBDeployer.java:219)

      at org.teiid.runtime.EmbeddedServer.deployVDB(EmbeddedServer.java:828)

      at org.teiid.runtime.EmbeddedServer.deployVDB(EmbeddedServer.java:748)

      at org.teiid.runtime.EmbeddedServer.deployVDB(EmbeddedServer.java:713)

      at com.orbit.spaces.mashing.service.TestTeiid.main(TestTeiid.java:42)