Igor Rudyak created IGNITE-3790:
-----------------------------------
Summary: Spring app context not injected into CacheStoreFactory while using JDBC
Key: IGNITE-3790
URL:
https://issues.apache.org/jira/browse/IGNITE-3790 Project: Ignite
Issue Type: Bug
Components: cache, jdbc-driver
Affects Versions: 1.7, 1.6
Reporter: Igor Rudyak
@SpringApplicationContextResource resource is not injected into CacheStoreFactory implementation while trying to establish JDBC connection to Ignite cluster with caches backed by CacheStore.
For example look at the class "org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory" which has member:
*private Object appCtx;*
annotated by *@SpringApplicationContextResource*
When trying to used JDBC connection like this:
*DriverManager.getConnection("jdbc:ignite:cfg://file:///my-ignite-cluster.xml");*
it throws exception:
*java.lang.IllegalStateException: Failed to get Cassandra DataSource cause Spring application context wasn't injected into CassandraCacheStoreFactory*
The reason is that Spring context wasn't injected into *appCtx* variable and it stays null
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)