Hi,
This is the code fragment from MyIgniteTest.scala:
val cassandraDataSource = new DataSource
cassandraDataSource.setContactPoints("10.0.0.1")
val robinPolicy = new RoundRobinPolicy
cassandraDataSource.setLoadBalancingPolicy(robinPolicy)
cassandraDataSource.setReadConsistency("ONE")
cassandraDataSource.setWriteConsistency("ONE")
// Read the persistence settings for Cassandra Key-Value persistance
val persistenceSettings = new
KeyValuePersistenceSettings("./src/main/resources/default-cassandra-store.xml")
// Define Cassandra cache store factory, set the cassandra
dataSource and persistence settings
val cassandraCacheStoreFactory = new CassandraCacheStoreFactory
cassandraCacheStoreFactory.setDataSource(cassandraDataSource)
cassandraCacheStoreFactory.setPersistenceSettings(persistenceSettings)
// Define the cache configuration, set the
cassandraCacheStoreFactory as cacheStoreFactory , enable write
through, write behind and read through
val cassandraConfiguration = new CacheConfiguration
cassandraConfiguration.setCacheStoreFactory(cassandraCacheStoreFactory)
// Sets the cache configuration
val cfg = new IgniteConfiguration
cfg.setCacheConfiguration(cassandraConfiguration)
// Starting Ignite.
Ignition.setClientMode(true)
val ignite = Ignition.start(cfg)
Thanks,
Max
On Mon, 11 Feb 2019 at 07:58, Ilya Kasnacheev <[email protected]>
wrote:
> Hello!
>
> How do you pass CassandraCacheStoreFactory to your cache configuration?
>
> I can see XML fragment and code fragment in your first message, which one
> are you using? In your code fragment there's no call of cache configuration
> setter.
>
> Regards,
> --
> Ilya Kasnacheev
>
>
> пт, 8 февр. 2019 г. в 23:01, Max Barrios <[email protected]>:
>
>> Hi,
>>
>> Stack trace is below:
>>
>> [error] 19/02/07 22:17:14 ERROR GridDhtPartitionsExchangeFuture: Failed to
>> reinitialize local partitions (preloading will be stopped):
>> GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=10,
>> minorTopVer=0], discoEvt=DiscoveryEvent [evtNode=TcpDiscoveryNode
>> [id=0a3b5352-592c-450c-912c-7fe401cc4415, addrs=[0:0:0:0:0:0:0:1%lo,
>> 10.0.0.1, 127.0.0.1], sockAddrs=[ignite-node-01/10.0.0.1:0,
>> /0:0:0:0:0:0:0:1%lo:0, /127.0.0.1:0], discPort=0, order=10, intOrder=0,
>> lastExchangeTime=1549577833007, loc=true, ver=2.6.0#20180710-sha1:669feacc,
>> isClient=true], topVer=10, nodeId8=0a3b5352, msg=null, type=NODE_JOINED,
>> tstamp=1549577833993], nodeId=0a3b5352, evt=NODE_JOINED]
>> [error] java.lang.IllegalStateException: Failed to get Cassandra DataSource
>> cause Spring application context wasn't injected into
>> CassandraCacheStoreFactory
>> [error] at
>> org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory.getDataSource(CassandraCacheStoreFactory.java:124)
>> [error] at
>> org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory.create(CassandraCacheStoreFactory.java:59)
>> [error] at
>> org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory.create(CassandraCacheStoreFactory.java:34)
>> [error] at
>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1437)
>> [error] at
>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1945)
>> [error] at
>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCachesOnLocalJoin(GridCacheProcessor.java:1830)
>> [error] at
>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.initCachesOnLocalJoin(GridDhtPartitionsExchangeFuture.java:792)
>> [error] at
>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:674)
>> [error] at
>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body0(GridCachePartitionExchangeManager.java:2419)
>> [error] at
>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2299)
>> [error] at
>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>> [error] at java.lang.Thread.run(Thread.java:748)
>> [error] 19/02/07 22:17:14 INFO GridDhtPartitionsExchangeFuture: Finish
>> exchange future [startVer=AffinityTopologyVersion [topVer=10,
>> minorTopVer=0], resVer=null, err=java.lang.IllegalStateException: Failed to
>> get Cassandra DataSource cause Spring application context wasn't injected
>> into CassandraCacheStoreFactory]
>> [error] 19/02/07 22:17:14 ERROR IgniteKernal: Got exception while starting
>> (will rollback startup routine).
>> [error] class org.apache.ignite.IgniteCheckedException: Failed to get
>> Cassandra DataSource cause Spring application context wasn't injected into
>> CassandraCacheStoreFactory
>> [error] at
>> org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7307)
>> [error] at
>> org.apache.ignite.internal.util.future.GridFutureAdapter.resolve(GridFutureAdapter.java:259)
>> [error] at
>> org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:232)
>> [error] at
>> org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:159)
>> [error] at
>> org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:151)
>> [error] at
>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager.onKernalStart(GridCachePartitionExchangeManager.java:635)
>> [error] at
>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStart(GridCacheProcessor.java:875)
>> [error] at
>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:1086)
>> [error] at
>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:2014)
>> [error] at
>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1723)
>> [error] at
>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1151)
>> [error] at
>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:671)
>> [error] at
>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:611)
>> [error] at org.apache.ignite.Ignition.getOrStart(Ignition.java:419)
>> [error] at
>> org.apache.ignite.spark.IgniteContext.ignite(IgniteContext.scala:150)
>> [error] at
>> org.apache.ignite.spark.IgniteContext.<init>(IgniteContext.scala:63)
>> [error] at
>> org.apache.ignite.spark.IgniteContext.<init>(IgniteContext.scala:86)
>> [error] at MyIgniteTest$.main(MyIgniteTest.scala:160)
>> [error] at MyIgniteTest.main(MyIgniteTest.scala)
>> [error] Caused by: java.lang.IllegalStateException: Failed to get Cassandra
>> DataSource cause Spring application context wasn't injected into
>> CassandraCacheStoreFactory
>> [error] at
>> org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory.getDataSource(CassandraCacheStoreFactory.java:124)
>> [error] at
>> org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory.create(CassandraCacheStoreFactory.java:59)
>> [error] at
>> org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory.create(CassandraCacheStoreFactory.java:34)
>> [error] at
>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1437)
>> [error] at
>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1945)
>> [error] at
>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCachesOnLocalJoin(GridCacheProcessor.java:1830)
>> [error] at
>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.initCachesOnLocalJoin(GridDhtPartitionsExchangeFuture.java:792)
>> [error] at
>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:674)
>> [error] at
>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body0(GridCachePartitionExchangeManager.java:2419)
>> [error] at
>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2299)
>> [error] at
>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>> [error] at java.lang.Thread.run(Thread.java:748)
>> [error] 19/02/07 22:17:14 ERROR GridCachePartitionExchangeManager: Failed to
>> wait for completion of partition map exchange (preloading will not start):
>> GridDhtPartitionsExchangeFuture [firstDiscoEvt=DiscoveryEvent
>> [evtNode=TcpDiscoveryNode [id=0a3b5352-592c-450c-912c-7fe401cc4415,
>> addrs=[0:0:0:0:0:0:0:1%lo, 10.0.0.1, 127.0.0.1],
>> sockAddrs=[ignite-node-01/10.0.0.1:0, /0:0:0:0:0:0:0:1%lo:0, /127.0.0.1:0],
>> discPort=0, order=10, intOrder=0, lastExchangeTime=1549577833007, loc=true,
>> ver=2.6.0#20180710-sha1:669feacc, isClient=true], topVer=10,
>> nodeId8=0a3b5352, msg=null, type=NODE_JOINED, tstamp=1549577833993],
>> crd=TcpDiscoveryNode [id=56340b23-60c1-4d7d-a19e-fb51066b4858,
>> addrs=[0:0:0:0:0:0:0:1%lo, 10.0.0.1, 127.0.0.1],
>> sockAddrs=[/0:0:0:0:0:0:0:1%lo:47500, /127.0.0.1:47500,
>> ignite-node-01/10.0.0.1:47500], discPort=47500, order=1, intOrder=1,
>> lastExchangeTime=1549577833932, loc=false, ver=2.6.0#20180710-sha1:669feacc,
>> isClient=false], exchId=GridDhtPartitionExchangeId
>> [topVer=AffinityTopologyVersion [topVer=10, minorTopVer=0],
>> discoEvt=DiscoveryEvent [evtNode=TcpDiscoveryNode
>> [id=0a3b5352-592c-450c-912c-7fe401cc4415, addrs=[0:0:0:0:0:0:0:1%lo,
>> 10.0.0.1, 127.0.0.1], sockAddrs=[ignite-node-01/10.0.0.1:0,
>> /0:0:0:0:0:0:0:1%lo:0, /127.0.0.1:0], discPort=0, order=10, intOrder=0,
>> lastExchangeTime=1549577833007, loc=true, ver=2.6.0#20180710-sha1:669feacc,
>> isClient=true], topVer=10, nodeId8=0a3b5352, msg=null, type=NODE_JOINED,
>> tstamp=1549577833993], nodeId=0a3b5352, evt=NODE_JOINED], added=true,
>> initFut=GridFutureAdapter [ignoreInterrupts=false, state=DONE, res=false,
>> hash=786357198], init=false, lastVer=null, partReleaseFut=null,
>> exchActions=null, affChangeMsg=null, initTs=1549577834024,
>> centralizedAff=false, forceAffReassignment=false, changeGlobalStateE=null,
>> done=true, state=CLIENT, evtLatch=0,
>> remaining=[56340b23-60c1-4d7d-a19e-fb51066b4858,
>> 38b9e6a1-131d-43c9-aac2-60d129faa9bd, e9f79e0b-00eb-4752-afc5-be91185d56c4],
>> super=GridFutureAdapter [ignoreInterrupts=false, state=DONE,
>> res=java.lang.IllegalStateException: Failed to get Cassandra DataSource
>> cause Spring application context wasn't injected into
>> CassandraCacheStoreFactory, hash=21748544]]
>> [error] class org.apache.ignite.IgniteCheckedException: Failed to get
>> Cassandra DataSource cause Spring application context wasn't injected into
>> CassandraCacheStoreFactory
>> [error] at
>> org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7307)
>> [error] at
>> org.apache.ignite.internal.util.future.GridFutureAdapter.resolve(GridFutureAdapter.java:259)
>> [error] at
>> org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:207)
>> [error] at
>> org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:159)
>> [error] at
>> org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:151)
>> [error] at
>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body0(GridCachePartitionExchangeManager.java:2433)
>> [error] at
>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2299)
>> [error] at
>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>> [error] at java.lang.Thread.run(Thread.java:748)
>> [error] Caused by: java.lang.IllegalStateException: Failed to get Cassandra
>> DataSource cause Spring application context wasn't injected into
>> CassandraCacheStoreFactory
>> [error] at
>> org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory.getDataSource(CassandraCacheStoreFactory.java:124)
>> [error] at
>> org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory.create(CassandraCacheStoreFactory.java:59)
>> [error] at
>> org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory.create(CassandraCacheStoreFactory.java:34)
>> [error] at
>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1437)
>> [error] at
>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1945)
>> [error] at
>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCachesOnLocalJoin(GridCacheProcessor.java:1830)
>> [error] at
>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.initCachesOnLocalJoin(GridDhtPartitionsExchangeFuture.java:792)
>> [error] at
>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:674)
>> [error] at
>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body0(GridCachePartitionExchangeManager.java:2419)
>> [error] ... 3 more
>> [error] 19/02/07 22:17:14 INFO GridCacheProcessor: Stopped cache
>> [cacheName=ignite-sys-cache]
>> [error] 19/02/07 22:17:14 INFO IgniteKernal:
>> [error] >>>
>> +---------------------------------------------------------------------------------+
>> [error] >>> Ignite ver.
>> 2.6.0#20180710-sha1:669feacc5d3a4e60efcdd300dc8de99780f38eed stopped OK
>> [error] >>>
>> +---------------------------------------------------------------------------------+
>> [error] >>> Grid uptime: 00:00:02.620
>> [error] 19/02/07 22:17:14 ERROR IgniteContext: Failed to start Ignite.
>> [error] class org.apache.ignite.IgniteException: Failed to get Cassandra
>> DataSource cause Spring application context wasn't injected into
>> CassandraCacheStoreFactory
>> [error] at
>> org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:990)
>> [error] at org.apache.ignite.Ignition.getOrStart(Ignition.java:422)
>> [error] at
>> org.apache.ignite.spark.IgniteContext.ignite(IgniteContext.scala:150)
>> [error] at
>> org.apache.ignite.spark.IgniteContext.<init>(IgniteContext.scala:63)
>> [error] at
>> org.apache.ignite.spark.IgniteContext.<init>(IgniteContext.scala:86)
>> [error] at MyIgniteTest$.main(MyIgniteTest.scala:160)
>> [error] at MyIgniteTest.main(MyIgniteTest.scala)
>> [error] Caused by: class org.apache.ignite.IgniteCheckedException: Failed to
>> get Cassandra DataSource cause Spring application context wasn't injected
>> into CassandraCacheStoreFactory
>> [error] at
>> org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7307)
>> [error] at
>> org.apache.ignite.internal.util.future.GridFutureAdapter.resolve(GridFutureAdapter.java:259)
>> [error] at
>> org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:232)
>> [error] at
>> org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:159)
>> [error] at
>> org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:151)
>> [error] at
>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager.onKernalStart(GridCachePartitionExchangeManager.java:635)
>> [error] at
>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStart(GridCacheProcessor.java:875)
>> [error] at
>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:1086)
>> [error] at
>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:2014)
>> [error] at
>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1723)
>> [error] at
>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1151)
>> [error] at
>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:671)
>> [error] at
>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:611)
>> [error] at org.apache.ignite.Ignition.getOrStart(Ignition.java:419)
>> [error] ... 5 more
>> [error] Caused by: java.lang.IllegalStateException: Failed to get Cassandra
>> DataSource cause Spring application context wasn't injected into
>> CassandraCacheStoreFactory
>> [error] at
>> org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory.getDataSource(CassandraCacheStoreFactory.java:124)
>> [error] at
>> org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory.create(CassandraCacheStoreFactory.java:59)
>> [error] at
>> org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory.create(CassandraCacheStoreFactory.java:34)
>> [error] at
>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1437)
>> [error] at
>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1945)
>> [error] at
>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCachesOnLocalJoin(GridCacheProcessor.java:1830)
>> [error] at
>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.initCachesOnLocalJoin(GridDhtPartitionsExchangeFuture.java:792)
>> [error] at
>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:674)
>> [error] at
>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body0(GridCachePartitionExchangeManager.java:2419)
>> [error] at
>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2299)
>> [error] at
>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>> [error] at java.lang.Thread.run(Thread.java:748)
>> [error] Exception in thread "main" class org.apache.ignite.IgniteException:
>> Failed to get Cassandra DataSource cause Spring application context wasn't
>> injected into CassandraCacheStoreFactory
>> [error] at
>> org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:990)
>> [error] at org.apache.ignite.Ignition.getOrStart(Ignition.java:422)
>> [error] at
>> org.apache.ignite.spark.IgniteContext.ignite(IgniteContext.scala:150)
>> [error] at
>> org.apache.ignite.spark.IgniteContext.<init>(IgniteContext.scala:63)
>> [error] at
>> org.apache.ignite.spark.IgniteContext.<init>(IgniteContext.scala:86)
>> [error] at MyIgniteTest$.main(MyIgniteTest.scala:160)
>> [error] at MyIgniteTest.main(MyIgniteTest.scala)
>> [error] Caused by: class org.apache.ignite.IgniteCheckedException: Failed to
>> get Cassandra DataSource cause Spring application context wasn't injected
>> into CassandraCacheStoreFactory
>> [error] at
>> org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7307)
>> [error] at
>> org.apache.ignite.internal.util.future.GridFutureAdapter.resolve(GridFutureAdapter.java:259)
>> [error] at
>> org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:232)
>> [error] at
>> org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:159)
>> [error] at
>> org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:151)
>> [error] at
>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager.onKernalStart(GridCachePartitionExchangeManager.java:635)
>> [error] at
>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStart(GridCacheProcessor.java:875)
>> [error] at
>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:1086)
>> [error] at
>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:2014)
>> [error] at
>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1723)
>> [error] at
>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1151)
>> [error] at
>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:671)
>> [error] at
>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:611)
>> name := "myignitetest"
>> [error] at org.apache.ignite.Ignition.getOrStart(Ignition.java:419)
>> [error] ... 5 more
>> [error] Caused by: java.lang.IllegalStateException: Failed to get Cassandra
>> DataSource cause Spring application context wasn't injected into
>> CassandraCacheStoreFactory
>> Added com.google.common 1.6 dependancy
>> [error] at
>> org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory.getDataSource(CassandraCacheStoreFactory.java:124)
>> [error] at
>> org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory.create(CassandraCacheStoreFactory.java:59)
>> [error] at
>> org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory.create(CassandraCacheStoreFactory.java:34)
>> [error] at
>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1437)
>> [error] at
>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1945)
>> [error] at
>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCachesOnLocalJoin(GridCacheProcessor.java:1830)
>> [error] at
>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.initCachesOnLocalJoin(GridDhtPartitionsExchangeFuture.java:792)
>>
>>
>> Thanks!
>>
>> Max
>>
>> On Fri, 8 Feb 2019 at 01:26, Ilya Kasnacheev <[email protected]>
>> wrote:
>>
>>> Hello!
>>>
>>> Can you provide stack trace of the exception?
>>>
>>> Regards,
>>> --
>>> Ilya Kasnacheev
>>>
>>>
>>> пт, 8 февр. 2019 г. в 01:33, Max Barrios <[email protected]>:
>>>
>>>> FYI I am using Ignite Fabric 2.6.0. We use Spark 2.3.2 / Hadoop 2.8.5
>>>> so upgrading to Ignite 2.7.0 means upgrading Spark/Hadoop.
>>>>
>>>> On Thu, 7 Feb 2019 at 11:58, Max Barrios <[email protected]>
>>>> wrote:
>>>>
>>>>> As far as I know, yes. Where would/should I look to check?
>>>>>
>>>>> Also, do I need to copy the ignite cassandra libraries to my client
>>>>> to build that client?
>>>>>
>>>>> On Thu, 7 Feb 2019 at 06:47, Ilya Kasnacheev <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> Hello!
>>>>>>
>>>>>> This is unusual, since you have set cassandraDataSource directly and
>>>>>> bean/app context should not be checked when you do.
>>>>>> Are you sure that it is the only cassandra cache store factory that
>>>>>> gets used in actual caches?
>>>>>>
>>>>>> Regards,
>>>>>> --
>>>>>> Ilya Kasnacheev
>>>>>>
>>>>>>
>>>>>> чт, 7 февр. 2019 г. в 05:59, Max Barrios <[email protected]>:
>>>>>>
>>>>>>> I am running an application written in Scala that is using Spark,
>>>>>>> Ignite, and persisting from writeThrough cache to Cassandra. From the
>>>>>>> Ignite base concepts code you are supposed to set the CacheStoreFactory
>>>>>>> as
>>>>>>> such:
>>>>>>>
>>>>>>> <property name="cacheStoreFactory">
>>>>>>> <bean
>>>>>>> class="org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory">
>>>>>>> <!-- Datasource configuration bean which is responsible for
>>>>>>> Cassandra connection details -->
>>>>>>> <property name="dataSourceBean" value="cassandraDataSource"/>
>>>>>>> <!-- Persistent settings bean which is responsible for the
>>>>>>> details of how objects will be persisted to Cassandra -->
>>>>>>> <property name="persistenceSettingsBean"
>>>>>>> value="cache1_persistence_settings"/>
>>>>>>> </bean></property>
>>>>>>>
>>>>>>> Yet, when I run the application I get the error:
>>>>>>>
>>>>>>> java.lang.IllegalStateException:
>>>>>>> Failed to get Cassandra DataSource cause Spring application context
>>>>>>> wasn't injected into CassandraCacheStoreFactory
>>>>>>>
>>>>>>> All of the Ignite.xml, connection-settings.xml and
>>>>>>> cassandra-store.xml are all written the same way as the examples
>>>>>>> explain on
>>>>>>> apacheignite Cassandra integration page.
>>>>>>>
>>>>>>> I am initializing the CassandraCacheStoreFactory as follows:
>>>>>>>
>>>>>>>
>>>>>>> val cassandraDataSource = new DataSource
>>>>>>> cassandraDataSource.setContactPoints("prod-cassandra-db.ct.corp")
>>>>>>> val robinPolicy = new RoundRobinPolicy
>>>>>>> cassandraDataSource.setLoadBalancingPolicy(robinPolicy)
>>>>>>> cassandraDataSource.setReadConsistency("ONE")
>>>>>>> cassandraDataSource.setWriteConsistency("ONE")
>>>>>>>
>>>>>>> val CONFIG = "src/main/resources/default-cassandra-store.xml"
>>>>>>> val persistenceSettings = new KeyValuePersistenceSettings(CONFIG)
>>>>>>> val cassandraCacheStoreFactory = new CassandraCacheStoreFactory
>>>>>>> cassandraCacheStoreFactory.setDataSource(cassandraDataSource)
>>>>>>>
>>>>>>> cassandraCacheStoreFactory.setPersistenceSettings(persistenceSettings)
>>>>>>>
>>>>>>> And I am starting the Ignite code as follows:
>>>>>>>
>>>>>>> val igniteContext = new IgniteContext(sparkContext,
>>>>>>> config.igniteConfig, true)
>>>>>>> val ignite = igniteContext.ignite()
>>>>>>>
>>>>>>> What am I missing or doing wrong that is causing this error? I have
>>>>>>> yet to find a simple, comprehensive example in Scala for doing this.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>