@vikramT,

I found the problem and created issue:
https://issues.apache.org/jira/browse/IGNITE-3816

You may workaround by specifying all DB related names in uppercase.
See your CacheConfig.java and change

        // Key fields for inventory_orders.
        Collection<JdbcTypeField> keys = new ArrayList<>();
        keys.add(new JdbcTypeField(Types.INTEGER, "ITEM_ID", Integer.class,
"itemId"));
        jdbcType.setKeyFields(keys.toArray(new JdbcTypeField[keys.size()]));

        // Value fields for inventory_orders.
        Collection<JdbcTypeField> vals = new ArrayList<>();
        vals.add(new JdbcTypeField(Types.INTEGER, "MONTH_ID",
Integer.class, "monthId"));
        vals.add(new JdbcTypeField(Types.INTEGER, "ITEM_ID", Integer.class,
"itemId"));
        vals.add(new JdbcTypeField(Types.DOUBLE, "UNITS_RECEIVED",
Double.class, "unitsReceived"));
        vals.add(new JdbcTypeField(Types.INTEGER, "MONTH_DURATION",
Integer.class, "monthDuration"));
        jdbcType.setValueFields(vals.toArray(new
JdbcTypeField[vals.size()]));



On Wed, Aug 31, 2016 at 10:12 PM, Alexey Kuznetsov <akuznet...@gridgain.com>
wrote:

> @Val, @vikramT, @Vasiliy,
>
> FYI: I created issue: CacheJdbcPojoStore.loadCache() should check
> arguments and fail with appropriate exception message [
> https://issues.apache.org/jira/browse/IGNITE-3815].
> That was exactly what could help @vikramT to resolve initial bug.
>
> On Wed, Aug 31, 2016 at 6:04 PM, Alexey Kuznetsov <akuznet...@gridgain.com
> > wrote:
>
>> @vikramT, thanks for logs we will take a look.
>>
>> I see NPE in log, so we will try to reproduce.
>>
>> On Wed, Aug 31, 2016 at 1:31 PM, vikramT <vikram.ta...@yahoo.com> wrote:
>>
>>> hi Vasiliy, Alexey,
>>>
>>> I tried this code "cache.loadCache(null,Inventor
>>> yOrdersKey.class.getName(),
>>> "select * from inventory_orders");" and getting different error log
>>> ignite-19d380e7.log
>>> <http://apache-ignite-users.70518.x6.nabble.com/file/n7430/i
>>> gnite-19d380e7.log>
>>>
>>> Also I have added constructors in "InventoryOrdersKey" as below:
>>>    public InventoryOrdersKey(){
>>>     }
>>>
>>>     public InventoryOrdersKey(Integer itemId){
>>>         this.itemId = itemId;
>>>     }
>>>
>>> Error now is: "Caused by: javax.cache.integration.CacheLoaderException:
>>> Failed to construct instance of class:
>>> org.infocepts.ignite.hiveCache.InventoryOrdersKey"
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context: http://apache-ignite-users.705
>>> 18.x6.nabble.com/javax-cache-CacheException-Failed-to-find-m
>>> apping-description-tp7350p7430.html
>>> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>>>
>>
>>
>>
>> --
>> Alexey Kuznetsov
>> GridGain Systems
>> www.gridgain.com
>>
>
>
>
> --
> Alexey Kuznetsov
> GridGain Systems
> www.gridgain.com
>



-- 
Alexey Kuznetsov
GridGain Systems
www.gridgain.com

Reply via email to