woshiluoshao commented on issue #23485:
URL:
https://github.com/apache/shardingsphere/issues/23485#issuecomment-1378177772
> Please provide more exception information about ShardingSphere, and it is
recommended to open sql-show to print out logic SQL and actual SQL to
facilitate troubleshooting.
============== Sql Start ==============
Execute ID :
cn.ffcs.cty.modules.templatemanage.mapper.TemplateCfgMapper.selectList
Execute SQL : select * from T_TEMPLATE_CFG T,
readwrite_ds.zhsq.t_dc_org_entity_info B where T.org_code = B.org_code and
T.IS_VALID = '1'
Execute Time: 2023-01-11T10:47:21.711
============== Sql End ==============
2023-01-11 10:47:25,649 INFO [http-nio-8889-exec-1]
org.apache.shardingsphere.infra.executor.sql.log.SQLLogger(74): Logic SQL:
SELECT * FROM T_TEMPLATE_CFG T, readwrite_ds.zhsq.t_dc_org_entity_info B WHERE
T.org_code = B.org_code AND T.IS_VALID = '1'
2023-01-11 10:47:25,649 INFO [http-nio-8889-exec-1]
org.apache.shardingsphere.infra.executor.sql.log.SQLLogger(74): SQLStatement:
OracleSelectStatement(super=SelectStatement(super=AbstractSQLStatement(parameterCount=0,
parameterMarkerSegments=[], commentSegments=[]),
projections=ProjectionsSegment(startIndex=7, stopIndex=7,
projections=[ShorthandProjectionSegment(startIndex=7, stopIndex=7,
owner=Optional.empty, alias=Optional.empty)], distinctRow=false),
from=JoinTableSegment(startIndex=14, stopIndex=48, alias=Optional.empty,
left=SimpleTableSegment(tableName=TableNameSegment(startIndex=14, stopIndex=27,
identifier=IdentifierValue(value=T_TEMPLATE_CFG, quoteCharacter=NONE)),
owner=Optional.empty, alias=Optional[T]), joinType=COMMA,
right=SimpleTableSegment(tableName=TableNameSegment(startIndex=45,
stopIndex=48, identifier=IdentifierValue(value=zhsq, quoteCharacter=NONE)),
owner=Optional[OwnerSegment(startIndex=32, stopIndex=43,
identifier=IdentifierValue(value=readwrite_ds, quote
Character=NONE), owner=Optional.empty)], alias=Optional.empty),
condition=null, using=[]), where=Optional.empty, groupBy=Optional.empty,
having=Optional.empty, orderBy=Optional.empty, combine=Optional.empty),
lock=Optional.empty, modelSegment=Optional.empty, withSegment=Optional.empty)
2023-01-11 10:47:25,649 INFO [http-nio-8889-exec-1]
org.apache.shardingsphere.infra.executor.sql.log.SQLLogger(74): Actual SQL:
write_ds ::: SELECT * FROM T_TEMPLATE_CFG T, zhsq.t_dc_org_entity_info B WHERE
T.org_code = B.org_code AND T.IS_VALID = '1'
============== Sql Start ==============
Execute ID :
cn.ffcs.cty.modules.templatemanage.mapper.TemplateCfgMapper.selectList2
Execute SQL : select count(1) from T_TEMPLATE_CFG T join
readwrite_ds.zhsq.t_dc_org_entity_info B on T.org_code = B.org_code where
T.IS_VALID = '1'
Execute Time: 2023-01-11T10:47:33.005
============== Sql End ==============
2023-01-11 10:47:33,471 INFO [http-nio-8889-exec-1]
org.apache.shardingsphere.infra.executor.sql.log.SQLLogger(74): Logic SQL:
SELECT count(1) FROM T_TEMPLATE_CFG T JOIN
readwrite_ds.zhsq.t_dc_org_entity_info B ON T.org_code = B.org_code WHERE
T.IS_VALID = '1'
2023-01-11 10:47:33,472 INFO [http-nio-8889-exec-1]
org.apache.shardingsphere.infra.executor.sql.log.SQLLogger(74): SQLStatement:
OracleSelectStatement(super=SelectStatement(super=AbstractSQLStatement(parameterCount=0,
parameterMarkerSegments=[], commentSegments=[]),
projections=ProjectionsSegment(startIndex=7, stopIndex=14,
projections=[AggregationProjectionSegment(startIndex=7, stopIndex=14,
type=COUNT, innerExpression=(1),
parameters=[LiteralExpressionSegment(startIndex=13, stopIndex=13, literals=1)],
alias=Optional.empty)], distinctRow=false),
from=SimpleTableSegment(tableName=TableNameSegment(startIndex=21, stopIndex=34,
identifier=IdentifierValue(value=T_TEMPLATE_CFG, quoteCharacter=NONE)),
owner=Optional.empty, alias=Optional[T]), where=Optional.empty,
groupBy=Optional.empty, having=Optional.empty, orderBy=Optional.empty,
combine=Optional.empty), lock=Optional.empty, modelSegment=Optional.empty,
withSegment=Optional.empty)
2023-01-11 10:47:33,472 INFO [http-nio-8889-exec-1]
org.apache.shardingsphere.infra.executor.sql.log.SQLLogger(74): Actual SQL:
write_ds ::: SELECT count(1) FROM T_TEMPLATE_CFG T JOIN
readwrite_ds.zhsq.t_dc_org_entity_info B ON T.org_code = B.org_code WHERE
T.IS_VALID = '1'
org.springframework.jdbc.BadSqlGrammarException:
### Error querying database. Cause: java.sql.SQLSyntaxErrorException:
ORA-00905: 缺失关键字
### The error may exist in file
[D:\workspace\FFCS\cty-project\cty\cty-service\target\classes\cn\ffcs\cty\modules\templatemanage\mapper\TemplateCfgMapper.xml]
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: SELECT count(1) FROM T_TEMPLATE_CFG T JOIN
readwrite_ds.zhsq.t_dc_org_entity_info B ON T.org_code = B.org_code WHERE
T.IS_VALID = '1'
### Cause: java.sql.SQLSyntaxErrorException: ORA-00905: 缺失关键字
; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException:
ORA-00905: 缺失关键字
at
org.springframework.jdbc.support.SQLExceptionSubclassTranslator.doTranslate(SQLExceptionSubclassTranslator.java:93)
at
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70)
at
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:79)
at
org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:91)
at
org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:441)
at com.sun.proxy.$Proxy160.selectOne(Unknown Source)
at
org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:160)
at
com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:89)
at
com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:148)
at
com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89)
at com.sun.proxy.$Proxy217.selectList2(Unknown Source)
at
cn.ffcs.cty.modules.templatemanage.service.impl.TemplateCfgServiceImpl.searchList(TemplateCfgServiceImpl.java:64)
at
cn.ffcs.cty.modules.templatemanage.service.impl.TemplateCfgServiceImpl$$FastClassBySpringCGLIB$$1.invoke(<generated>)
at
org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)
at
org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
at
org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388)
at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)
at
org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)
at
cn.ffcs.cty.modules.templatemanage.service.impl.TemplateCfgServiceImpl$$EnhancerBySpringCGLIB$$1.searchList(<generated>)
at
org.apache.dubbo.common.bytecode.Wrapper46.invokeMethod(Wrapper46.java)
at
org.apache.dubbo.rpc.proxy.javassist.JavassistProxyFactory$1.doInvoke(JavassistProxyFactory.java:47)
at
org.apache.dubbo.rpc.proxy.AbstractProxyInvoker.invoke(AbstractProxyInvoker.java:84)
at
org.apache.dubbo.config.invoker.DelegateProviderMetaDataInvoker.invoke(DelegateProviderMetaDataInvoker.java:56)
at
org.apache.dubbo.rpc.protocol.InvokerWrapper.invoke(InvokerWrapper.java:56)
at
cn.ffcs.shequ.log.utils.exception.FFCSDubboExceptionFilter.invoke(FFCSDubboExceptionFilter.java:23)
at org.apache.dubbo.rpc.protocol.FilterNode.invoke(FilterNode.java:61)
at
org.apache.dubbo.rpc.protocol.dubbo.filter.TraceFilter.invoke(TraceFilter.java:77)
at org.apache.dubbo.rpc.protocol.FilterNode.invoke(FilterNode.java:61)
at
org.apache.dubbo.rpc.filter.TimeoutFilter.invoke(TimeoutFilter.java:44)
at org.apache.dubbo.rpc.protocol.FilterNode.invoke(FilterNode.java:61)
at
org.apache.dubbo.rpc.filter.ExceptionFilter.invoke(ExceptionFilter.java:52)
at org.apache.dubbo.rpc.protocol.FilterNode.invoke(FilterNode.java:61)
at
org.apache.dubbo.rpc.filter.GenericFilter.invoke(GenericFilter.java:192)
at org.apache.dubbo.rpc.protocol.FilterNode.invoke(FilterNode.java:61)
at
org.apache.dubbo.rpc.filter.ClassLoaderFilter.invoke(ClassLoaderFilter.java:38)
at org.apache.dubbo.rpc.protocol.FilterNode.invoke(FilterNode.java:61)
at org.apache.dubbo.rpc.filter.EchoFilter.invoke(EchoFilter.java:41)
at org.apache.dubbo.rpc.protocol.FilterNode.invoke(FilterNode.java:61)
at
org.apache.dubbo.rpc.filter.ContextFilter.invoke(ContextFilter.java:129)
at org.apache.dubbo.rpc.protocol.FilterNode.invoke(FilterNode.java:61)
at
org.apache.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:96)
at org.apache.dubbo.common.bytecode.proxy39.searchList(proxy39.java)
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
com.caucho.hessian.server.HessianSkeleton.invoke(HessianSkeleton.java:302)
at
com.caucho.hessian.server.HessianSkeleton.invoke(HessianSkeleton.java:198)
at
org.apache.dubbo.rpc.protocol.hessian.HessianProtocol$HessianHandler.handle(HessianProtocol.java:206)
at
org.apache.dubbo.remoting.http.servlet.DispatcherServlet.service(DispatcherServlet.java:64)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at
com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at
org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:96)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
at
org.apache.catalina.core.StandardContextValve.__invoke(StandardContextValve.java:97)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:41002)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)
at
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382)
at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:895)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1732)
at
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at
org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
at
org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.sql.SQLSyntaxErrorException: ORA-00905: 缺失关键字
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:509)
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:461)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1104)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:550)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:268)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:655)
at
oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:270)
at
oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:91)
at
oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:807)
at
oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:983)
at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1168)
at
oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3666)
at
oracle.jdbc.driver.T4CPreparedStatement.executeInternal(T4CPreparedStatement.java:1426)
at
oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3778)
at
oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1081)
at
com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:497)
at
org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement$2.executeSQL(ShardingSpherePreparedStatement.java:442)
at
org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement$2.executeSQL(ShardingSpherePreparedStatement.java:438)
at
org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutorCallback.execute(JDBCExecutorCallback.java:95)
at
org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutorCallback.execute(JDBCExecutorCallback.java:75)
at
org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine.syncExecute(ExecutorEngine.java:135)
at
org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine.serialExecute(ExecutorEngine.java:121)
at
org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine.execute(ExecutorEngine.java:115)
at
org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutor.execute(JDBCExecutor.java:65)
at
org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutor.execute(JDBCExecutor.java:49)
at
org.apache.shardingsphere.driver.executor.DriverJDBCExecutor.doExecute(DriverJDBCExecutor.java:156)
at
org.apache.shardingsphere.driver.executor.DriverJDBCExecutor.execute(DriverJDBCExecutor.java:145)
at
org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.execute(ShardingSpherePreparedStatement.java:403)
at
org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:64)
at
org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)
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.apache.ibatis.plugin.Plugin.invoke(Plugin.java:64)
at com.sun.proxy.$Proxy278.query(Unknown Source)
at
org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:63)
at
org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325)
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
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.apache.ibatis.plugin.Plugin.invoke(Plugin.java:64)
at com.sun.proxy.$Proxy277.query(Unknown Source)
at
com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor.intercept(MybatisPlusInterceptor.java:81)
at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:62)
at com.sun.proxy.$Proxy277.query(Unknown Source)
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.apache.ibatis.plugin.Invocation.proceed(Invocation.java:49)
at
cn.ffcs.cloudna.mp.intercept.SqlLogInterceptor.intercept(SqlLogInterceptor.java:87)
at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:62)
at com.sun.proxy.$Proxy277.query(Unknown Source)
at
org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:151)
at
org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:145)
at
org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)
at
org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:76)
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:427)
... 84 more
Caused by: Error : 905, Position : 60, Sql = SELECT count(1) FROM
T_TEMPLATE_CFG T JOIN readwrite_ds.zhsq.t_dc_org_entity_info B ON T.org_code =
B.org_code WHERE T.IS_VALID = '1', OriginalSql = SELECT count(1) FROM
T_TEMPLATE_CFG T JOIN readwrite_ds.zhsq.t_dc_org_entity_info B ON T.org_code =
B.org_code WHERE T.IS_VALID = '1', Error Msg = ORA-00905: 缺失关键字
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:513)
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]