You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Pothanaboyina <ba...@techouts.com> on 2017/05/25 09:40:30 UTC
i am tring to load mongo store but i am getting this messege
[14:28:10,334][ERROR][exchange-worker-#29%null%][GridDhtPartitionsExchangeFuture]
Failed to reinitialize local partitions (preloading will be stopped):
GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=1,
minorTopVer=1], nodeId=d8a6d5d6, evt=DISCOVERY_CUSTOM_EVT]
class org.apache.ignite.IgniteException: Either transaction manager or data
source is required by CacheSpringStoreSessionListener.
at
org.apache.ignite.cache.store.spring.CacheSpringStoreSessionListener.start(CacheSpringStoreSessionListener.java:118)
at
org.apache.ignite.internal.processors.cache.GridCacheUtils.startStoreSessionListeners(GridCacheUtils.java:1527)
at
org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.start0(GridCacheStoreManagerAdapter.java:230)
at
org.apache.ignite.internal.processors.cache.store.CacheOsStoreManager.start0(CacheOsStoreManager.java:64)
at
org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter.start(GridCacheManagerAdapter.java:50)
at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:1243)
at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1943)
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)
at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
at java.lang.Thread.run(Thread.java:745)
@SuppressWarnings({ "unchecked", "serial" })
public static void main(String[] args) {
// TODO Auto-generated method stub
try (Ignite ignite =
Ignition.start("examples/config/example-ignite.xml")) {
System.out.println();
System.out.println(">>> Cache store example started.");
CacheConfiguration<Long, Employee> cacheCfg = new
CacheConfiguration<>(CACHE_NAME);
cacheCfg.setAtomicityMode(TRANSACTIONAL);
// Configure Spring store.
@SuppressWarnings("unused")
CacheSpringEmployeeStore store=new CacheSpringEmployeeStore();
cacheCfg.setCacheStoreFactory(FactoryBuilder.factoryOf(CacheSpringEmployeeStore.class));
cacheCfg.setReadThrough(true);
cacheCfg.setWriteThrough(true);
// Configure Spring session listener.
cacheCfg.setCacheStoreSessionListenerFactories(new
Factory<CacheStoreSessionListener>() {
@Override public CacheStoreSessionListener create() {
CacheSpringStoreSessionListener lsnr = new
CacheSpringStoreSessionListener();
lsnr.setDataSource(JdbcConnectionPool.create("jdbc:h2:tcp://localhost/mem:ExampleDb",
"sa", ""));
return lsnr;
}
});
cacheCfg.setReadThrough(true);
cacheCfg.setWriteThrough(true);
try (IgniteCache<Long, Employee> cache =
ignite.getOrCreateCache(cacheCfg)) {
// Make initial cache loading from persistent store. This
is a
// distributed operation and will call
CacheStore.loadCache(...)
// method on all nodes in topology.
// loadCache(cache);
// Start transaction and execute several cache operations
with
// read/write-through to persistent store.
executeTransaction(cache);
Employee val = cache.get(id);
System.out.println("Read value: " + val.getName());
}
finally {
// Distributed cache could be removed from cluster only by
#destroyCache() call.
ignite.destroyCache(CACHE_NAME);
}
}
}
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/i-am-tring-to-load-mongo-store-but-i-am-getting-this-messege-tp13144.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: i am tring to load mongo store but i am getting this messege
Posted by Pothanaboyina <ba...@techouts.com>.
I am Using below version
apache-ignite-fabric-2.0.0-bin,
now the issue has been resolved i am able to connect to mongo store,but i am
not able to use mongotemplate implementation for connecting the mongo store
through cache store implementation,so i started using simple mongo jdbc jar
for establishing the connection ,may i know what is the reason for
mongotemplate is not available in the cache store ?what is the probability
to make it available the spring container loaded custom or oob classes
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/i-am-tring-to-load-mongo-store-but-i-am-getting-this-messege-tp13144p14587.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: i am tring to load mongo store but i am getting this messege
Posted by Andrey Mashenkov <an...@gmail.com>.
Hi,
Looks like, it is impossible to get such exception regarding master branch
code.
What ignite version do you use?
On Thu, May 25, 2017 at 12:40 PM, Pothanaboyina <ba...@techouts.com>
wrote:
> [14:28:10,334][ERROR][exchange-worker-#29%null%][
> GridDhtPartitionsExchangeFuture]
> Failed to reinitialize local partitions (preloading will be stopped):
> GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=1,
> minorTopVer=1], nodeId=d8a6d5d6, evt=DISCOVERY_CUSTOM_EVT]
> class org.apache.ignite.IgniteException: Either transaction manager or
> data
> source is required by CacheSpringStoreSessionListener.
> at
> org.apache.ignite.cache.store.spring.CacheSpringStoreSessionListene
> r.start(CacheSpringStoreSessionListener.java:118)
> at
> org.apache.ignite.internal.processors.cache.GridCacheUtils.
> startStoreSessionListeners(GridCacheUtils.java:1527)
> at
> org.apache.ignite.internal.processors.cache.store.
> GridCacheStoreManagerAdapter.start0(GridCacheStoreManagerAdapter.java:230)
> at
> org.apache.ignite.internal.processors.cache.store.
> CacheOsStoreManager.start0(CacheOsStoreManager.java:64)
> at
> org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter.start(
> GridCacheManagerAdapter.java:50)
> at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(
> GridCacheProcessor.java:1243)
> at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.
> prepareCacheStart(GridCacheProcessor.java:1943)
> 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(GridDhtPartitionsExchangeFutur
> e.java:529)
> at
> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeMana
> ger$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1806)
> at
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
> at java.lang.Thread.run(Thread.java:745)
>
>
>
>
>
> @SuppressWarnings({ "unchecked", "serial" })
> public static void main(String[] args) {
> // TODO Auto-generated method stub
>
> try (Ignite ignite =
> Ignition.start("examples/config/example-ignite.xml")) {
> System.out.println();
> System.out.println(">>> Cache store example started.");
> CacheConfiguration<Long, Employee> cacheCfg = new
> CacheConfiguration<>(CACHE_NAME);
> cacheCfg.setAtomicityMode(TRANSACTIONAL);
> // Configure Spring store.
> @SuppressWarnings("unused")
> CacheSpringEmployeeStore store=new
> CacheSpringEmployeeStore();
>
> cacheCfg.setCacheStoreFactory(FactoryBuilder.factoryOf(
> CacheSpringEmployeeStore.class));
> cacheCfg.setReadThrough(true);
> cacheCfg.setWriteThrough(true);
> // Configure Spring session listener.
> cacheCfg.setCacheStoreSessionListenerFactories(new
> Factory<CacheStoreSessionListener>() {
> @Override public CacheStoreSessionListener
> create() {
> CacheSpringStoreSessionListener lsnr = new
> CacheSpringStoreSessionListener();
>
>
> lsnr.setDataSource(JdbcConnectionPool.create("jdbc:h2:tcp://localhost/mem:
> ExampleDb",
> "sa", ""));
>
>
> return lsnr;
> }
> });
>
> cacheCfg.setReadThrough(true);
> cacheCfg.setWriteThrough(true);
>
> try (IgniteCache<Long, Employee> cache =
> ignite.getOrCreateCache(cacheCfg)) {
> // Make initial cache loading from persistent
> store. This
> is a
> // distributed operation and will call
> CacheStore.loadCache(...)
> // method on all nodes in topology.
> // loadCache(cache);
>
> // Start transaction and execute several cache
> operations
> with
> // read/write-through to persistent store.
> executeTransaction(cache);
> Employee val = cache.get(id);
>
> System.out.println("Read value: " + val.getName());
> }
> finally {
> // Distributed cache could be removed from cluster
> only by
> #destroyCache() call.
> ignite.destroyCache(CACHE_NAME);
> }
> }
>
> }
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/i-am-tring-to-load-mongo-store-but-
> i-am-getting-this-messege-tp13144.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>
--
Best regards,
Andrey V. Mashenkov