Hello @akriti91

Can you please properly subscribe to the mailing list so that the community
receives email notifications? Here is the instruction:
http://apache-ignite-users.70518.x6.nabble.com/mailing_list/MailingListOptions.jtp?forum=1

Looks like type metadata for cache is not configured.

Please check CacheConfiguration class. It should contains the next method:

/**
 * Create JDBC type for Person.
 *
 * @param cacheName Cache name.
 * @return Configured JDBC type.
 */
private static JdbcType jdbcTypePerson(String cacheName) {
    JdbcType jdbcType = new JdbcType();
    jdbcType.setCacheName(cacheName);
    jdbcType.setDatabaseSchema("PUBLIC");
    jdbcType.setDatabaseTable("PERSON");
    jdbcType.setKeyType("org.apache.ignite.PersonKey");
    jdbcType.setValueType("org.apache.ignite.Person");
    jdbcType.setKeyFields(
            new JdbcTypeField(Types.NUMERIC, "ID", long.class, "id")
    );
    jdbcType.setValueFields(
            new JdbcTypeField(Types.VARCHAR, "FIRST_NAME", String.class,
"firstName"),
            new JdbcTypeField(Types.VARCHAR, "LAST_NAME", String.class,
"lastName"),
            new JdbcTypeField(Types.DOUBLE, "SALARY", Double.class,
"salary")
    );
    return jdbcType;
}

that used in "cache" method in the following way:

// Configure JDBC types. 
Collection<JdbcType> jdbcTypes = new ArrayList<>();
jdbcTypes.add(jdbcTypePerson(cacheName));
storeFactory.setTypes(jdbcTypes.toArray(new JdbcType[jdbcTypes.size()]));

That configuration work perfectly for me with H2 database.

If my answer does not help to you please provide full source code of your
example.



--
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-tp3725p3731.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Reply via email to