You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Ilya Kasnacheev <il...@gmail.com> on 2020/02/03 13:05:42 UTC

Re: Failed to load bean in application context [beanName=dataSource] in ignite.Spring bean doesn't exist

Hello!

You have to define your Oracle Data Source in XML files of all your
instances (or at least all server nodes).

There are other approaches, but this one is most straightforward.

Regards,
-- 
Ilya Kasnacheev


вс, 2 февр. 2020 г. в 22:30, nithin91 <
nithinbharadwaj.govindaraju@franklintempleton.com>:

> Hi ,
>
>   We are doing a POC on using the Ignite in-memory capabilities for our
> application and as a part of this
>   we are trying to load the data from one of the Oracle Tables to ignite
> cache using
>   CacheJdbcPojoStoreFactory.
>
>
>   Steps followed to load the data from  Oracle to Ignite cache:
>
>   1. We have installed the Ignite ( with Version 2.7.6) in Unix Server and
> started the ignite node
>       by executing the ignite.sh file in UNIX.
>
>   2. Now i have written a java code using eclipse as my IDE in my local
> windows system and trying to
>       connect to the Ignite node running on UNIX by specifying the UNIX
> Server IP details in the
>      "discoveryspi" property corresponding to Ignite Configuration in the
> bean file.
>
>   3. In addition to the server details, bean file has details related to
> cache configuration,cache store
>       factory,data source bean,Query Entities and JDBC Types and has client
> mode set to "true".
>
>    4. Now we are trying to load the cache by executing the below code
>
>    public class ProductLoadCache {
>
>     public static void main(String[] args) throws Exception {
>         try (Ignite ignite = Ignition.start("Ignite-Client.xml")) {
>             System.out.println(">>> Loading caches...");
>
>             System.out.println(">>> Loading cache: ProductLoadCache");
>             ignite.cache("ProductLoadCache").loadCache(null);
>
>             System.out.println(">>> ProductLoadCacheis loaded");
>
>
>         }
>     }
>
>
>    5.  Upon execution of the above code i get an error like "Failed to load
> bean in application context
>        [beanName=dataSource] in ignite.Spring bean doesn't exist".
>
>    6.  I encountered similar error while running the same code in local
> mode(i.e by specifying the local
>         IP address details in the "discoveryspi" property corresponding to
> Ignite Configuration in the bean
>        file) but later identified that Oracle jdbc driver is missing and
> added the Oracle Jdbc Jar which is
>        available in my local system  as an  "external jar" to my project in
> eclipse.After doing this the issue
>        got resolved and i am to load the data into ignite cache by running
> ignite in local mode.
>
>       Now after starting the node in unix, i am again facing the same
> error.
>
>       Can you please let me know is anything additional needed to run the
> code in unix or is it because it is
>      not able to find the Oracle JDBC jar in unix. If this is the issue
> please let me know , what are available
>      approaches to fix the issue.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>