如果删掉持久单元,在建一个同样的持久单元,在有的工程中要报编译错误
注: Creating static metadata factory ...
注: Optional file was not found: META-INF/orm.xml continuing with generation.
注: Optional file was not found: META-INF/eclipselink-orm.xml continuing with generation.
注: Hibernate JPA 2 Static-Metamodel Generator 1.3.0.Final
错误: Problem with Filer: Attempt to recreate a file for type htm.NewEntity_
1 个错误
/root/NetBeansProjects/WebApplication3/nbproject/build-impl.xml:874: The following error occurred while executing this line:
/root/NetBeansProjects/WebApplication3/nbproject/build-impl.xml:296: Compile failed; see the compiler error output for details.
构建失败 (总时间: 2 秒)
但是,同样的操作,在有的工程中则没有,具体原因未知
在配置Spring Data Jpa的过程中,如果遇到
持久层采用Eclipselink的话,遇到eclipselink.weaving错误的话,在持久单元中加入
如果遇到hibernate.dialect错误
设置hibernate.dialect
RDBMS 方言
DB2 org.hibernate.dialect.DB2Dialect
DB2 AS/400 org.hibernate.dialect.DB2400Dialect
DB2 OS390 org.hibernate.dialect.DB2390Dialect
PostgreSQL org.hibernate.dialect.PostgreSQLDialect
MySQL org.hibernate.dialect.MySQLDialect
MySQL with InnoDB org.hibernate.dialect.MySQLInnoDBDialect
MySQL with MyISAM org.hibernate.dialect.MySQLMyISAMDialect
Oracle (any version) org.hibernate.dialect.OracleDialect
Oracle 9i/10g org.hibernate.dialect.Oracle9Dialect
Sybase org.hibernate.dialect.SybaseDialect
Sybase Anywhere org.hibernate.dialect.SybaseAnywhereDialect
Microsoft SQL Server org.hibernate.dialect.SQLServerDialect
SAP DB org.hibernate.dialect.SAPDBDialect
Informix org.hibernate.dialect.InformixDialect
HypersonicSQL org.hibernate.dialect.HSQLDialect
Ingres org.hibernate.dialect.IngresDialect
Progress org.hibernate.dialect.ProgressDialect
Mckoi SQL org.hibernate.dialect.MckoiDialect
Interbase org.hibernate.dialect.InterbaseDialect
Pointbase org.hibernate.dialect.PointbaseDialect
FrontBase org.hibernate.dialect.FrontbaseDialect
Fclass="or fw600"irebird org.hibernate.dialect.FirebirdDialect
自己去找对应的值,我用Mysql,就用org.hibernate.dialect.MySQLDialect