You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Igor Rudyak (JIRA)" <ji...@apache.org> on 2016/08/28 05:48:21 UTC

[jira] [Updated] (IGNITE-3790) Spring app context not injected into CacheStoreFactory while using JDBC

     [ https://issues.apache.org/jira/browse/IGNITE-3790?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Rudyak updated IGNITE-3790:
--------------------------------
    Description: 
*@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

  was:
@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


> 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.6, 1.7
>            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)