【Hibernate】Table '表名' doesn't exist

时间:2021-09-21 22:17:25
1.
【Hibernate】Table '表名' doesn't exist< property  name ="hbm2ddl.auto" > create </ property >

被注释掉,或者中间不是create

2.表中有关键字,如:
order,level,address,degree等。


3.将

<property name="dialect">org.hibernate.dialect.MySQLDialect</property>

替换成

<property name="dialect">org.hibernate.dialect.MySQL5Dialect</property>

MysqlDialect这个是比较老的,如果你是用的mysql5,最好是用MySQL5Dialect,后面的方言是针对mysql5的一些新特性做了一些优化的,更快了效率,Mysql5Dialect是继承了MysqlDialect的所以MysqlDialect能干的事 Mysql5Dialect都能干。

4.在配置文件中不小心写了两个同名属性,如:
【Hibernate】Table '表名' doesn't exist<? xml version="1.0" ?>
【Hibernate】Table '表名' doesn't exist
<! DOCTYPE hibernate-mapping PUBLIC
【Hibernate】Table '表名' doesn't exist    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
【Hibernate】Table '表名' doesn't exist"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"
>
【Hibernate】Table '表名' doesn't exist
< hibernate-mapping  package ="org.hibernate.auction" >
【Hibernate】Table '表名' doesn't exist
【Hibernate】Table '表名' doesn't exist    
< class  name ="com.runsky.domain.AdditionalInformation"
【Hibernate】Table '表名' doesn't exist        table
="AdditionalInformation"  lazy ="false" >
【Hibernate】Table '表名' doesn't exist            
< id  name ="id"  column  ="ID"  length ="32" >
【Hibernate】Table '表名' doesn't exist                
< generator  class ="uuid.hex" />
【Hibernate】Table '表名' doesn't exist            
</ id >
【Hibernate】Table '表名' doesn't exist            
< property  name ="tag"  column  ="tag"   />
【Hibernate】Table '表名' doesn't exist            
< property  name ="content"  column  ="content"   />
                <property name="id" column ="id" />   
【Hibernate】Table '表名' doesn't exist    
</ class >
【Hibernate】Table '表名' doesn't exist
</ hibernate-mapping >