com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'kaihu.t_client_info' doesn't exist

有两个model,使用第一个dao的时候可以自动创建表

但是使用第二个model的时候不能,会报错

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'kaihu.t_client_info' doesn't exist

可以正常创建表的

不可以正常创建表的

原因:

设置了映射文件的主键策略是native,所以这个字段就必须是int的,可以自增的才行

原来这个id 是 string类型的,准备用uuid呢,看起来得换一个办法使用uuid

[jnhs]hibernate只能创建一张/表不创建表com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'kaihu.t_client_info' doesn't exist和org.hibernate.exception.SQLGrammarException: could not execute statement的更多相关文章

  1. 将windows上面的项目拷贝到Linux环境下报错不能够找到对应的表com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'puyang.ServiceType' doesn't exist

    将一模一样的项目从win迁移到到linux上报错: 一开始还是以为是linux不能识别hql语句,查找资料发现是因为Liunx服务器上mysql是区分大小写的,而本地是不区分的如:代码是这样写的 @E ...

  2. 在hive执行创建表的命令,遇到异常com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key was too long; max key length is 767 bytes

    今天在练习hive的操作时,在创建数据表时,遇到了异常 FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.ex ...

  3. 表字段或表名出现Mysql关键字或保留字导致问题 Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have

    MySQL 5.7使用的关键字和保留字 https://dev.mysql.com/doc/refman/5.7/en/keywords.html 当我们建表的时候如果使用了关键字或者保留字,则在执行 ...

  4. hibernate 报错com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException

    解释:JavaBean的主键类型只能是int类型,因为在映射关系配置是自动增长的,String类型是不能自动增长的,所以会报错.

  5. 报错:org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute statement; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute statement

    org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute statement; SQL [n ...

  6. Java EE 之 Hibernate异常总结【4】org.hibernate.exception.SQLGrammarException: could not execute statement

    本质原因:配置的Java Bean,由Hibernate自动产生的SQL语句中有语法错误 原因如下: 情况1.存在字段名/表名与数据库关键字冲突 情况2.MySQL5.0以后与MySQL5.0以前事务 ...

  7. Java EE 之 Hibernate异常解决:org.hibernate.exception.SQLGrammarException: could not execute statement

    本质原因:配置的Java Bean,由Hibernate自动产生的SQL语句中有语法错误 原因如下: 情况1.存在字段名/表名与数据库关键字冲突 情况2.MySQL5.0以后与MySQL5.0以前事务 ...

  8. troubshooting-sqoop 导出 TiDB表数据报com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

    2019-11-22 17:15:27,705 FATAL [IPC Server handler 13 on 44844] org.apache.hadoop.mapred.TaskAttemptL ...

  9. org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query

    原因: 这个问题的解决方案很简单,主要是因为数据库中不存在相关的表或者列. org.springframework.dao.InvalidDataAccessApiUsageException: Pa ...

随机推荐

  1. Apache Flink 进阶入门(二):Time 深度解析

    前言 Flink 的 API 大体上可以划分为三个层次:处于最底层的 ProcessFunction.中间一层的 DataStream API 和最上层的 SQL/Table API,这三层中的每一层 ...

  2. Python-网络编程之粘包、UDP

    目录 粘包问题 subprocess模块 struct模块 UDP协议编程 简易qq聊天室 粘包问题 什么是粘包问题呢? 在我们写 tcp socket编程的时候,tcp协议是一个流式的协议,服务端第 ...

  3. Android基础控件单选按钮RadioButton和Checkbox复选按钮的使用

    1.相关简介 RadioButton需要和RadioGroup结合使用,在RadioGroup设置布局方式! Checkbox是单独使用,本文为了方便放在了RadioGroup中! 2.简单使用 方法 ...

  4. 微信小程序连续旋转动画this.animation.rotate

    一..js中封装旋转动画方法 添加animation属性 data:{ animation:''" } 改变animation的值(官网提供角度范围是-180~180,但是我发现角度越大会一 ...

  5. svn both sides of the move must be committed together

    从一个模块移动文件到另一个模块下,提交的时候报错. 选择2个模块工程,team-与资源库同步 选择2个模块下,2份文件,一份减号图标,一份加号图标,同时提交. 还有种情况,当你重名文件后,提交报错 打 ...

  6. Django之框架简介

    了解即可: 1.MVC,全名是Model View Controller,是软件工程中的一种软件架构模式,把软件系统分为三个基本部分:模型(Model).视图(View)和控制器(Controller ...

  7. 使用springboot上传文件至nginx代理服务器

    nginx配置图片服务器 server { listen 8001; server_name image.xxx.com; proxy_set_header X-Forwarded-Host $hos ...

  8. 打开springboot的run dashboard

    默认情况下,idea的run dashboard是关闭的,当检测到你有多个springboot项目时会弹出提示框,询问是否打开. 如果我们想要自己打开,需要修改配置. 在你的idea的项目目录中,有一 ...

  9. EnumProcess 实现枚举进程

    BOOL WINAPI EnumProcesses ( _Out_writes_bytes_(cb) DWORD * lpidProcess, _In_ DWORD cb, _Out_ LPDWORD ...

  10. 利用animate.css和es6制作文字向上滚动的效果

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <link rel= ...