ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Paschenko (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-7248) "Schema not found" error when setting streaming mode for JDBC driver
Date Tue, 16 Jan 2018 16:48:00 GMT

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

Alexander Paschenko commented on IGNITE-7248:
---------------------------------------------

[~tledkov-gridgain], my comments:

1. {{JdbcStreamingToPublicCacheTest}}: unused imports; looks like we don't need {{getConfiguration0}}
method either, just override {{getConfiguration}} and call there {{super.getConfiguration}}
like you do now.

2. The fix itself is incorrect. You can't just use cache name as schema name - they may not
match (PUBLIC schema, also schema name from cache configuration...). The problem is that we
mix caches and schemas in {{JdbcStatement}} and {{GridQueryProcessor}}. Correct fix would
be like this:
 * fix {{GridQueryProcessor#prepareNativeStatement}} so that it does not worry about caches
and works only in terms of schema (I reverted your change in {{JdbcStatement}} and removed
{{idx.schema}} lookup from {{GridQueryProcessor#prepareNativeStatement}} and your test passes
just fine).

That said, please make the fix as proposed (cache name should not be used instead of schema
name anywhere) and re-run tests.

> "Schema not found" error when setting streaming mode for JDBC driver
> --------------------------------------------------------------------
>
>                 Key: IGNITE-7248
>                 URL: https://issues.apache.org/jira/browse/IGNITE-7248
>             Project: Ignite
>          Issue Type: Bug
>    Affects Versions: 2.3
>            Reporter: Alexey Kukushkin
>            Assignee: Vladimir Ozerov
>            Priority: Major
>             Fix For: 2.4
>
>
> Using JDBC "thick" driver in streaming mode fails with a "Schema not found" erorr:
> {code}
> Connection connection = DriverManager.getConnection("jdbc:ignite:cfg://streaming=true:cache=CACHE@file:/path-to-ignite-config.xml");
> {code}
> using connection to create a table works fine but this exception is generated when using
the connection to execute INSER INTO...
> {code}
> class org.apache.ignite.internal.processors.query.IgniteSQLException: Failed
> to set schema for DB connection for thread [schema=]
> org.h2.jdbc.JdbcSQLException: Schema  not found; SQL statement:
> SET SCHEMA "" [90079-195]
> {code}
> See [User List|http://apache-ignite-users.70518.x6.nabble.com/Cannot-insert-data-into-table-using-JDBC-tc17477.html]
for more details



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message