【方言】Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
几种 方言配置差异
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="2.0">
<persistence-unit name="userPU" transaction-type="RESOURCE_LOCAL">
<!--jpa的提供者-->
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<properties>
<!--声明数据库连接的驱动-->
<property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>
<!--jdbc数据库的连接地址-->
<property name="hibernate.connection.url" value="jdbc:mysql://10.32.11.74:3306/jparest"/>
<property name="hibernate.connection.username" value="root"/>
<property name="hibernate.connection.password" value="123456"/>
<!--配置方言-->
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5Dialect"/>
<!--激活查询日志功能-->
<property name="hibernate.show_sql" value="true"/>
<!--优雅地输出Sql-->
<property name="hibernate.format_sql" value="true"/>
<!--添加一条解释型标注-->
<property name="hibernate.use_sql_comments" value="false"/>
<!--配置如何根据java模型生成数据库表结构,常用update,validate-->
<property name="hibernate.hbm2ddl.auto" value="update"/>
</properties>
</persistence-unit>
</persistence>
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="showSql" value="${hibernate.showSql}" />
<property name="generateDdl" value="true" /> <property name="databasePlatform"
value="org.hibernate.dialect.MySQL5Dialect">
</property>
</bean>
</property>
<beans>
<bean id="entityManagerFactory"class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="generateDdl" value="true"/>
<property name="database" value="HSQL"/>
</bean>
</property>
<property name="persistenceUnitName" value="jpa.sample"/>
</bean>
<bean id="transactionManager"class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory"/>
</bean>
<jdbc:embedded-database id="dataSource" type="HSQL"/>
<jpa:repositories base-package="org.springframework.data.jpa.example.repository.simple"/>
</beans>
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 |
| Firebird |
org.hibernate.dialect.FirebirdDialect |
【方言】Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set的更多相关文章
- 【Hibernate】Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
今天用hibernate框架写crm项目时遇到报错: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' n ...
- [Hibernate]Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
使用Hibernate官方文档上的下面代码进行測试时报出这个异常. org.hibernate.HibernateException: Access to DialectResolutionInfo ...
- Connection cannot be null when 'hibernate.dialect' not set
严重: Exception sending context initialized event to listener instance of class [org.springframework.w ...
- Caused by: org.hibernate.HibernateException: Connection cannot be null when 'hibernate.dialect' not set
docs.jboss.org文档示例代码:(http://docs.jboss.org/hibernate/annotations/3.5/reference/en/html_single/) sta ...
- 正确决解Hibernate4.*中:Connection cannot be null when 'hibernate.dialect' not set
<?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hi ...
- Hibernate SQL方言 (hibernate.dialect) Spring配置文件applicationContext.xml
转自:http://www.cnblogs.com/wj-wangjun/archive/2009/10/21/1587624.html Hibernate SQL方言 (hibernate.dial ...
- Hibernate SQL方言 (hibernate.dialect)
数据库 hibernate方言 DB2 org.hibernate.dialect.DB2Dialect DB2 AS/400 org.hibernate.dialect.DB2400Dialect ...
- Hibernate SQL 方言(hibernate.dialect)
RDBMS Dialect DB2 org.hibernate.dialect.DB2Dialect DB2 AS/400 org.hibernate.dialect.DB2400Dialect DB ...
- 【hibernate】Hibernate SQL 方言(hibernate.dialect)
参考如下: RDBMS Dialect DB2 org.hibernate.dialect.DB2Dialect DB2 AS/400 org.hibernate.dialect.DB2400Dial ...
随机推荐
- c++与c不太相同的一些地方2
1.一般全局变量放到cpp 文件里面,而不是.h 里面.要不然容易乱套,这个乱几次就好了,先记住这样一种编码规范. 以为大家都引入就比较麻烦,但是实现起来就只有cpp里面才有.毕竟.h是要被包含的文件 ...
- Windows2012中安装Nginx并创建为Windows服务
安装Nginx 下载windows版nginx (http://nginx.org/download/nginx-1.10.0.zip),之后解压到需要放置的位置(D:\xampp\nginx) 将N ...
- 【模拟】UVa 1030 - Image Is Everything
1030 - Image Is Everything Time limit: 3.000 seconds Your new company is building a robot that can h ...
- 并发容器之CopyOnWriteArrayList(转载)
Copy-On-Write简称COW,是一种用于程序设计中的优化策略.其基本思路是,从一开始大家都在共享同一个内容,当某个人想要修改这个内容的时候,才会真正把内容Copy出去形成一个新的内容然后再改, ...
- BLOCKED和WAITING的区别
/** * Thread state for a thread blocked waiting for a monitor lock. * A thread in the blocked state ...
- PeopleReady--办公学习类App产品
PeopleReady是能使人(公司或组织里的员工)快速Ready(经验+知识)的学习系统.对员工的好处是:- 可以迅速Ready,尽快符合岗位要求,尽快有Performance,尽快对公司有价值,从 ...
- Spark Shuffle实现
Apache Spark探秘:Spark Shuffle实现 http://dongxicheng.org/framework-on-yarn/apache-spark-shuffle-details ...
- 【JQuery基础教程(第三版)图灵】笔记
第1章 jQuery入门 1.jQuery官方网站:http://jquery.com 2.开发工具:Firebug 第2章 选择元素 1.属性选择符:属性选择符通过HTML元素的 ...
- java--简单排序算法
1.冒泡排序 排序原理: 过程简单,首先将第一个记录的关键字和第二个记录的关键字进行比较,若为逆序,则将两个记录交换,然后比较第二个记录与第三个记录得关键字.以此类推,直至第n-1个记录和第n个记录的 ...
- VS2013开发Windows服务项目
这篇随笔里,我将介绍如何用VS2013开发Windows服务项目,实现的功能是定时发送电子邮件. 开发环境:VS2013,SQL Server2008,采用C#语言开发 步骤一:创建Windows服务 ...