chenrtoken opened a new issue #8065:
URL: https://github.com/apache/shardingsphere/issues/8065
Framework:
springboot:2.0.3.RELEASE
mybatis-plus: 2.2.0
mybatis: 3.4.6
sharding-jdbc-spring-boot-starter: ,4.1.1
SQLParserEngine#parse0 do parse 'select park_code , addtime from
t_park_info limit 1' throw NullPointerException;
console message:
line 1:27 no viable alternative at input 'addtimefrom'
line 1:27 no viable alternative at input 'addtimefrom'
org.mybatis.spring.MyBatisSystemException: nested exception is
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: java.lang.NullPointerException
### The error may exist in com/tnar/model/mapper/TParkInfoMapper.java (best
guess)
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: select park_code , addtime from t_park_info limit 1
### Cause: java.lang.NullPointerException
### Cause: java.lang.NullPointerException
at
org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
at
org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:150)
at
org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141)
at
org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:77)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:433)
... 96 more
Caused by: java.lang.NullPointerException
at
org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
at
org.apache.shardingsphere.sql.parser.mysql.visitor.MySQLVisitor.visitPredicate(MySQLVisitor.java:316)
at
org.apache.shardingsphere.sql.parser.mysql.visitor.MySQLVisitor.visitPredicate(MySQLVisitor.java:121)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]