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的更多相关文章

  1. 【Hibernate】Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set

    今天用hibernate框架写crm项目时遇到报错: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' n ...

  2. [Hibernate]Access to DialectResolutionInfo cannot be null when &#39;hibernate.dialect&#39; not set

    使用Hibernate官方文档上的下面代码进行測试时报出这个异常. org.hibernate.HibernateException: Access to DialectResolutionInfo ...

  3. Connection cannot be null when 'hibernate.dialect' not set

    严重: Exception sending context initialized event to listener instance of class [org.springframework.w ...

  4. 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 ...

  5. 正确决解Hibernate4.*中:Connection cannot be null when 'hibernate.dialect' not set

    <?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hi ...

  6. Hibernate SQL方言 (hibernate.dialect) Spring配置文件applicationContext.xml

    转自:http://www.cnblogs.com/wj-wangjun/archive/2009/10/21/1587624.html Hibernate SQL方言 (hibernate.dial ...

  7. Hibernate SQL方言 (hibernate.dialect)

    数据库 hibernate方言 DB2 org.hibernate.dialect.DB2Dialect DB2 AS/400 org.hibernate.dialect.DB2400Dialect ...

  8. Hibernate SQL 方言(hibernate.dialect)

    RDBMS Dialect DB2 org.hibernate.dialect.DB2Dialect DB2 AS/400 org.hibernate.dialect.DB2400Dialect DB ...

  9. 【hibernate】Hibernate SQL 方言(hibernate.dialect)

    参考如下: RDBMS Dialect DB2 org.hibernate.dialect.DB2Dialect DB2 AS/400 org.hibernate.dialect.DB2400Dial ...

随机推荐

  1. 自己写http获取网络资源和解析json数据

    虽然github上有很多开源的,方便的jar报,用起来也很方便,但我们也需要了解其中的原理,如何自己不用第三方jar包来获取网络资源 主要代码如下:  因为联网是耗时的操作,所以需要另开一个线程来执行 ...

  2. C# string类型遇到的两个问题

    最近在维护一位离职的同事写的WPF代码,偶然发现他使用C# string类型的两个问题,在这里记录一下. 1. 使用Trim函数移除字串中的空格.换行符等字符串. csRet.Trim(new cha ...

  3. (原创)openvswitch实验连载2-cisco模拟器IOU-Web安装及网络环境配置

    IOU的使用可以选择自己到官网https://docs.google.com/file/d/0B2AgRhS2cfxCQ01tN2NrQ0pvNUk/edit下载iou-web 软件,然后部署在lin ...

  4. TortoiseGit记住用户名和密码

    1.将项目从服务器Clone下来 2.然后在Repository上右键,打开设置 3.选择凭证 4.为当前Repository创建一个凭证,然后确定退出即可 5.然后再pull下,会直接提示你输入密码 ...

  5. PHP之基本语法

    人生最幸福的事之一就是,邻居家的wifi密码是123456789,于是回家在pad上也照样可以扯淡.任何语言都有自己的语法,这里只简单说些我觉得应该注意的地方. 首先要明白,PHP是运行于服务器端的脚 ...

  6. maven打包技巧

    http://www.infoq.com/cn/news/2011/06/xxb-maven-9-package/ "打包"这个词听起来比较土,比较正式的说法应该是"构建 ...

  7. 让aspx页面也可以通过url路由进行访问

    参考文章:http://blog.csdn.net/zhanglong_longlong/article/details/8841030 这两天,在工作中需要将aspx的页面虚拟成url路径访问.比如 ...

  8. 读取tomcat下的文件夹路径

    背景:测试的为了每次部署时清缓存,将temp文件夹也删了,导致系统中有些excel导出功能用不了. 解决:新建一个监听文件,在系统启动时,判断temp文件夹是否存在,不存在就新建. temp文件夹的作 ...

  9. vs调试windows mobile程序时布署时间太长的解决办法

    vs调试windows mobile程序时布署时间太长的解决办法 1.VS平台上,选工具-选项-项目和解决方案-MS BUILD项目生成输出详细信息中选择“诊断”,目的是在调试窗口中看出哪个过程编译的 ...

  10. java web-----MVC设计模式

    一,MVC将代码分为三个部分,分别为视图(jsp),模型(javaBean),控制部分(servlet); 视图基本为 jsp 文件,主要内容为界面的html代码,负责显示界面: 模型为 javaBe ...