Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DBFC8200C3F for ; Wed, 22 Mar 2017 13:42:47 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id DA780160B91; Wed, 22 Mar 2017 12:42:47 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 2ACB6160B83 for ; Wed, 22 Mar 2017 13:42:47 +0100 (CET) Received: (qmail 91172 invoked by uid 500); 22 Mar 2017 12:42:46 -0000 Mailing-List: contact issues-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list issues@ignite.apache.org Received: (qmail 91163 invoked by uid 99); 22 Mar 2017 12:42:46 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Mar 2017 12:42:46 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id DFE70C2523 for ; Wed, 22 Mar 2017 12:42:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -98.549 X-Spam-Level: X-Spam-Status: No, score=-98.549 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_NEUTRAL=0.652, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id IznZUqfhRZ4t for ; Wed, 22 Mar 2017 12:42:45 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id E937C5FDDB for ; Wed, 22 Mar 2017 12:42:44 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 88907E0BDD for ; Wed, 22 Mar 2017 12:42:42 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id BFA41254E1 for ; Wed, 22 Mar 2017 12:42:41 +0000 (UTC) Date: Wed, 22 Mar 2017 12:42:41 +0000 (UTC) From: "Andrey Gura (JIRA)" To: issues@ignite.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (IGNITE-4829) Spring context is not injected into POJO store when JDBC driver is utilized MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 22 Mar 2017 12:42:48 -0000 [ https://issues.apache.org/jira/browse/IGNITE-4829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15936227#comment-15936227 ] Andrey Gura commented on IGNITE-4829: ------------------------------------- Thanks [~kuaw26]! I've added a few comments to review. But in general looks good for me. > Spring context is not injected into POJO store when JDBC driver is utilized > --------------------------------------------------------------------------- > > Key: IGNITE-4829 > URL: https://issues.apache.org/jira/browse/IGNITE-4829 > Project: Ignite > Issue Type: Bug > Affects Versions: 1.9 > Reporter: Denis Magda > Assignee: Andrey Gura > Priority: Critical > Fix For: 2.0 > > Attachments: SampleJdbcApp.zip > > > Faced with the exception reported in the discussion initiated a long time ago: > http://apache-ignite-users.70518.x6.nabble.com/ignite-Spring-application-context-resource-is-not-injected-problem-td6377.html > Basically, I get the same exception: > {code} > class org.apache.ignite.IgniteException: Spring application context resource is not injected. > at org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:171) > at org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:100) > at org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1261) > at org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStart(GridCacheProcessor.java:791) > at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:950) > at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1799) > at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1602) > at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1042) > at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:569) > at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:516) > at org.apache.ignite.Ignition.start(Ignition.java:322) > at org.apache.ignite.internal.jdbc2.JdbcConnection.getIgnite(JdbcConnection.java:191) > at org.apache.ignite.internal.jdbc2.JdbcConnection.(JdbcConnection.java:152) > at org.apache.ignite.IgniteJdbcDriver.connect(IgniteJdbcDriver.java:361) > at java.sql.DriverManager.getConnection(DriverManager.java:664) > at java.sql.DriverManager.getConnection(DriverManager.java:270) > at Main.initIgniteConnection(Main.java:260) > at Main.main(Main.java:29) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144) > {code} > The exception occurs when my application uses Ignite JDBC driver to connect to a cluster. The cluster persists data to a relation database (Postrgers), so I have the POJO store defined in the application configuration. The latter was generated for by Apache Ignite Web Console and the POJO store is set by {{CacheJdbcPojoStoreFactory.dataSourceBean}} which causes the error. > If I set the POJO store using {{CacheJdbcPojoStoreFactory.dataSource}} method then the issue disappears. > To reproduce the issue do the following: > - Unzip the attached project and start {{ServerNode}} class. > - Start the sample application that uses Ignite JDBC driver and you'll get the reported exception. > Change the configuration from {{ignite-jdbc-bad}} to {{ignite-jdbc}} and the exception dissappears because the latter sets the store using {{CacheJdbcPojoStoreFactory.dataSource}}. > -- This message was sent by Atlassian JIRA (v6.3.15#6346)