ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Valentin Kulichenko (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-5469) Failed to get Cassandra DataSource cause Spring application context wasn't injected into CassandraCacheStoreFactory
Date Mon, 26 Jun 2017 21:41:00 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-5469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16063844#comment-16063844
] 

Valentin Kulichenko commented on IGNITE-5469:
---------------------------------------------

It fails because Ignite doesn't have Spring context in the first place. You should configure
Ignite in Spring XML file along with data source bean, or use {{IgniteSpring#start(..)}} method
to provide context explicitely.

P.S. Please use user mailing list for such questions. This is not a bug.

> Failed to get Cassandra DataSource cause Spring application context wasn't injected into
CassandraCacheStoreFactory
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-5469
>                 URL: https://issues.apache.org/jira/browse/IGNITE-5469
>             Project: Ignite
>          Issue Type: Bug
>          Components: cassandra
>    Affects Versions: 1.7
>         Environment: Spring-data-cassandra 1.5.0.M1
> javac 1.8.0
> windows 10
> cassandra in a docker container
>            Reporter: Jamie Oliver
>
> Hi,
> I am getting the following exception:
> class org.apache.ignite.IgniteException: Failed to get Cassandra DataSource cause Spring
application context wasn't injected into CassandraCacheStoreFactory
> 	at org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:949)
> 	at org.apache.ignite.Ignition.start(Ignition.java:325)
> This is the how I initialize:
> IgniteConfiguration cfg = new IgniteConfiguration();
>         cfg.setIgniteInstanceName("test");
>         CacheConfiguration cacheConfiguration = new CacheConfiguration();
>         cacheConfiguration.setName("test");
>         CassandraCacheStoreFactory cassandraCacheStoreFactory = new CassandraCacheStoreFactory();
>         cassandraCacheStoreFactory.setDataSourceBean("CassandraBean");
>         cacheConfiguration.setCacheStoreFactory(cassandraCacheStoreFactory);
>         cfg.setCacheConfiguration(cacheConfiguration);
>         try (Ignite ignite = Ignition.start(cfg)) {}
> Looking forward to your help!



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message