Hello.

I use add bacth method to insert data in streaming mode.It works well in
ignite 2.7. But I get following exeception when use ignite 2.8-release-rc1:

Exception in thread "main" java.sql.BatchUpdateException: class
org.apache.ignite.IgniteCheckedException: null
        at
org.apache.ignite.internal.jdbc.thin.JdbcThinConnection$StreamState.readResponses(JdbcThinConnection.java:1017)
        at java.lang.Thread.run(Thread.java:748)

My test code looks like:

     ps = conn.prepareStatement("SET STREAMING ON ALLOW_OVERWRITE ON");
     ps.execute();
     ps.close();

        String sql = "insert INTO  city1(id,name,name1) VALUES(?,?,?)";
        ps = conn.prepareStatement(sql);
        for (int i = 0; i < 1600; i++) {
            String s1 = String.valueOf(Math.random());
            String s2 = String.valueOf(Math.random());
            ps.setInt(1, i);
            ps.setString(2, s1);
            ps.setString(3, s2);
            ps.addBatch();
        }
        ps.execute();
        ps.close();

        ps = conn.prepareStatement("set streaming off");
        ps.execute();
        ps.close(); 

        conn.close();

Do u have any ideas about this issue?What is the best way to insert data in
jdbc mode?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Reply via email to