当前位置: 首页 > wzjs >正文

做网站要有什么团队互联网方案设计

做网站要有什么团队,互联网方案设计,北京响应式网站建设推荐,什么是软件开发工具目录 简介异常信息SQL排查原因解决 简介 1、程序jdk1.8升级为jdk21 2、ShardingSphere框架从4.1.1升级为5.2.1 3、使用 information_schema.tables 查询时报错 异常信息 ### Error querying database. Cause: java.sql.SQLSyntaxErrorException: Table 数据库名称.tables …

目录

    • 简介
    • 异常信息
    • SQL
    • 排查
    • 原因
    • 解决


简介

1、程序jdk1.8升级为jdk21

2、ShardingSphere框架从4.1.1升级为5.2.1

3、使用 information_schema.tables 查询时报错


异常信息

### Error querying database.  Cause: java.sql.SQLSyntaxErrorException: Table '数据库名称.tables' doesn't exist
### The error may exist in file [F:\xxx\project\airobot_llm\robotmanagement\source4cloud-jdk21\server\FocusRobotMg-llm\target\classes\mappings\trainplatform\RobotModelVersionMapper.xml]
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: SELECT count(DISTINCT 1) FROM information_schema.tables WHERE table_schema = DATABASE() AND TABLE_NAME = 't_model_train_version'
### Cause: java.sql.SQLSyntaxErrorException: Table '数据库名称.tables' doesn't exist
; bad SQL grammar []
org.springframework.jdbc.BadSqlGrammarException: 
### Error querying database.  Cause: java.sql.SQLSyntaxErrorException: Table '数据库名称.tables' doesn't exist
### The error may exist in file [F:\xxx\project\airobot_llm\robotmanagement\source4cloud-jdk21\server\FocusRobotMg-llm\target\classes\mappings\trainplatform\RobotModelVersionMapper.xml]
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: SELECT count(DISTINCT 1) FROM information_schema.tables WHERE table_schema = DATABASE() AND TABLE_NAME = 't_model_train_version'
### Cause: java.sql.SQLSyntaxErrorException: Table '数据库名称.tables' doesn't exist
; bad SQL grammar []at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:246)at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:107)at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:93)at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:347)at jdk.proxy2/jdk.proxy2.$Proxy116.selectOne(Unknown Source)at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:154)at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:87)at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:141)at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:86)at jdk.proxy2/jdk.proxy2.$Proxy368.isExistTable(Unknown Source)at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)at java.base/java.lang.reflect.Method.invoke(Method.java:580)at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:355)at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:138)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:223)at jdk.proxy2/jdk.proxy2.$Proxy369.isExistTable(Unknown Source)at com.xxx.utils.RedisInitUtil.initReleaseModelVersion(RedisInitUtil.java:432)at com.xxx.utils.RedisInitUtil.setCompanyOriginInf(RedisInitUtil.java:345)at com.xxx.utils.ConstantUtil.initRedis(ConstantUtil.java:91)at com.xxx.utils.ConstantUtil.initialize(ConstantUtil.java:68)at com.xxx.component.InitCommandLineRunner.run(InitCommandLineRunner.java:38)at org.springframework.boot.SpringApplication.lambda$callRunner$5(SpringApplication.java:790)at org.springframework.util.function.ThrowingConsumer$1.acceptWithException(ThrowingConsumer.java:82)at org.springframework.util.function.ThrowingConsumer.accept(ThrowingConsumer.java:60)at org.springframework.util.function.ThrowingConsumer$1.accept(ThrowingConsumer.java:86)at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:798)at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:789)at org.springframework.boot.SpringApplication.lambda$callRunners$3(SpringApplication.java:774)at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)at java.base/java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357)at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:510)at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:774)at org.springframework.boot.SpringApplication.run(SpringApplication.java:342)at org.springframework.boot.SpringApplication.run(SpringApplication.java:1363)at org.springframework.boot.SpringApplication.run(SpringApplication.java:1352)at com.xxx.RobotManagerSvr.main(RobotManagerSvr.java:36)
Caused by: java.sql.SQLSyntaxErrorException: Table '数据库名称.tables' doesn't existat com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953)at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:371)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.parallelExecute(ExecutorEngine.java:131)at org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine.execute(ExecutorEngine.java:116)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:65)at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:80)at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:65)at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:336)at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:158)at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:110)at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:90)at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:154)at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147)at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:142)at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:75)at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)at java.base/java.lang.reflect.Method.invoke(Method.java:580)at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:333)... 40 common frames omitted

SQL

查询表是否存在的sql

SELECT count(DISTINCT 1) FROM information_schema.tables WHERE table_schema = DATABASE() AND TABLE_NAME = 't_model_train_version'

排查

ShardingSphere4.1.1时,该SQL是正常的,应该是框架升级导致的


原因

ShardingSphere4.1.1时,该SQL是正常的,应该是框架升级导致的

具体原因不明


解决

方法一:直接查询表,在代码中通过try/catch来判断是否存在该表

SELECT 1 FROM 表名 LIMIT 1

方法二:使用 SHOW TABLES

SHOW TABLES LIKE 表名

文章转载自:

http://iJUMSkBt.bdfph.cn
http://MrMgG0Vn.bdfph.cn
http://DKqXnGrW.bdfph.cn
http://pk7Ve5nr.bdfph.cn
http://oFADkWPG.bdfph.cn
http://jDJqS8pH.bdfph.cn
http://5j4gq3sT.bdfph.cn
http://q3MKBvZq.bdfph.cn
http://rVy81eIp.bdfph.cn
http://zgPet7dJ.bdfph.cn
http://JT6tEKKM.bdfph.cn
http://02wQDNTu.bdfph.cn
http://VSSTESjp.bdfph.cn
http://Kq7eTO95.bdfph.cn
http://OjzIquUh.bdfph.cn
http://5ncrXx6H.bdfph.cn
http://NU8iekfZ.bdfph.cn
http://jUfsFHCa.bdfph.cn
http://xGxJHEDU.bdfph.cn
http://4aTFnltG.bdfph.cn
http://SAXNLSvf.bdfph.cn
http://4eZBIBhM.bdfph.cn
http://EbolWkJl.bdfph.cn
http://tB2Qw7vR.bdfph.cn
http://mo8UZMfU.bdfph.cn
http://WnzIYRKG.bdfph.cn
http://cxzWr9xh.bdfph.cn
http://AJHyWMmU.bdfph.cn
http://o42ZQy9X.bdfph.cn
http://TwKlhVFP.bdfph.cn
http://www.dtcms.com/wzjs/779888.html

相关文章:

  • 现在找个网站这么难的吗做刷赞网站能赚钱吗
  • 溧阳 做网站长沙信息网
  • 网站建设需要上传数据库吗外贸简单网站建设
  • 江西星子网嘉兴优化网站公司
  • 科技公司网站模板国内建站平台
  • 中国外贸出口网站小企业管理软件排名
  • 东莞网站制作公司联系方式京东网站建设的要求
  • 上海定制网站建设公司网站正能量就是一打开全是的
  • 万网域名指向网站江苏建设网官方网站
  • 中国国防建设网站建e网室内设计网网址
  • 阿里巴巴网站建设与维护wordpress国内免费教程
  • 龙岩建设网站如何用自己电脑做网站页面
  • 做门窗的 在哪个网站跑业务跑业务wordpress菜单跳转到目录
  • 微网站建设方案书正常网站跳出率
  • 哈尔滨网站制作推广吉林最新消息今天新增
  • 企业信息公开网查询系统常州网站seo
  • 申请网站一年多少钱做网站域名重要吗
  • 网站制作公司 知乎上海网站推广联盟
  • 黄岛做网站的公司山东省城乡与住房建设厅网站
  • 电商平台正在建设中网站页面提示企业网站关键词优化排名应该怎么做
  • 做棋牌网站建设哪家便宜海口网站开发公司
  • 长沙seo网站优化公司个人域名网站
  • 做网站设计能赚钱吗网站代码在哪里看
  • 湖北住房城乡建设厅网站大型网站建设技巧
  • 网站设计的毕业设计坪山附近公司做网站建设哪家效益快
  • 如何做网站免费搭桥链接赣州网站建设较好的公司
  • 做韩服的视频网站外贸创业
  • 后台系统免费模板网站汕头seo专家
  • 西城做网站公司网络安全服务机构
  • 全国免费自学网站有哪些服务之家做网站简单吗