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 4F3FC200B32 for ; Thu, 23 Jun 2016 16:57:37 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 4E038160A59; Thu, 23 Jun 2016 14:57:37 +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 6DBFB160A35 for ; Thu, 23 Jun 2016 16:57:36 +0200 (CEST) Received: (qmail 4188 invoked by uid 500); 23 Jun 2016 14:57:35 -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 4178 invoked by uid 99); 23 Jun 2016 14:57:35 -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; Thu, 23 Jun 2016 14:57:35 +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 2B911C00CA for ; Thu, 23 Jun 2016 14:57:35 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.198 X-Spam-Level: * X-Spam-Status: No, score=1.198 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com 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 kN93dtf_dWAi for ; Thu, 23 Jun 2016 14:57:33 +0000 (UTC) Received: from mail-qk0-f176.google.com (mail-qk0-f176.google.com [209.85.220.176]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id BAFDE5FCC8 for ; Thu, 23 Jun 2016 14:57:32 +0000 (UTC) Received: by mail-qk0-f176.google.com with SMTP id c73so110218494qkg.2 for ; Thu, 23 Jun 2016 07:57:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=Xlk2H2qA1JJDjaJNV0E4SkGJmqNp4sAAao6ygC7p1Xs=; b=BQLZ0W1hXqdc4TyiJM/kDyMjp1TiY6t6qIhRGUULWOunAEfDdm4w2BlkbGImjTwoYh OVtFfZsATxhMyIN5JlmXJWxUyRan7o58SojcMli2+fm/9L3jYHv+HNTM9c3GhNIxyDoB FG3Ovp8B78knJJg9vc8EbeNjQtR1SEFKcLyJReW3Q/qMH0xCzxK1o6+BiYxcaBHaNGjE O8hsKiI13IHNOSkRJSfZkXuJxzkF9sEhSkdwF/hNbTim7O7MeuwTcl5yhjiKX68+4QLw ENmCQ0nLvZbyR3Us/Ae1Mvtr6Kn+tghM/QxT1PnHo7az39d87B/x1HHb3nOBcknCH3n9 jC4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=Xlk2H2qA1JJDjaJNV0E4SkGJmqNp4sAAao6ygC7p1Xs=; b=nGHQKi+WMQvoGpmMEvQDsc3gKlc5oKOxKTg8aGFImu7RcnXbJRQRpdUn02ToiyJjhM Lcuc40o2BY+2QGB6rSEttYwkvbt0FRaua4lwmAPSlVcKLET19WIm3OBN6QTnyjcMWNGT Wmi4jvJLgoYtgHPUW78YynPzn9/stDrhMgSbfkTUpcGpdVtlhlpiDoS5sEwCoJRF0aDD 8C5Yhh60Hkw5e+RqWe9pz7ij0TtKlnI6IyBEKnIz5u/S4bvsw8uqZJn1FnAN1HHR/utN DMrP8BjtZNLue0cbJmmEMc0KIeIqzND3zFp/cZeWyI2NK8lkYFeodhv+fRCc/QITgtkh ftAQ== X-Gm-Message-State: ALyK8tLmOE2qN36DKvDyFs5r0YuCTKDbGCaaf8mOPrAL/7EdiABw0rn9LnoQKs5SapQD5tHHgKLHlZxH+bV4JQ== X-Received: by 10.200.52.157 with SMTP id w29mr42528659qtb.99.1466693851327; Thu, 23 Jun 2016 07:57:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.37.72 with HTTP; Thu, 23 Jun 2016 07:57:30 -0700 (PDT) In-Reply-To: <1466335094980-5741.post@n6.nabble.com> References: <1465907805738-5629.post@n6.nabble.com> <1466145732887-5705.post@n6.nabble.com> <1466335094980-5741.post@n6.nabble.com> From: Alexei Scherbakov Date: Thu, 23 Jun 2016 17:57:30 +0300 Message-ID: Subject: Re: schema import example ClassNotFoundException: org.apache.ignite.schema.H2DataSourceFactory To: user Content-Type: multipart/alternative; boundary=001a11444b0600baf80535f34604 archived-at: Thu, 23 Jun 2016 14:57:37 -0000 --001a11444b0600baf80535f34604 Content-Type: text/plain; charset=UTF-8 Hi, I was not able to reproduce your problem using simple code like: public static void main(String[] args) throws ClassNotFoundException, SQLException { // Register JDBC driver. Class.forName("org.apache.ignite.IgniteJdbcDriver"); Connection conn = DriverManager.getConnection("jdbc:ignite:cfg://cache=PersonCache@config/ignite-jdbc.xml"); PreparedStatement stmt = conn.prepareStatement("select firstName, lastName from Person"); //stmt.setInt(1, 30); ResultSet rs = stmt.executeQuery(); while (rs.next()) { String firstName = rs.getString("firstName"); System.out.println(firstName); } } I suppose you somehow created dependency in your code to the schema-import demo. Working with jdbc driver requires only basic dependencies to be in classpath. 2016-06-19 14:18 GMT+03:00 xoraxax : > In order to reproduce it you can run the schema-import example. > Then, let's say, you can download JasperServer and add IgniteJdbcDatasource > to the context.xml. > In web UI you add jndi DataSource and test connection. It starts the ignite > node and throws the exception unless I manually copy ignite-examples.jar to > the tomcat lib folder. > > > > > -- > View this message in context: > http://apache-ignite-users.70518.x6.nabble.com/schema-import-example-ClassNotFoundException-org-apache-ignite-schema-H2DataSourceFactory-tp5629p5741.html > Sent from the Apache Ignite Users mailing list archive at Nabble.com. > -- Best regards, Alexei Scherbakov --001a11444b0600baf80535f34604 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

I was not able to reproduce your problem= using simple code like:
public static vo= id main(String[] args) throws ClassNotFoundException, SQLException {
    // Register JDBC driver.
Class.forName("= org.apache.ignite.IgniteJdbcDriver");

Connection con= n =3D DriverManager.getConnection(= "jdbc:ignite:cfg:/= /cache=3DPersonCache@config/ignite-jdbc.xml");

Prepa= redStatement stmt =3D conn.prepareStatement("select firstName, lastName from Person");

/= /stmt.setInt(1, 30);

ResultSet rs =3D stmt.executeQuery();

while (rs.next()) {
= String firstName =3D rs.getString("firstName");
System.out.= println(firstName);
}
}
I suppose you somehow created depend= ency in your code to the schema-import demo.
Working with jdbc dr= iver requires only basic dependencies to be in classpath.



= 2016-06-19 14:18 GMT+03:00 xoraxax <pushvv@gmail.com>:
In order to reproduce it you can run the schema-import exampl= e.
Then, let's say, you can download JasperServer and add IgniteJdbcDataso= urce
to the context.xml.
In web UI you add jndi DataSource and test connection. It starts the ignite=
node and throws the exception unless I manually copy ignite-examples.jar to=
the tomcat lib folder.




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/schema-import-exampl= e-ClassNotFoundException-org-apache-ignite-schema-H2DataSourceFactory-tp562= 9p5741.html
Sent from the Apache Ignite Users mailing list archive at Nabble.= com.



--
=

Best regards,
Alexei Scherbakov
--001a11444b0600baf80535f34604--