ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vasiliy Sisko <vsi...@gridgain.com>
Subject Re: Failed to find mapping description [cache=PersonCache, typeId=class apache.ignite.schemas.PersonKey]. Please configure JdbcType to associate cache 'PersonCache' with JdbcPojoStore ERROR
Date Wed, 30 Mar 2016 04:18:33 GMT
I found the next problems in you code:

1. In CacheConfiguration.jdbcTypePerson and
CacheConfiguration.queryEntityPerson incorrectly configured key type and
value type. Package in configuration should be equal to real package of
classes:

      jdbcType.setKeyType("apache.ignite.schemas.PersonKey"); 
      jdbcType.setValueType("apache.ignite.schemas.Person"); 

and 

      qryEntity.setKeyType("apache.ignite.schemas.PersonKey"); 
      qryEntity.setValueType("apache.ignite.schemas.Person"); 

2. You should use MySql database instead of H2 datasource. Try next example
to configure MySql datasource in MySQLDemoStoreFactory class:

      MysqlDataSource dataSource = new MysqlDataSource();
      dataSource.setURL("jdbc:mysql://localhost/PERSON");
      dataSource.setUser("root");
      dataSource.setPassword("mysql");
      setDataSource(dataSource);

3. I found that MySql database is case sensitive that means that schema
names and table names should be configured in the same register as in
database (I use upper case, but you should check your database script):

      jdbcType.setDatabaseTable("PERSON");

Possibly for query execution database field should be checked for case
sensitivity too.




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Failed-to-find-mapping-description-cache-PersonCache-typeId-class-apache-ignite-schemas-PersonKey-PlR-tp3725p3758.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Mime
View raw message