apache / shardingsphere

Distributed SQL transaction & query engine for data sharding, scaling, encryption, and more - on any database.
Apache License 2.0
19.74k stars 6.69k forks source link

Occasionally occurs java.lang.NullPointerException,but retrying fixes it #32038

Closed sangewuxie closed 1 month ago

sangewuxie commented 1 month ago

Caused by: java.lang.NullPointerException at org.apache.shardingsphere.core.parse.antlr.rule.registry.ParsingRuleRegistry.findSQLStatementRule(ParsingRuleRegistry.java:117) ~[sharding-core-parse-common-4.0.0-RC1.jar!/:4.0.0-RC1] at org.apache.shardingsphere.core.parse.antlr.parser.SQLParserEngine.parse(SQLParserEngine.java:55) ~[sharding-core-parse-common-4.0.0-RC1.jar!/:4.0.0-RC1] at org.apache.shardingsphere.core.parse.antlr.AntlrParsingEngine.parse(AntlrParsingEngine.java:67) ~[sharding-core-parse-common-4.0.0-RC1.jar!/:4.0.0-RC1] at org.apache.shardingsphere.core.parse.SQLParsingEngine.parse(SQLParsingEngine.java:61) ~[sharding-core-parse-common-4.0.0-RC1.jar!/:4.0.0-RC1] at org.apache.shardingsphere.core.route.router.sharding.ParsingSQLRouter.parse(ParsingSQLRouter.java:78) ~[sharding-core-route-4.0.0-RC1.jar!/:4.0.0-RC1] at org.apache.shardingsphere.core.route.PreparedStatementRoutingEngine.route(PreparedStatementRoutingEngine.java:64) ~[sharding-core-route-4.0.0-RC1.jar!/:4.0.0-RC1] at org.apache.shardingsphere.core.PreparedQueryShardingEngine.route(PreparedQueryShardingEngine.java:60) ~[sharding-core-entry-4.0.0-RC1.jar!/:4.0.0-RC1] at org.apache.shardingsphere.core.BaseShardingEngine.shard(BaseShardingEngine.java:64) ~[sharding-core-entry-4.0.0-RC1.jar!/:4.0.0-RC1] at org.apache.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement.shard(ShardingPreparedStatement.java:224) ~[sharding-jdbc-core-4.0.0-RC1.jar!/:4.0.0-RC1] at org.apache.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement.execute(ShardingPreparedStatement.java:170) ~[sharding-jdbc-core-4.0.0-RC1.jar!/:4.0.0-RC1] at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:47) ~[mybatis-3.5.7.jar!/:3.5.7] at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74) ~[mybatis-3.5.7.jar!/:3.5.7] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_251] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_251] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_251] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_251] at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:64) ~[mybatis-3.5.7.jar!/:3.5.7] at com.sun.proxy.$Proxy290.update(Unknown Source) ~[?:?] at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:50) ~[mybatis-3.5.7.jar!/:3.5.7] at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117) ~[mybatis-3.5.7.jar!/:3.5.7] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_251] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_251] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_251] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_251] at org.apache.ibatis.plugin.Invocation.proceed(Invocation.java:49) ~[mybatis-3.5.7.jar!/:3.5.7] at com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor.intercept(MybatisPlusInterceptor.java:106) ~[mybatis-plus-extension-3.4.3.1.jar!/:3.4.3.1] at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:62) ~[mybatis-3.5.7.jar!/:3.5.7] at com.sun.proxy.$Proxy289.update(Unknown Source) ~[?:?] at org.apache.ibatis.session.defaults.DefaultSqlSession.update$original$P1BVKFNf(DefaultSqlSession.java:194) ~[mybatis-3.5.7.jar!/:3.5.7] at org.apache.ibatis.session.defaults.DefaultSqlSession.update$original$P1BVKFNf$accessor$g7W56BbV(DefaultSqlSession.java) ~[mybatis-3.5.7.jar!/:3.5.7] at org.apache.ibatis.session.defaults.DefaultSqlSession$auxiliary$0v6F0Wvl.call(Unknown Source) ~[mybatis-3.5.7.jar!/:3.5.7] at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java) ~[mybatis-3.5.7.jar!/:3.5.7] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_251] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_251] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_251] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_251] at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:427) ~[mybatis-spring-2.0.6.jar!/:2.0.6] ... 83 more

terrymanu commented 1 month ago

The information you provided does not fully understand the issue. Please refer to the issue template to fill the necessary information, which will help us catch the problem clearly.

sangewuxie commented 1 month ago

During usage, a NullPointerException occasionally occurs, but retrying resolves the issue. As for other information, it has already been printed in the error stack trace.

terrymanu commented 1 month ago

I don't think that the information you've provided is sufficient for developers to reproduce the issue. Please revise your issue using the template.

github-actions[bot] commented 1 month ago

There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.