ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maxwell Pettit (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (IGNITE-7335) DatabaseMetaData getTables error
Date Fri, 29 Dec 2017 14:12:00 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-7335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16306298#comment-16306298
] 

Maxwell Pettit edited comment on IGNITE-7335 at 12/29/17 2:11 PM:
------------------------------------------------------------------

{noformat}
I've recreated the issue with a simple java application below.  I am running an Ignite instance
locally with no changes to configuration after creating with the following definition:

CREATE TABLE TEST (TEST_ID INTEGER PRIMARY KEY, TEST_VAL INTEGER);

My java application looks like this:

public class App {

    public static void main(String[] args) {
        try {
            BasicDataSource ds = new BasicDataSource();
            ds.setDriverClassName("org.apache.ignite.IgniteJdbcThinDriver");
            ds.setUrl("jdbc:ignite:thin://localhost");
            Connection conn = ds.getConnection();
            DatabaseMetaData meta = conn.getMetaData();
            meta.getTables(null, null, "test", null);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
{noformat}



was (Author: maxwellpettit):

{noformat}
I've recreated the issue with a simple java application below.  I am running an Ignite instance
locally with no changes to configuration after creating with the following definition:

CREATE TABLE TEST (TEST_ID INTEGER PRIMARY KEY, TEST_VAL INTEGER);

My java application looks like this:

public class App {

    public static void main(String[] args) {
        try {

{noformat}
*no* further _formatting_ is done here
{noformat}
            BasicDataSource ds = new BasicDataSource();
            ds.setDriverClassName("org.apache.ignite.IgniteJdbcThinDriver");
            ds.setUrl("jdbc:ignite:thin://localhost");
            Connection conn = ds.getConnection();
            DatabaseMetaData meta = conn.getMetaData();
            meta.getTables(null, null, "test", null);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
{noformat}


> DatabaseMetaData getTables error
> --------------------------------
>
>                 Key: IGNITE-7335
>                 URL: https://issues.apache.org/jira/browse/IGNITE-7335
>             Project: Ignite
>          Issue Type: Bug
>          Components: jdbc, sql
>    Affects Versions: 2.3
>         Environment: Default ignite cluster with a table created via SQL from the JDBC
driver
>            Reporter: Maxwell Pettit
>            Assignee: Taras Ledkov
>             Fix For: 2.4
>
>
> Exception when calling the java.sql.DatabaseMetaData.getTables(String catalog, String
schemaPattern, String tableNamePattern, String[] types) method.  Exception is listed below:
> Caused by: java.sql.SQLException: Failed to communicate with Ignite cluster.
> 	at org.apache.ignite.internal.jdbc.thin.JdbcThinConnection.sendRequest(JdbcThinConnection.java:681)
> 	at org.apache.ignite.internal.jdbc.thin.JdbcThinDatabaseMetadata.getTables(JdbcThinDatabaseMetadata.java:740)
> 	at org.apache.commons.dbcp.DelegatingDatabaseMetaData.getTables(DelegatingDatabaseMetaData.java:604)
> 	... 20 more
> Caused by: java.io.IOException: Failed to read incoming message (not enough data).
> 	at org.apache.ignite.internal.jdbc.thin.JdbcThinTcpIo.read(JdbcThinTcpIo.java:406)
> 	at org.apache.ignite.internal.jdbc.thin.JdbcThinTcpIo.read(JdbcThinTcpIo.java:384)
> 	at org.apache.ignite.internal.jdbc.thin.JdbcThinTcpIo.sendRequest(JdbcThinTcpIo.java:327)
> 	at org.apache.ignite.internal.jdbc.thin.JdbcThinConnection.sendRequest(JdbcThinConnection.java:668)
> 	... 26 more



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message