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 65898200D24 for ; Tue, 24 Oct 2017 14:02:46 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6418D160BE0; Tue, 24 Oct 2017 12:02:46 +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 AD6A1160BDB for ; Tue, 24 Oct 2017 14:02:45 +0200 (CEST) Received: (qmail 73308 invoked by uid 500); 24 Oct 2017 12:02:39 -0000 Mailing-List: contact user-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ignite.apache.org Delivered-To: mailing list user@ignite.apache.org Received: (qmail 73298 invoked by uid 99); 24 Oct 2017 12:02:39 -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; Tue, 24 Oct 2017 12:02:39 +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 205B4C6AB8 for ; Tue, 24 Oct 2017 12:02:39 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.173 X-Spam-Level: ** X-Spam-Status: No, score=2.173 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, NML_ADSP_CUSTOM_MED=1.2, SPF_HELO_PASS=-0.001, SPF_SOFTFAIL=0.972, URIBL_BLOCKED=0.001] 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 SHDi1o1IOSVa for ; Tue, 24 Oct 2017 12:02:38 +0000 (UTC) Received: from n6.nabble.com (n6.nabble.com [162.255.23.37]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 28E035F3E1 for ; Tue, 24 Oct 2017 12:02:38 +0000 (UTC) Received: from n6.nabble.com (localhost [127.0.0.1]) by n6.nabble.com (Postfix) with ESMTP id 033E7271DAC4 for ; Tue, 24 Oct 2017 05:02:37 -0700 (MST) Date: Tue, 24 Oct 2017 05:02:37 -0700 (MST) From: iostream To: user@ignite.apache.org Message-ID: <1508846557010-0.post@n6.nabble.com> Subject: Failed to query ignite MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit archived-at: Tue, 24 Oct 2017 12:02:46 -0000 *Hi, I have created a table in my ignite cluster (v2.1) using the following DDL -* CREATE TABLE test ( id LONG, name VARCHAR, PRIMARY KEY (id) ) WITH "backups=1,affinityKey=id"; *I am trying to query the table using IgniteJdbcThinDriver. The code to query is as follows -* String sql = "/select * from test where id = ?/"; List params = new ArrayList(); params.add(1L); ResultSet rs = null; Class.forName("org.apache.ignite.IgniteJdbcThinDriver"); Connection conn = DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1/"); PreparedStatement stmt = conn.prepareStatement(sql); if (null != params) { int i = 1; for (Object param : params) { stmt.setObject(i, param); i++; } } rs = stmt.executeQuery(); conn.close(); *I am getting the following error -* java.sql.SQLException: Failed to query Ignite. at org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute0(JdbcThinStatement.java:123) at org.apache.ignite.internal.jdbc.thin.JdbcThinPreparedStatement.executeWithArguments(JdbcThinPreparedStatement.java:221) at org.apache.ignite.internal.jdbc.thin.JdbcThinPreparedStatement.executeQuery(JdbcThinPreparedStatement.java:68) at com.walmart.ecommerce.fulfillment.node.commons.manager.dlr.work.Tester.main(Tester.java:34) Caused by: class org.apache.ignite.IgniteCheckedException: Error server response: [req=JdbcQueryExecuteRequest [schemaName=null, pageSize=1024, maxRows=0, sqlQry=select * from test where id = ?, args=[1]], resp=JdbcResponse [res=null, status=1, err=javax.cache.CacheException: class org.apache.ignite.IgniteCheckedException: null]] at org.apache.ignite.internal.jdbc.thin.JdbcThinTcpIo.sendRequest(JdbcThinTcpIo.java:253) at org.apache.ignite.internal.jdbc.thin.JdbcThinTcpIo.queryExecute(JdbcThinTcpIo.java:227) at org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute0(JdbcThinStatement.java:109) ... 3 more -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/