You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by "aaron@tophold.com" <aa...@tophold.com> on 2017/07/17 01:26:49 UTC

Re: Re:Weird index out bound Exception

Also what's the different between the #getOrCreateCache  and #cache.

So if a pure client query side which API should prefer?  very appreciate your time. I'm a newer to the Ignite. 


Regards


aaron@tophold.com
 
发件人: aaron@tophold.com
发送时间: 2017-07-17 09:16
收件人: user; aaron
主题: Re: 回复:Weird index out bound Exception
Also If my server side cache with cache storage in backend, my client side also need to configuration this? 

as I notice client throw a exception : Spring application context resource is not injected;   as my client maybe is a very Simple, not include all the configuration available in product. 

so Client should not be aware of the server side cache storage.  


---


Failed to wait for completion of partition map exchange (preloading will not start): GridDhtPartitionsExchangeFuture [dummy=false, forcePreload=false, reassign=false, discoEvt=DiscoveryCustomEvent [customMsg=null, affTopVer=AffinityTopologyVersion [topVer=4, minorTopVer=1], super=DiscoveryEvent [evtNode=TcpDiscoveryNode [id=a39278cf-4950-49b8-b516-72b821c45088, addrs=[0:0:0:0:0:0:0:1, 127.0.0.1, 192.168.1.58, 192.168.56.1, 2001:0:9d38:6ab8:3c42:1ec4:8a6f:e895], sockAddrs=[Aaron/192.168.56.1:0, /0:0:0:0:0:0:0:1:0, /127.0.0.1:0, /192.168.1.58:0, /2001:0:9d38:6ab8:3c42:1ec4:8a6f:e895:0], discPort=0, order=4, intOrder=0, lastExchangeTime=1500253677140, loc=true, ver=2.0.0#20170430-sha1:d4eef3c6, isClient=true], topVer=4, nodeId8=a39278cf, msg=null, type=DISCOVERY_CUSTOM_EVT, tstamp=1500253679239]], crd=TcpDiscoveryNode [id=51e73bad-3528-4634-b062-83b57dbdbd0a, addrs=[127.0.0.1, 192.168.1.58, 192.168.56.1], sockAddrs=[Aaron/192.168.56.1:47500, /127.0.0.1:47500, /192.168.1.58:47500], discPort=47500, order=1, intOrder=1, lastExchangeTime=1500253678911, loc=false, ver=2.0.0#20170430-sha1:d4eef3c6, isClient=false], exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=4, minorTopVer=1], nodeId=a39278cf, evt=DISCOVERY_CUSTOM_EVT], added=true, initFut=GridFutureAdapter [ignoreInterrupts=false, state=DONE, res=false, hash=146566071], init=false, lastVer=null, partReleaseFut=null, affChangeMsg=null, skipPreload=true, clientOnlyExchange=false, initTs=1500253679239, centralizedAff=false, changeGlobalStateE=null, exchangeOnChangeGlobalState=false, forcedRebFut=null, evtLatch=0, remaining=[51e73bad-3528-4634-b062-83b57dbdbd0a], srvNodes=[TcpDiscoveryNode [id=51e73bad-3528-4634-b062-83b57dbdbd0a, addrs=[127.0.0.1, 192.168.1.58, 192.168.56.1], sockAddrs=[Aaron/192.168.56.1:47500, /127.0.0.1:47500, /192.168.1.58:47500], discPort=47500, order=1, intOrder=1, lastExchangeTime=1500253678911, loc=false, ver=2.0.0#20170430-sha1:d4eef3c6, isClient=false]], super=GridFutureAdapter [ignoreInterrupts=false, state=DONE, res=class o.a.i.IgniteException: Spring application context resource is not injected., hash=1325230042]]
class org.apache.ignite.IgniteCheckedException: Spring application context resource is not injected.
at org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7242)
at org.apache.ignite.internal.util.future.GridFutureAdapter.resolve(GridFutureAdapter.java:258)
at org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:206)
at org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:158)
at org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1812)
at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
at java.lang.Thread.run(Thread.java:745)
Caused by: class org.apache.ignite.IgniteException: Spring application context resource is not injected.
at org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:171)
at org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:100)
at org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1458)
at org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1931)
at org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1833)
at org.apache.ignite.internal.processors.cache.CacheAffinitySharedManager.onCacheChangeRequest(CacheAffinitySharedManager.java:379)
at org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.onCacheChangeRequest(GridDhtPartitionsExchangeFuture.java:688)
at org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:529)
at org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1806)
... 2 more




Regards
Aaron


aaron@tophold.com
 
发件人: Aaron
发送时间: 2017-07-15 09:22
收件人: user
主题: 回复:Weird index out bound Exception
Thanks agura, 
so my data node model this cache is REPLICATED, 

how client suppose init the Cache configuration and get refer to the cache? 

if I init the client cache configuration as REPLICATED, it seem stuck there, 

Thanks again for your time!

Regards
Aaron

------------------------------------------------------------------
发件人:agura <ag...@apache.org>
发送时间:2017年7月14日(星期五) 23:38
收件人:user <us...@ignite.apache.org>
主 题:Re: Weird index out bound Exception

Hi,

I can't reproduce your case. But the issue could occur if you had a
REPLICATED cache and after some time changed it to PARTITIONED and for
example call to getOrCreateCache keeping old cache name.



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Weird-index-out-bound-Exception-tp14905p14920.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Re:Weird index out bound Exception

Posted by "aaron@tophold.com" <aa...@tophold.com>.
Thanks!



aaron@tophold.com
 
发件人: Andrey Gura
发送时间: 2017-07-17 21:50
收件人: user
主题: Re: Re:Weird index out bound Exception
> Also what's the different between the #getOrCreateCache  and #cache.
 
#getOrCreateCache() return cache if it's already created or creates
and then return newly created cache.
 
#cache() just returns cache by name or null if cache doesn't exist.
 
> So if a pure client query side which API should prefer?
 
Just use #cache(String name) method.
 
On Mon, Jul 17, 2017 at 4:26 AM, aaron@tophold.com <aa...@tophold.com> wrote:
> Also what's the different between the #getOrCreateCache  and #cache.
>
> So if a pure client query side which API should prefer?  very appreciate
> your time. I'm a newer to the Ignite.
>
>
> Regards
> ________________________________
> aaron@tophold.com
>
>
> 发件人: aaron@tophold.com
> 发送时间: 2017-07-17 09:16
> 收件人: user; aaron
> 主题: Re: 回复:Weird index out bound Exception
> Also If my server side cache with cache storage in backend, my client side
> also need to configuration this?
>
> as I notice client throw a exception : Spring application context resource
> is not injected;   as my client maybe is a very Simple, not include all the
> configuration available in product.
>
> so Client should not be aware of the server side cache storage.
>
>
> ---
>
>
> Failed to wait for completion of partition map exchange (preloading will not
> start): GridDhtPartitionsExchangeFuture [dummy=false, forcePreload=false,
> reassign=false, discoEvt=DiscoveryCustomEvent [customMsg=null,
> affTopVer=AffinityTopologyVersion [topVer=4, minorTopVer=1],
> super=DiscoveryEvent [evtNode=TcpDiscoveryNode
> [id=a39278cf-4950-49b8-b516-72b821c45088, addrs=[0:0:0:0:0:0:0:1, 127.0.0.1,
> 192.168.1.58, 192.168.56.1, 2001:0:9d38:6ab8:3c42:1ec4:8a6f:e895],
> sockAddrs=[Aaron/192.168.56.1:0, /0:0:0:0:0:0:0:1:0, /127.0.0.1:0,
> /192.168.1.58:0, /2001:0:9d38:6ab8:3c42:1ec4:8a6f:e895:0], discPort=0,
> order=4, intOrder=0, lastExchangeTime=1500253677140, loc=true,
> ver=2.0.0#20170430-sha1:d4eef3c6, isClient=true], topVer=4,
> nodeId8=a39278cf, msg=null, type=DISCOVERY_CUSTOM_EVT,
> tstamp=1500253679239]], crd=TcpDiscoveryNode
> [id=51e73bad-3528-4634-b062-83b57dbdbd0a, addrs=[127.0.0.1, 192.168.1.58,
> 192.168.56.1], sockAddrs=[Aaron/192.168.56.1:47500, /127.0.0.1:47500,
> /192.168.1.58:47500], discPort=47500, order=1, intOrder=1,
> lastExchangeTime=1500253678911, loc=false, ver=2.0.0#20170430-sha1:d4eef3c6,
> isClient=false], exchId=GridDhtPartitionExchangeId
> [topVer=AffinityTopologyVersion [topVer=4, minorTopVer=1], nodeId=a39278cf,
> evt=DISCOVERY_CUSTOM_EVT], added=true, initFut=GridFutureAdapter
> [ignoreInterrupts=false, state=DONE, res=false, hash=146566071], init=false,
> lastVer=null, partReleaseFut=null, affChangeMsg=null, skipPreload=true,
> clientOnlyExchange=false, initTs=1500253679239, centralizedAff=false,
> changeGlobalStateE=null, exchangeOnChangeGlobalState=false,
> forcedRebFut=null, evtLatch=0,
> remaining=[51e73bad-3528-4634-b062-83b57dbdbd0a], srvNodes=[TcpDiscoveryNode
> [id=51e73bad-3528-4634-b062-83b57dbdbd0a, addrs=[127.0.0.1, 192.168.1.58,
> 192.168.56.1], sockAddrs=[Aaron/192.168.56.1:47500, /127.0.0.1:47500,
> /192.168.1.58:47500], discPort=47500, order=1, intOrder=1,
> lastExchangeTime=1500253678911, loc=false, ver=2.0.0#20170430-sha1:d4eef3c6,
> isClient=false]], super=GridFutureAdapter [ignoreInterrupts=false,
> state=DONE, res=class o.a.i.IgniteException: Spring application context
> resource is not injected., hash=1325230042]]
> class org.apache.ignite.IgniteCheckedException: Spring application context
> resource is not injected.
> at org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7242)
> at
> org.apache.ignite.internal.util.future.GridFutureAdapter.resolve(GridFutureAdapter.java:258)
> at
> org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:206)
> at
> org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:158)
> at
> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1812)
> at
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: class org.apache.ignite.IgniteException: Spring application
> context resource is not injected.
> at
> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:171)
> at
> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:100)
> at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1458)
> at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1931)
> at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1833)
> at
> org.apache.ignite.internal.processors.cache.CacheAffinitySharedManager.onCacheChangeRequest(CacheAffinitySharedManager.java:379)
> at
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.onCacheChangeRequest(GridDhtPartitionsExchangeFuture.java:688)
> at
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:529)
> at
> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1806)
> ... 2 more
>
>
>
>
> Regards
> Aaron
> ________________________________
> aaron@tophold.com
>
>
> 发件人: Aaron
> 发送时间: 2017-07-15 09:22
> 收件人: user
> 主题: 回复:Weird index out bound Exception
> Thanks agura,
> so my data node model this cache is REPLICATED,
>
> how client suppose init the Cache configuration and get refer to the cache?
>
> if I init the client cache configuration as REPLICATED, it seem stuck there,
>
> Thanks again for your time!
>
> Regards
> Aaron
>
> ------------------------------------------------------------------
> 发件人:agura <ag...@apache.org>
> 发送时间:2017年7月14日(星期五) 23:38
> 收件人:user <us...@ignite.apache.org>
> 主 题:Re: Weird index out bound Exception
>
> Hi,
>
> I can't reproduce your case. But the issue could occur if you had a
> REPLICATED cache and after some time changed it to PARTITIONED and for
> example call to getOrCreateCache keeping old cache name.
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/Weird-index-out-bound-Exception-tp14905p14920.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>
>

Re: Re:Weird index out bound Exception

Posted by Andrey Gura <ag...@apache.org>.
> Also what's the different between the #getOrCreateCache  and #cache.

#getOrCreateCache() return cache if it's already created or creates
and then return newly created cache.

#cache() just returns cache by name or null if cache doesn't exist.

> So if a pure client query side which API should prefer?

Just use #cache(String name) method.

On Mon, Jul 17, 2017 at 4:26 AM, aaron@tophold.com <aa...@tophold.com> wrote:
> Also what's the different between the #getOrCreateCache  and #cache.
>
> So if a pure client query side which API should prefer?  very appreciate
> your time. I'm a newer to the Ignite.
>
>
> Regards
> ________________________________
> aaron@tophold.com
>
>
> 发件人: aaron@tophold.com
> 发送时间: 2017-07-17 09:16
> 收件人: user; aaron
> 主题: Re: 回复:Weird index out bound Exception
> Also If my server side cache with cache storage in backend, my client side
> also need to configuration this?
>
> as I notice client throw a exception : Spring application context resource
> is not injected;   as my client maybe is a very Simple, not include all the
> configuration available in product.
>
> so Client should not be aware of the server side cache storage.
>
>
> ---
>
>
> Failed to wait for completion of partition map exchange (preloading will not
> start): GridDhtPartitionsExchangeFuture [dummy=false, forcePreload=false,
> reassign=false, discoEvt=DiscoveryCustomEvent [customMsg=null,
> affTopVer=AffinityTopologyVersion [topVer=4, minorTopVer=1],
> super=DiscoveryEvent [evtNode=TcpDiscoveryNode
> [id=a39278cf-4950-49b8-b516-72b821c45088, addrs=[0:0:0:0:0:0:0:1, 127.0.0.1,
> 192.168.1.58, 192.168.56.1, 2001:0:9d38:6ab8:3c42:1ec4:8a6f:e895],
> sockAddrs=[Aaron/192.168.56.1:0, /0:0:0:0:0:0:0:1:0, /127.0.0.1:0,
> /192.168.1.58:0, /2001:0:9d38:6ab8:3c42:1ec4:8a6f:e895:0], discPort=0,
> order=4, intOrder=0, lastExchangeTime=1500253677140, loc=true,
> ver=2.0.0#20170430-sha1:d4eef3c6, isClient=true], topVer=4,
> nodeId8=a39278cf, msg=null, type=DISCOVERY_CUSTOM_EVT,
> tstamp=1500253679239]], crd=TcpDiscoveryNode
> [id=51e73bad-3528-4634-b062-83b57dbdbd0a, addrs=[127.0.0.1, 192.168.1.58,
> 192.168.56.1], sockAddrs=[Aaron/192.168.56.1:47500, /127.0.0.1:47500,
> /192.168.1.58:47500], discPort=47500, order=1, intOrder=1,
> lastExchangeTime=1500253678911, loc=false, ver=2.0.0#20170430-sha1:d4eef3c6,
> isClient=false], exchId=GridDhtPartitionExchangeId
> [topVer=AffinityTopologyVersion [topVer=4, minorTopVer=1], nodeId=a39278cf,
> evt=DISCOVERY_CUSTOM_EVT], added=true, initFut=GridFutureAdapter
> [ignoreInterrupts=false, state=DONE, res=false, hash=146566071], init=false,
> lastVer=null, partReleaseFut=null, affChangeMsg=null, skipPreload=true,
> clientOnlyExchange=false, initTs=1500253679239, centralizedAff=false,
> changeGlobalStateE=null, exchangeOnChangeGlobalState=false,
> forcedRebFut=null, evtLatch=0,
> remaining=[51e73bad-3528-4634-b062-83b57dbdbd0a], srvNodes=[TcpDiscoveryNode
> [id=51e73bad-3528-4634-b062-83b57dbdbd0a, addrs=[127.0.0.1, 192.168.1.58,
> 192.168.56.1], sockAddrs=[Aaron/192.168.56.1:47500, /127.0.0.1:47500,
> /192.168.1.58:47500], discPort=47500, order=1, intOrder=1,
> lastExchangeTime=1500253678911, loc=false, ver=2.0.0#20170430-sha1:d4eef3c6,
> isClient=false]], super=GridFutureAdapter [ignoreInterrupts=false,
> state=DONE, res=class o.a.i.IgniteException: Spring application context
> resource is not injected., hash=1325230042]]
> class org.apache.ignite.IgniteCheckedException: Spring application context
> resource is not injected.
> at org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7242)
> at
> org.apache.ignite.internal.util.future.GridFutureAdapter.resolve(GridFutureAdapter.java:258)
> at
> org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:206)
> at
> org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:158)
> at
> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1812)
> at
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: class org.apache.ignite.IgniteException: Spring application
> context resource is not injected.
> at
> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:171)
> at
> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:100)
> at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1458)
> at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1931)
> at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1833)
> at
> org.apache.ignite.internal.processors.cache.CacheAffinitySharedManager.onCacheChangeRequest(CacheAffinitySharedManager.java:379)
> at
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.onCacheChangeRequest(GridDhtPartitionsExchangeFuture.java:688)
> at
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:529)
> at
> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1806)
> ... 2 more
>
>
>
>
> Regards
> Aaron
> ________________________________
> aaron@tophold.com
>
>
> 发件人: Aaron
> 发送时间: 2017-07-15 09:22
> 收件人: user
> 主题: 回复:Weird index out bound Exception
> Thanks agura,
> so my data node model this cache is REPLICATED,
>
> how client suppose init the Cache configuration and get refer to the cache?
>
> if I init the client cache configuration as REPLICATED, it seem stuck there,
>
> Thanks again for your time!
>
> Regards
> Aaron
>
> ------------------------------------------------------------------
> 发件人:agura <ag...@apache.org>
> 发送时间:2017年7月14日(星期五) 23:38
> 收件人:user <us...@ignite.apache.org>
> 主 题:Re: Weird index out bound Exception
>
> Hi,
>
> I can't reproduce your case. But the issue could occur if you had a
> REPLICATED cache and after some time changed it to PARTITIONED and for
> example call to getOrCreateCache keeping old cache name.
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/Weird-index-out-bound-Exception-tp14905p14920.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>
>

Re: Re:Weird index out bound Exception

Posted by "aaron@tophold.com" <aa...@tophold.com>.
Also another Marshaller issue, I start a client on the same class path. but the Client still  throw  a class not found exception. 

Caused by: java.lang.ClassNotFoundException: Requesting mapping from grid failed for [platformId=0, typeId=-482681703]
at org.apache.ignite.internal.MarshallerContextImpl.getClassName(MarshallerContextImpl.java:376) ~[ignite-core-2.0.0.jar:2.0.0]
at org.apache.ignite.internal.MarshallerContextImpl.getClass(MarshallerContextImpl.java:335) ~[ignite-core-2.0.0.jar:2.0.0]
at org.apache.ignite.internal.binary.BinaryContext.descriptorForTypeId(BinaryContext.java:692) ~[ignite-core-2.0.0.jar:2.0.0]
at org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize0(BinaryReaderExImpl.java:1745) ~[ignite-core-2.0.0.jar:2.0.0]
at org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize(BinaryReaderExImpl.java:1704) ~[ignite-core-2.0.0.jar:2.0.0]
at org.apache.ignite.internal.binary.BinaryObjectImpl.deserializeValue(BinaryObjectImpl.java:794) ~[ignite-core-2.0.0.jar:2.0.0]
at org.apache.ignite.internal.binary.BinaryObjectImpl.value(BinaryObjectImpl.java:142) ~[ignite-core-2.0.0.jar:2.0.0]
at org.apache.ignite.internal.processors.cache.CacheObjectContext.unwrapBinary(CacheObjectContext.java:273) ~[ignite-core-2.0.0.jar:2.0.0]
at org.apache.ignite.internal.processors.cache.CacheObjectContext.unwrapBinaryIfNeeded(CacheObjectContext.java:161) ~[ignite-core-2.0.0.jar:2.0.0]
at org.apache.ignite.internal.processors.cache.CacheObjectContext.unwrapBinaryIfNeeded(CacheObjectContext.java:148) ~[ignite-core-2.0.0.jar:2.0.0]
at org.apache.ignite.internal.processors.cache.GridCacheContext.unwrapBinaryIfNeeded(GridCacheContext.java:1730) ~[ignite-core-2.0.0.jar:2.0.0]
at org.apache.ignite.internal.processors.cache.distributed.dht.GridPartitionedSingleGetFuture.setResult(GridPartitionedSingleGetFuture.java:613) ~[ignite-core-2.0.0.jar:2.0.0]
at org.apache.ignite.internal.processors.cache.distributed.dht.GridPartitionedSingleGetFuture.onResult(GridPartitionedSingleGetFuture.java:475) ~[ignite-core-2.0.0.jar:2.0.0]
at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter.processNearSingleGetResponse(GridDhtCacheAdapter.java:156) ~[ignite-core-2.0.0.jar:2.0.0]
at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.access$1200(GridDhtAtomicCache.java:127) ~[ignite-core-2.0.0.jar:2.0.0]
at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$14.apply(GridDhtAtomicCache.java:416) ~[ignite-core-2.0.0.jar:2.0.0]
at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$14.apply(GridDhtAtomicCache.java:411) ~[ignite-core-2.0.0.jar:2.0.0]
at org.apache.ignite.internal.processors.cache.GridCacheIoManager.processMessage(GridCacheIoManager.java:863) ~[ignite-core-2.0.0.jar:2.0.0]
at org.apache.ignite.internal.processors.cache.GridCacheIoManager.onMessage0(GridCacheIoManager.java:386) ~[ignite-core-2.0.0.jar:2.0.0]
at org.apache.ignite.internal.processors.cache.GridCacheIoManager.handleMessage(GridCacheIoManager.java:308) ~[ignite-core-2.0.0.jar:2.0.0]
at org.apache.ignite.internal.processors.cache.GridCacheIoManager.access$000(GridCacheIoManager.java:100) ~[ignite-core-2.0.0.jar:2.0.0]
at org.apache.ignite.internal.processors.cache.GridCacheIoManager$1.onMessage(GridCacheIoManager.java:253) ~[ignite-core-2.0.0.jar:2.0.0]
at org.apache.ignite.internal.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1257) ~[ignite-core-2.0.0.jar:2.0.0]
at org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:885) ~[ignite-core-2.0.0.jar:2.0.0]
at org.apache.ignite.internal.managers.communication.GridIoManager.access$2100(GridIoManager.java:114) ~[ignite-core-2.0.0.jar:2.0.0]
at org.apache.ignite.internal.managers.communication.GridIoManager$7.run(GridIoManager.java:802) ~[ignite-core-2.0.0.jar:2.0.0]
at org.apache.ignite.internal.util.StripedExecutor$Stripe.run(StripedExecutor.java:483) ~[ignite-core-2.0.0.jar:2.0.0]
at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_102]


Thanks very very much for your time, 

---

My Server side configuration like this:

<bean class="org.apache.ignite.configuration.CacheConfiguration" id="ProductEntry">

    <property name="name" value="#{T(com.tophold.trade.query.product.ProductEntry).IG_CACHE_NAME}"/>
    <property name="cacheMode" value="REPLICATED"/>
    <property name="atomicityMode" value="ATOMIC"/>
    <property name="readFromBackup" value="true"/>
    <property name="copyOnRead" value="true"/>
    <property name="readThrough" value="true"/>
    <property name="writeThrough" value="true"/>

    <property name="nodeFilter">
        <bean class="org.apache.ignite.util.AttributeNodeFilter">
            <constructor-arg index="0"
                             value="#{T(com.tophold.trade.ignite.NodeNeedProductFilter).IGNITE_PRODUCT_NEEDED_NODE_ATTR}"/>
            <constructor-arg index="1"
                             value="true"/>
        </bean>
    </property>

    <property name="nearConfiguration">
        <bean class="org.apache.ignite.configuration.NearCacheConfiguration">
            <property name="nearEvictionPolicy">
                <bean class="org.apache.ignite.cache.eviction.lru.LruEvictionPolicy">
                    <property name="maxSize" value="500"/>
                </bean>
            </property>
        </bean>
    </property>


    <property name="storeKeepBinary" value="true"/>

    <property name="cacheStoreFactory">
        <bean class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory">

            <property name="dataSourceBean" value="igniteDatasource"/>


            <property name="types">
                <list>
                    <bean class="org.apache.ignite.cache.store.jdbc.JdbcType">

                        <property name="cacheName"
                                  value="#{T(com.tophold.trade.query.product.ProductEntry).IG_CACHE_NAME}"/>
                        <property name="keyType"
                                  value="#{T(com.tophold.trade.query.product.ProductEntry).IG_KEY_TYPE}"/>
                        <property name="valueType"
                                  value="#{T(com.tophold.trade.query.product.ProductEntry).IG_VALUE_TYPE}"/>
                        <property name="databaseTable"
                                  value="#{T(com.tophold.trade.query.product.ProductEntry).IG_DB_TB}"/>

                        <property name="keyFields">
                            <list>
                                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
                                    <property name="databaseFieldName" value="productCode"/>
                                    <property name="databaseFieldType" value="#{T(java.sql.Types).VARCHAR}"/>
                                    <property name="javaFieldName" value="productCode"/>
                                    <property name="javaFieldType" value="java.lang.String"/>
                                </bean>
                            </list>
                        </property>

                        <property name="valueFields">
                            <list>

                                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
                                    <property name="databaseFieldName" value="productCode"/>
                                    <property name="databaseFieldType" value="#{T(java.sql.Types).VARCHAR}"/>
                                    <property name="javaFieldName" value="productCode"/>
                                    <property name="javaFieldType" value="java.lang.String"/>
                                </bean>

                                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
                                    <property name="databaseFieldName" value="identifier"/>
                                    <property name="databaseFieldType" value="#{T(java.sql.Types).VARCHAR}"/>
                                    <property name="javaFieldName" value="identifier"/>
                                    <property name="javaFieldType" value="java.lang.String"/>
                                </bean>

                                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
                                    <property name="databaseFieldName" value="active"/>
                                    <property name="databaseFieldType" value="#{T(java.sql.Types).BOOLEAN}"/>
                                    <property name="javaFieldName" value="active"/>
                                    <property name="javaFieldType" value="java.lang.Boolean"/>
                                </bean>

                                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
                                    <property name="databaseFieldName" value="deleted"/>
                                    <property name="databaseFieldType" value="#{T(java.sql.Types).BOOLEAN}"/>
                                    <property name="javaFieldName" value="deleted"/>
                                    <property name="javaFieldType" value="java.lang.Boolean"/>
                                </bean>

                                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
                                    <property name="databaseFieldName" value="extraId"/>
                                    <property name="databaseFieldType" value="#{T(java.sql.Types).BIGINT}"/>
                                    <property name="javaFieldName" value="extraId"/>
                                    <property name="javaFieldType" value="java.lang.Long"/>
                                </bean>

                                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
                                    <property name="databaseFieldName" value="currency"/>
                                    <property name="databaseFieldType" value="#{T(java.sql.Types).VARCHAR}"/>
                                    <property name="javaFieldName" value="currency"/>
                                    <property name="javaFieldType" value="java.lang.String"/>
                                </bean>

                                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
                                    <property name="databaseFieldName" value="fromCurrency"/>
                                    <property name="databaseFieldType" value="#{T(java.sql.Types).VARCHAR}"/>
                                    <property name="javaFieldName" value="fromCurrency"/>
                                    <property name="javaFieldType" value="java.lang.String"/>
                                </bean>

                                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
                                    <property name="databaseFieldName" value="leverage"/>
                                    <property name="databaseFieldType" value="#{T(java.sql.Types).INTEGER}"/>
                                    <property name="javaFieldName" value="leverage"/>
                                    <property name="javaFieldType" value="java.lang.Integer"/>
                                </bean>

                                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
                                    <property name="databaseFieldName" value="exchanger"/>
                                    <property name="databaseFieldType" value="#{T(java.sql.Types).VARCHAR}"/>
                                    <property name="javaFieldName" value="exchanger"/>
                                    <property name="javaFieldType" value="com.tophold.trade.product.Exchanger"/>
                                </bean>

                                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
                                    <property name="databaseFieldName" value="sequence"/>
                                    <property name="databaseFieldType" value="#{T(java.sql.Types).BIGINT}"/>
                                    <property name="javaFieldName" value="sequence"/>
                                    <property name="javaFieldType" value="java.lang.Long"/>
                                </bean>

                            </list>
                        </property>
                    </bean>
                </list>
            </property>
        </bean>
    </property>


    <property name="queryEntities">
        <list>
            <bean class="org.apache.ignite.cache.QueryEntity">
                <property name="keyType" value="#{T(com.tophold.trade.query.product.ProductEntry).IG_KEY_TYPE}"/>
                <property name="valueType"
                          value="#{T(com.tophold.trade.query.product.ProductEntry).IG_VALUE_TYPE}"/>
                <property name="fields">
                    <map>
                        <entry key="productCode" value="java.lang.String"/>
                        <entry key="identifier" value="java.lang.String"/>
                        <entry key="active" value="java.lang.Boolean"/>
                        <entry key="deleted" value="java.lang.Boolean"/>
                        <entry key="extraId" value="java.lang.Long"/>
                        <entry key="currency" value="java.lang.String"/>
                        <entry key="fromCurrency" value="java.lang.String"/>
                        <entry key="leverage" value="java.lang.Integer"/>
                        <entry key="exchanger" value="com.tophold.trade.product.Exchanger"/>
                        <entry key="sequence" value="java.lang.Long"/>
                    </map>
                </property>

                <property name="indexes">
                    <list>
                        <bean class="org.apache.ignite.cache.QueryIndex">
                            <constructor-arg value="productCode"/>
                        </bean>
                    </list>
                </property>
            </bean>
        </list>
    </property>
</bean>


Regards


aaron@tophold.com
 
发件人: aaron@tophold.com
发送时间: 2017-07-17 09:26
收件人: user
主题: Re: Re:Weird index out bound Exception
Also what's the different between the #getOrCreateCache  and #cache.

So if a pure client query side which API should prefer?  very appreciate your time. I'm a newer to the Ignite. 


Regards


aaron@tophold.com
 
发件人: aaron@tophold.com
发送时间: 2017-07-17 09:16
收件人: user; aaron
主题: Re: 回复:Weird index out bound Exception
Also If my server side cache with cache storage in backend, my client side also need to configuration this? 

as I notice client throw a exception : Spring application context resource is not injected;   as my client maybe is a very Simple, not include all the configuration available in product. 

so Client should not be aware of the server side cache storage.  


---


Failed to wait for completion of partition map exchange (preloading will not start): GridDhtPartitionsExchangeFuture [dummy=false, forcePreload=false, reassign=false, discoEvt=DiscoveryCustomEvent [customMsg=null, affTopVer=AffinityTopologyVersion [topVer=4, minorTopVer=1], super=DiscoveryEvent [evtNode=TcpDiscoveryNode [id=a39278cf-4950-49b8-b516-72b821c45088, addrs=[0:0:0:0:0:0:0:1, 127.0.0.1, 192.168.1.58, 192.168.56.1, 2001:0:9d38:6ab8:3c42:1ec4:8a6f:e895], sockAddrs=[Aaron/192.168.56.1:0, /0:0:0:0:0:0:0:1:0, /127.0.0.1:0, /192.168.1.58:0, /2001:0:9d38:6ab8:3c42:1ec4:8a6f:e895:0], discPort=0, order=4, intOrder=0, lastExchangeTime=1500253677140, loc=true, ver=2.0.0#20170430-sha1:d4eef3c6, isClient=true], topVer=4, nodeId8=a39278cf, msg=null, type=DISCOVERY_CUSTOM_EVT, tstamp=1500253679239]], crd=TcpDiscoveryNode [id=51e73bad-3528-4634-b062-83b57dbdbd0a, addrs=[127.0.0.1, 192.168.1.58, 192.168.56.1], sockAddrs=[Aaron/192.168.56.1:47500, /127.0.0.1:47500, /192.168.1.58:47500], discPort=47500, order=1, intOrder=1, lastExchangeTime=1500253678911, loc=false, ver=2.0.0#20170430-sha1:d4eef3c6, isClient=false], exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=4, minorTopVer=1], nodeId=a39278cf, evt=DISCOVERY_CUSTOM_EVT], added=true, initFut=GridFutureAdapter [ignoreInterrupts=false, state=DONE, res=false, hash=146566071], init=false, lastVer=null, partReleaseFut=null, affChangeMsg=null, skipPreload=true, clientOnlyExchange=false, initTs=1500253679239, centralizedAff=false, changeGlobalStateE=null, exchangeOnChangeGlobalState=false, forcedRebFut=null, evtLatch=0, remaining=[51e73bad-3528-4634-b062-83b57dbdbd0a], srvNodes=[TcpDiscoveryNode [id=51e73bad-3528-4634-b062-83b57dbdbd0a, addrs=[127.0.0.1, 192.168.1.58, 192.168.56.1], sockAddrs=[Aaron/192.168.56.1:47500, /127.0.0.1:47500, /192.168.1.58:47500], discPort=47500, order=1, intOrder=1, lastExchangeTime=1500253678911, loc=false, ver=2.0.0#20170430-sha1:d4eef3c6, isClient=false]], super=GridFutureAdapter [ignoreInterrupts=false, state=DONE, res=class o.a.i.IgniteException: Spring application context resource is not injected., hash=1325230042]]
class org.apache.ignite.IgniteCheckedException: Spring application context resource is not injected.
at org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7242)
at org.apache.ignite.internal.util.future.GridFutureAdapter.resolve(GridFutureAdapter.java:258)
at org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:206)
at org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:158)
at org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1812)
at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
at java.lang.Thread.run(Thread.java:745)
Caused by: class org.apache.ignite.IgniteException: Spring application context resource is not injected.
at org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:171)
at org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:100)
at org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1458)
at org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1931)
at org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1833)
at org.apache.ignite.internal.processors.cache.CacheAffinitySharedManager.onCacheChangeRequest(CacheAffinitySharedManager.java:379)
at org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.onCacheChangeRequest(GridDhtPartitionsExchangeFuture.java:688)
at org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:529)
at org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1806)
... 2 more




Regards
Aaron


aaron@tophold.com
 
发件人: Aaron
发送时间: 2017-07-15 09:22
收件人: user
主题: 回复:Weird index out bound Exception
Thanks agura, 
so my data node model this cache is REPLICATED, 

how client suppose init the Cache configuration and get refer to the cache? 

if I init the client cache configuration as REPLICATED, it seem stuck there, 

Thanks again for your time!

Regards
Aaron

------------------------------------------------------------------
发件人:agura <ag...@apache.org>
发送时间:2017年7月14日(星期五) 23:38
收件人:user <us...@ignite.apache.org>
主 题:Re: Weird index out bound Exception

Hi,

I can't reproduce your case. But the issue could occur if you had a
REPLICATED cache and after some time changed it to PARTITIONED and for
example call to getOrCreateCache keeping old cache name.



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Weird-index-out-bound-Exception-tp14905p14920.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.