With as syntax does not work in ignite 2.9.0?

classic Classic list List threaded Threaded
6 messages Options
yangjiajun yangjiajun
Reply | Threaded
Open this post in threaded view
|

With as syntax does not work in ignite 2.9.0?

Hello.

We use 'with xxx as  (select xxx) ',which works vrey fine in 2.8.1 and other
past release versions.After we uprade to 2.9.0,such sqls start to throw
exception. In the server side,the error looks like:

, args=Object[] [], stmtType=SELECT_STATEMENT_TYPE, autoCommit=true,
partResReq=false, super=JdbcRequest [type=2, reqId=790418]]]
class org.apache.ignite.internal.processors.query.IgniteSQLException: Failed
to parse query. General error: "java.lang.NullPointerException" [50000-197]
        at
org.apache.ignite.internal.processors.query.h2.H2Connection.prepareStatementNoCache(H2Connection.java:194)
        at
org.apache.ignite.internal.processors.query.h2.H2PooledConnection.prepareStatementNoCache(H2PooledConnection.java:109)
        at
org.apache.ignite.internal.processors.query.h2.QueryParser.parseH2(QueryParser.java:355)
        at
org.apache.ignite.internal.processors.query.h2.QueryParser.parse0(QueryParser.java:222)
        at
org.apache.ignite.internal.processors.query.h2.QueryParser.parse(QueryParser.java:138)
        at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.querySqlFields(IgniteH2Indexing.java:1071)
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:2779)
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:2775)
        at
org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36)
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:3338)
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor.lambda$querySqlFields$2(GridQueryProcessor.java:2795)
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuerySafe(GridQueryProcessor.java:2833)
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2769)
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2727)
        at
org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.executeQuery(JdbcRequestHandler.java:647)
        at
org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.doHandle(JdbcRequestHandler.java:320)
        at
org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.handle(JdbcRequestHandler.java:257)
        at
org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:202)
        at
org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:56)
        at
org.apache.ignite.internal.util.nio.GridNioFilterChain$TailFilter.onMessageReceived(GridNioFilterChain.java:279)
        at
org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:109)
        at
org.apache.ignite.internal.util.nio.GridNioAsyncNotifyFilter$3.body(GridNioAsyncNotifyFilter.java:97)
        at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
        at
org.apache.ignite.internal.util.worker.GridWorkerPool$1.run(GridWorkerPool.java:70)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.h2.jdbc.JdbcSQLException: General error:
"java.lang.NullPointerException" [50000-197]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:357)
        at org.h2.message.DbException.get(DbException.java:168)
        at org.h2.message.DbException.convert(DbException.java:307)
        at org.h2.message.DbException.toSQLException(DbException.java:280)
        at org.h2.message.TraceObject.logAndConvert(TraceObject.java:357)
        at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:697)
        at
org.apache.ignite.internal.processors.query.h2.H2Connection.prepareStatementNoCache(H2Connection.java:191)
        ... 26 more
Caused by: java.lang.NullPointerException
        at org.h2.table.Table.removeChildrenAndResources(Table.java:545)
        at org.h2.table.TableView.removeChildrenAndResources(TableView.java:439)
        at org.h2.engine.Session.removeLocalTempTable(Session.java:409)
        at org.h2.command.Parser.parseSingleCommonTableExpression(Parser.java:5233)
        at org.h2.command.Parser.parseWith(Parser.java:5145)
        at org.h2.command.Parser.parseWithStatementOrQuery(Parser.java:1931)
        at org.h2.command.Parser.parsePrepared(Parser.java:499)
        at org.h2.command.Parser.parse(Parser.java:335)
        at org.h2.command.Parser.parse(Parser.java:307)
        at org.h2.command.Parser.prepareCommand(Parser.java:278)
        at org.h2.engine.Session.prepareLocal(Session.java:611)
        at org.h2.engine.Session.prepareCommand(Session.java:549)
        at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1247)
        at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:76)
        at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:694)
        ... 27 more

In the client side,the error looks like:

java.sql.SQLException: Failed to parse query. General error:
"java.lang.NullPointerException" [50000-197] at
org.apache.ignite.internal.jdbc.thin.JdbcThinConnection.sendRequest(JdbcThinConnection.java:1004)
at
org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute0(JdbcThinStatement.java:231)
at
org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.executeQuery(JdbcThinStatement.java:139)
at
com.zaxxer.hikari.pool.ProxyStatement.executeQuery(ProxyStatement.java:111)
at
com.zaxxer.hikari.pool.HikariProxyStatement.executeQuery(HikariProxyStatement.java...

The sqls work fine while ignite just started.Such error happens after ignite
runs a while.And after that,the error seems happen every time.

Do u have any ideas about it?




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Alexandr Shapkin Alexandr Shapkin
Reply | Threaded
Open this post in threaded view
|

RE: With as syntax does not work in ignite 2.9.0?

Hi,

 

I’ve filed a JIRA ticket https://issues.apache.org/jira/browse/IGNITE-13822 to track this issue.

Full logs or a simple reproducer would help to debug this more quickly, feel free to share them as well.

 

From: [hidden email]
Sent: Monday, December 7, 2020 5:40 AM
To: [hidden email]
Subject: With as syntax does not work in ignite 2.9.0?

 

Hello.

 

We use 'with xxx as  (select xxx) ',which works vrey fine in 2.8.1 and other

past release versions.After we uprade to 2.9.0,such sqls start to throw

exception. In the server side,the error looks like:

 

, args=Object[] [], stmtType=SELECT_STATEMENT_TYPE, autoCommit=true,

partResReq=false, super=JdbcRequest [type=2, reqId=790418]]]

class org.apache.ignite.internal.processors.query.IgniteSQLException: Failed

to parse query. General error: "java.lang.NullPointerException" [50000-197]

              at

org.apache.ignite.internal.processors.query.h2.H2Connection.prepareStatementNoCache(H2Connection.java:194)

              at

org.apache.ignite.internal.processors.query.h2.H2PooledConnection.prepareStatementNoCache(H2PooledConnection.java:109)

              at

org.apache.ignite.internal.processors.query.h2.QueryParser.parseH2(QueryParser.java:355)

              at

org.apache.ignite.internal.processors.query.h2.QueryParser.parse0(QueryParser.java:222)

              at

org.apache.ignite.internal.processors.query.h2.QueryParser.parse(QueryParser.java:138)

              at

org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.querySqlFields(IgniteH2Indexing.java:1071)

              at

org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:2779)

              at

org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:2775)

              at

org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36)

              at

org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:3338)

              at

org.apache.ignite.internal.processors.query.GridQueryProcessor.lambda$querySqlFields$2(GridQueryProcessor.java:2795)

              at

org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuerySafe(GridQueryProcessor.java:2833)

              at

org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2769)

              at

org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2727)

              at

org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.executeQuery(JdbcRequestHandler.java:647)

              at

org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.doHandle(JdbcRequestHandler.java:320)

              at

org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.handle(JdbcRequestHandler.java:257)

              at

org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:202)

              at

org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:56)

              at

org.apache.ignite.internal.util.nio.GridNioFilterChain$TailFilter.onMessageReceived(GridNioFilterChain.java:279)

              at

org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:109)

              at

org.apache.ignite.internal.util.nio.GridNioAsyncNotifyFilter$3.body(GridNioAsyncNotifyFilter.java:97)

              at

org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)

              at

org.apache.ignite.internal.util.worker.GridWorkerPool$1.run(GridWorkerPool.java:70)

              at

java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

              at

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

              at java.lang.Thread.run(Thread.java:745)

Caused by: org.h2.jdbc.JdbcSQLException: General error:

"java.lang.NullPointerException" [50000-197]

              at org.h2.message.DbException.getJdbcSQLException(DbException.java:357)

              at org.h2.message.DbException.get(DbException.java:168)

              at org.h2.message.DbException.convert(DbException.java:307)

              at org.h2.message.DbException.toSQLException(DbException.java:280)

              at org.h2.message.TraceObject.logAndConvert(TraceObject.java:357)

              at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:697)

              at

org.apache.ignite.internal.processors.query.h2.H2Connection.prepareStatementNoCache(H2Connection.java:191)

              ... 26 more

Caused by: java.lang.NullPointerException

              at org.h2.table.Table.removeChildrenAndResources(Table.java:545)

              at org.h2.table.TableView.removeChildrenAndResources(TableView.java:439)

              at org.h2.engine.Session.removeLocalTempTable(Session.java:409)

              at org.h2.command.Parser.parseSingleCommonTableExpression(Parser.java:5233)

              at org.h2.command.Parser.parseWith(Parser.java:5145)

              at org.h2.command.Parser.parseWithStatementOrQuery(Parser.java:1931)

              at org.h2.command.Parser.parsePrepared(Parser.java:499)

              at org.h2.command.Parser.parse(Parser.java:335)

              at org.h2.command.Parser.parse(Parser.java:307)

              at org.h2.command.Parser.prepareCommand(Parser.java:278)

              at org.h2.engine.Session.prepareLocal(Session.java:611)

              at org.h2.engine.Session.prepareCommand(Session.java:549)

              at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1247)

              at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:76)

              at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:694)

              ... 27 more

 

In the client side,the error looks like:

 

java.sql.SQLException: Failed to parse query. General error:

"java.lang.NullPointerException" [50000-197] at

org.apache.ignite.internal.jdbc.thin.JdbcThinConnection.sendRequest(JdbcThinConnection.java:1004)

at

org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute0(JdbcThinStatement.java:231)

at

org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.executeQuery(JdbcThinStatement.java:139)

at

com.zaxxer.hikari.pool.ProxyStatement.executeQuery(ProxyStatement.java:111)

at

com.zaxxer.hikari.pool.HikariProxyStatement.executeQuery(HikariProxyStatement.java...

 

The sqls work fine while ignite just started.Such error happens after ignite

runs a while.And after that,the error seems happen every time.

 

Do u have any ideas about it?

 

 

 

 

--

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

 

Alex Shapkin
Pavel Vinokurov Pavel Vinokurov
Reply | Threaded
Open this post in threaded view
|

Re: With as syntax does not work in ignite 2.9.0?

Hi,

Could you show the query and the code block with the query execution because query "with p as (select * from person) select * from p" works well on 2.9.0.
I suspect that the issue could be related to creating jdbc resources. Could you also show the configuration for the hikari jdbc pool.

Thanks,
Pavel

пн, 7 дек. 2020 г. в 12:43, Alexandr Shapkin <[hidden email]>:

Hi,

 

I’ve filed a JIRA ticket https://issues.apache.org/jira/browse/IGNITE-13822 to track this issue.

Full logs or a simple reproducer would help to debug this more quickly, feel free to share them as well.

 

From: [hidden email]
Sent: Monday, December 7, 2020 5:40 AM
To: [hidden email]
Subject: With as syntax does not work in ignite 2.9.0?

 

Hello.

 

We use 'with xxx as  (select xxx) ',which works vrey fine in 2.8.1 and other

past release versions.After we uprade to 2.9.0,such sqls start to throw

exception. In the server side,the error looks like:

 

, args=Object[] [], stmtType=SELECT_STATEMENT_TYPE, autoCommit=true,

partResReq=false, super=JdbcRequest [type=2, reqId=790418]]]

class org.apache.ignite.internal.processors.query.IgniteSQLException: Failed

to parse query. General error: "java.lang.NullPointerException" [50000-197]

              at

org.apache.ignite.internal.processors.query.h2.H2Connection.prepareStatementNoCache(H2Connection.java:194)

              at

org.apache.ignite.internal.processors.query.h2.H2PooledConnection.prepareStatementNoCache(H2PooledConnection.java:109)

              at

org.apache.ignite.internal.processors.query.h2.QueryParser.parseH2(QueryParser.java:355)

              at

org.apache.ignite.internal.processors.query.h2.QueryParser.parse0(QueryParser.java:222)

              at

org.apache.ignite.internal.processors.query.h2.QueryParser.parse(QueryParser.java:138)

              at

org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.querySqlFields(IgniteH2Indexing.java:1071)

              at

org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:2779)

              at

org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:2775)

              at

org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36)

              at

org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:3338)

              at

org.apache.ignite.internal.processors.query.GridQueryProcessor.lambda$querySqlFields$2(GridQueryProcessor.java:2795)

              at

org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuerySafe(GridQueryProcessor.java:2833)

              at

org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2769)

              at

org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2727)

              at

org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.executeQuery(JdbcRequestHandler.java:647)

              at

org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.doHandle(JdbcRequestHandler.java:320)

              at

org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.handle(JdbcRequestHandler.java:257)

              at

org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:202)

              at

org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:56)

              at

org.apache.ignite.internal.util.nio.GridNioFilterChain$TailFilter.onMessageReceived(GridNioFilterChain.java:279)

              at

org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:109)

              at

org.apache.ignite.internal.util.nio.GridNioAsyncNotifyFilter$3.body(GridNioAsyncNotifyFilter.java:97)

              at

org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)

              at

org.apache.ignite.internal.util.worker.GridWorkerPool$1.run(GridWorkerPool.java:70)

              at

java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

              at

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

              at java.lang.Thread.run(Thread.java:745)

Caused by: org.h2.jdbc.JdbcSQLException: General error:

"java.lang.NullPointerException" [50000-197]

              at org.h2.message.DbException.getJdbcSQLException(DbException.java:357)

              at org.h2.message.DbException.get(DbException.java:168)

              at org.h2.message.DbException.convert(DbException.java:307)

              at org.h2.message.DbException.toSQLException(DbException.java:280)

              at org.h2.message.TraceObject.logAndConvert(TraceObject.java:357)

              at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:697)

              at

org.apache.ignite.internal.processors.query.h2.H2Connection.prepareStatementNoCache(H2Connection.java:191)

              ... 26 more

Caused by: java.lang.NullPointerException

              at org.h2.table.Table.removeChildrenAndResources(Table.java:545)

              at org.h2.table.TableView.removeChildrenAndResources(TableView.java:439)

              at org.h2.engine.Session.removeLocalTempTable(Session.java:409)

              at org.h2.command.Parser.parseSingleCommonTableExpression(Parser.java:5233)

              at org.h2.command.Parser.parseWith(Parser.java:5145)

              at org.h2.command.Parser.parseWithStatementOrQuery(Parser.java:1931)

              at org.h2.command.Parser.parsePrepared(Parser.java:499)

              at org.h2.command.Parser.parse(Parser.java:335)

              at org.h2.command.Parser.parse(Parser.java:307)

              at org.h2.command.Parser.prepareCommand(Parser.java:278)

              at org.h2.engine.Session.prepareLocal(Session.java:611)

              at org.h2.engine.Session.prepareCommand(Session.java:549)

              at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1247)

              at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:76)

              at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:694)

              ... 27 more

 

In the client side,the error looks like:

 

java.sql.SQLException: Failed to parse query. General error:

"java.lang.NullPointerException" [50000-197] at

org.apache.ignite.internal.jdbc.thin.JdbcThinConnection.sendRequest(JdbcThinConnection.java:1004)

at

org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute0(JdbcThinStatement.java:231)

at

org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.executeQuery(JdbcThinStatement.java:139)

at

com.zaxxer.hikari.pool.ProxyStatement.executeQuery(ProxyStatement.java:111)

at

com.zaxxer.hikari.pool.HikariProxyStatement.executeQuery(HikariProxyStatement.java...

 

The sqls work fine while ignite just started.Such error happens after ignite

runs a while.And after that,the error seems happen every time.

 

Do u have any ideas about it?

 

 

 

 

--

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

 



--

Regards

Pavel Vinokurov

ilya.kasnacheev ilya.kasnacheev
Reply | Threaded
Open this post in threaded view
|

Re: With as syntax does not work in ignite 2.9.0?

In reply to this post by yangjiajun
Hello!

Do you happen to run this query on client or server node? Try running it on a server node for a chance. Clients initialize cached lazily and yield a crop of NPEs.

Regards,
--
Ilya Kasnacheev


пн, 7 дек. 2020 г. в 05:40, yangjiajun <[hidden email]>:
Hello.

We use 'with xxx as  (select xxx) ',which works vrey fine in 2.8.1 and other
past release versions.After we uprade to 2.9.0,such sqls start to throw
exception. In the server side,the error looks like:

, args=Object[] [], stmtType=SELECT_STATEMENT_TYPE, autoCommit=true,
partResReq=false, super=JdbcRequest [type=2, reqId=790418]]]
class org.apache.ignite.internal.processors.query.IgniteSQLException: Failed
to parse query. General error: "java.lang.NullPointerException" [50000-197]
        at
org.apache.ignite.internal.processors.query.h2.H2Connection.prepareStatementNoCache(H2Connection.java:194)
        at
org.apache.ignite.internal.processors.query.h2.H2PooledConnection.prepareStatementNoCache(H2PooledConnection.java:109)
        at
org.apache.ignite.internal.processors.query.h2.QueryParser.parseH2(QueryParser.java:355)
        at
org.apache.ignite.internal.processors.query.h2.QueryParser.parse0(QueryParser.java:222)
        at
org.apache.ignite.internal.processors.query.h2.QueryParser.parse(QueryParser.java:138)
        at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.querySqlFields(IgniteH2Indexing.java:1071)
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:2779)
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:2775)
        at
org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36)
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:3338)
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor.lambda$querySqlFields$2(GridQueryProcessor.java:2795)
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuerySafe(GridQueryProcessor.java:2833)
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2769)
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2727)
        at
org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.executeQuery(JdbcRequestHandler.java:647)
        at
org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.doHandle(JdbcRequestHandler.java:320)
        at
org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.handle(JdbcRequestHandler.java:257)
        at
org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:202)
        at
org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:56)
        at
org.apache.ignite.internal.util.nio.GridNioFilterChain$TailFilter.onMessageReceived(GridNioFilterChain.java:279)
        at
org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:109)
        at
org.apache.ignite.internal.util.nio.GridNioAsyncNotifyFilter$3.body(GridNioAsyncNotifyFilter.java:97)
        at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
        at
org.apache.ignite.internal.util.worker.GridWorkerPool$1.run(GridWorkerPool.java:70)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.h2.jdbc.JdbcSQLException: General error:
"java.lang.NullPointerException" [50000-197]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:357)
        at org.h2.message.DbException.get(DbException.java:168)
        at org.h2.message.DbException.convert(DbException.java:307)
        at org.h2.message.DbException.toSQLException(DbException.java:280)
        at org.h2.message.TraceObject.logAndConvert(TraceObject.java:357)
        at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:697)
        at
org.apache.ignite.internal.processors.query.h2.H2Connection.prepareStatementNoCache(H2Connection.java:191)
        ... 26 more
Caused by: java.lang.NullPointerException
        at org.h2.table.Table.removeChildrenAndResources(Table.java:545)
        at org.h2.table.TableView.removeChildrenAndResources(TableView.java:439)
        at org.h2.engine.Session.removeLocalTempTable(Session.java:409)
        at org.h2.command.Parser.parseSingleCommonTableExpression(Parser.java:5233)
        at org.h2.command.Parser.parseWith(Parser.java:5145)
        at org.h2.command.Parser.parseWithStatementOrQuery(Parser.java:1931)
        at org.h2.command.Parser.parsePrepared(Parser.java:499)
        at org.h2.command.Parser.parse(Parser.java:335)
        at org.h2.command.Parser.parse(Parser.java:307)
        at org.h2.command.Parser.prepareCommand(Parser.java:278)
        at org.h2.engine.Session.prepareLocal(Session.java:611)
        at org.h2.engine.Session.prepareCommand(Session.java:549)
        at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1247)
        at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:76)
        at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:694)
        ... 27 more

In the client side,the error looks like:

java.sql.SQLException: Failed to parse query. General error:
"java.lang.NullPointerException" [50000-197] at
org.apache.ignite.internal.jdbc.thin.JdbcThinConnection.sendRequest(JdbcThinConnection.java:1004)
at
org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute0(JdbcThinStatement.java:231)
at
org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.executeQuery(JdbcThinStatement.java:139)
at
com.zaxxer.hikari.pool.ProxyStatement.executeQuery(ProxyStatement.java:111)
at
com.zaxxer.hikari.pool.HikariProxyStatement.executeQuery(HikariProxyStatement.java...

The sqls work fine while ignite just started.Such error happens after ignite
runs a while.And after that,the error seems happen every time.

Do u have any ideas about it?




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
yangjiajun yangjiajun
Reply | Threaded
Open this post in threaded view
|

Re: With as syntax does not work in ignite 2.9.0?

In reply to this post by Pavel Vinokurov
Hello.Thanks for u reply.

Sorry for that I can't post sqls beacuse they contain sensitive bussiness
info.I'm also sorry that I can't make a reproducer now.

Here is my code to execute query:
ResultSet excuteQuery(Connection conn, String sql) throws SQLException {
        Statement stmt = conn.createStatement();
        stmt.setQueryTimeout(7200);
        ResultSet rs = stmt.executeQuery(sql);
        rs.setFetchSize(15000);
        return rs;
}

void closeResultSet(ResultSet rs) throws SQLException {
        rs.close();
        rs.getStatement().close();
        rs.getStatement().getConnection().close();
}

try(Connection conn = pool.getConnection()){
        try(ResultSet rs = excuteQuery(conn,sql)){
                /**
                 hadle result set
                */
                closeResultSet(rs);
        }
}

My hikariCP pool settings:
HikariDataSource ds = new HikariDataSource();
ds.setDriverClassName("org.apache.ignite.IgniteJdbcThinDriver");
ds.setMaximumPoolSize(100);
ds.setLeakDetectionThreshold(600000);
ds.setConnectionTimeout(60000);
ds.setMinimumIdle(0);
ds.setReadOnly(true);

The reseason I believe with as syntax does not work anymore is I have 5 sqls
got in trouble and all of then contain with as syntax.Another reason is such
error happens at parse step.And we can see error info relates to 'temp
table' which I think with as needs temp table.

But u guys are experts,I will try my best to follow u advices and collect
more info u need.






--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
ilya.kasnacheev ilya.kasnacheev
Reply | Threaded
Open this post in threaded view
|

Re: With as syntax does not work in ignite 2.9.0?

Hello!

I don't think we can help you further without looking at some SQL statements. You could probably try commercial support which you trust.

What's the connection string for your driver? Does it point to a server node or client node?

Regards,
--
Ilya Kasnacheev


вт, 8 дек. 2020 г. в 09:17, yangjiajun <[hidden email]>:
Hello.Thanks for u reply.

Sorry for that I can't post sqls beacuse they contain sensitive bussiness
info.I'm also sorry that I can't make a reproducer now.

Here is my code to execute query:
ResultSet excuteQuery(Connection conn, String sql) throws SQLException {
        Statement stmt = conn.createStatement();
        stmt.setQueryTimeout(7200);
        ResultSet rs = stmt.executeQuery(sql);
        rs.setFetchSize(15000);
        return rs;
}

void closeResultSet(ResultSet rs) throws SQLException {
        rs.close();
        rs.getStatement().close();
        rs.getStatement().getConnection().close();
}

try(Connection conn = pool.getConnection()){
        try(ResultSet rs = excuteQuery(conn,sql)){
                /**
                 hadle result set
                */
                closeResultSet(rs);
        }
}

My hikariCP pool settings:
HikariDataSource ds = new HikariDataSource();
ds.setDriverClassName("org.apache.ignite.IgniteJdbcThinDriver");
ds.setMaximumPoolSize(100);
ds.setLeakDetectionThreshold(600000);
ds.setConnectionTimeout(60000);
ds.setMinimumIdle(0);
ds.setReadOnly(true);

The reseason I believe with as syntax does not work anymore is I have 5 sqls
got in trouble and all of then contain with as syntax.Another reason is such
error happens at parse step.And we can see error info relates to 'temp
table' which I think with as needs temp table.

But u guys are experts,I will try my best to follow u advices and collect
more info u need.






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