[jira] [Commented] (IGNITE-7248) "Schema not found" error when setting streaming mode for JDBC driver

2018-01-19 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on IGNITE-7248:


Github user asfgit closed the pull request at:

https://github.com/apache/ignite/pull/3384


> "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
>  Components: jdbc
>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)


[jira] [Commented] (IGNITE-7248) "Schema not found" error when setting streaming mode for JDBC driver

2018-01-17 Thread Taras Ledkov (JIRA)

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

Taras Ledkov commented on IGNITE-7248:
--

[~al.psc], thanks a lot. Fixed.
Tests are OK.
[~vozerov], please review the short patch.


> "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)


[jira] [Commented] (IGNITE-7248) "Schema not found" error when setting streaming mode for JDBC driver

2018-01-16 Thread Alexander Paschenko (JIRA)

[ 
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)


[jira] [Commented] (IGNITE-7248) "Schema not found" error when setting streaming mode for JDBC driver

2018-01-16 Thread Taras Ledkov (JIRA)

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

Taras Ledkov commented on IGNITE-7248:
--

Root cause is wrong usage of the {{schemaName}} and {{cacheName}} at the 
{{JdbcConnection#prepareNativeStatement}} in JDBC v2 (looks like it is the old 
code when *schema == cacheName*)

Also please take a look at the test {{JdbcStreamingToPublicCacheTest}} to see 
the wright way of the streaming to the table that is created by SQL. We have to 
use separate connection. Also the JDBC connection with enabled streaming should 
use ONLY for streaming INSERT.



> "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:
> Connection connection = 
> DriverManager.getConnection("jdbc:ignite:cfg://streaming=true:cache=CACHE@file:/path-to-ignite-config.xml");
> // using connection to create a table works fine but this exception is 
> generated when using the connection to execute INSER INTO...
> 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]
> 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)


[jira] [Commented] (IGNITE-7248) "Schema not found" error when setting streaming mode for JDBC driver

2018-01-16 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on IGNITE-7248:


GitHub user tledkov-gridgain opened a pull request:

https://github.com/apache/ignite/pull/3384

IGNITE-7248  "Schema not found" error when setting streaming mode for JDBC 
driver



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/gridgain/apache-ignite ignite-7248

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/ignite/pull/3384.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #3384


commit 6d704008ba4c466059e9d0af7f9e6b603667b6b8
Author: tledkov-gridgain 
Date:   2018-01-15T13:24:53Z

IGNITE-7248: add test

commit 6bdf2c89ee2e4cbef819ff3e72605b7154fb8c53
Author: tledkov-gridgain 
Date:   2018-01-15T15:31:18Z

IGNITE-7411: fix cache name

commit 67eee4186add25f49b074988e51db1aedfb866d7
Author: tledkov-gridgain 
Date:   2018-01-16T09:47:07Z

IGNITE-7248: rename the test, add test to suite




> "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:
> Connection connection = 
> DriverManager.getConnection("jdbc:ignite:cfg://streaming=true:cache=CACHE@file:/path-to-ignite-config.xml");
> // using connection to create a table works fine but this exception is 
> generated when using the connection to execute INSER INTO...
> 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]
> 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)