`

Hibernate Dialect must be explicitly set

    博客分类:
  • Ejb
阅读更多
SEAM 1.2.1.GA
JBOSS 4.0.5.GA

Trying to exec a DAO method in a Seam-gen'd Seam app using JSF (MyFaces xhtml), SFSB, DAO, and Entity bean.

getting following stack trace when I click the commandLink on JSF to exec the action method on the SFSB:

Caused by: org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
  | 	at org.hibernate.dialect.DialectFactory.determineDialect(DialectFactory.java:57)
  | 	at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:39)
  | 	at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:409)
  | 	at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:119)
  | 	at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1933)
  | 	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1216)
  | 	at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:691)

I added the line "hibernate.dialect" line to the persistence.xml below and still getting the same exception after restarting the server and deploying app.  I viewed the persistence.xml file in the JAR's meta-inf folder and it matches the one below.  Why is it not reading/picking up the new version??? thx.

<?xml version="1.0" encoding="UTF-8"?>
  | <!-- Persistence deployment descriptor for dev profile -->
  | <persistence xmlns="http://java.sun.com/xml/ns/persistence" 
  |              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  |              xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" 
  |              version="1.0">
  |              
  |    <persistence-unit name="SHIMS">
  |       <provider>org.hibernate.ejb.HibernatePersistence</provider>
  |       <jta-data-source>java:/SHIMSDatasource</jta-data-source>
  |       
  |       <properties>
  |       	 <!-- commented hibernate auto validate due to errors upon deployment (validates the db structure at start-up) -->
  |          <!-- <property name="hibernate.hbm2ddl.auto" value="validate"/>  -->
  | 		 <!-- AS 09-24-07 - added hibernate.dialect property due to error during runtime stating "Hibernate Dialect must be explicitly set" --> 
  | 		 <property name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect"/>		          
  |       
 <property name="hibernate.hbm2ddl.auto" value="create-drop"/>   
   <property name="hibernate.cache.use_query_cache" value="true"/>
  |          <property name="hibernate.show_sql" value="true"/>
  |          <property name="jboss.entity.manager.factory.jndi.name" value="java:/SHIMSEntityManagerFactory"/>
  |          <property name="hibernate.default_catalog" value="boSHIMS"/>
  |          <property name="hibernate.default_schema" value=""/>
  |       </properties>
  |       
  |    </persistence-unit>
  |     
  | </persistence>

SHIMSDatasource.xml:

<?xml version="1.0" encoding="UTF-8"?>
  | <datasources>
  |    
  |    <local-tx-datasource>
  |       <jndi-name>SHIMSDatasource</jndi-name>
  |       <connection-url>jdbc:sqlserver://CORG0DV01:1433;databaseName=boSHIMS</connection-url>
  |       <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
  |       <user-name>_AppUser_JavaTestAcct</user-name>
  |       <password>JavaTestAcct</password>
  | <!-- 
  |       <exception-sorter-class-name>
  |          org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter
  |       </exception-sorter-class-name>
  |       <metadata>
  |          <type-mapping>mySQL</type-mapping>
  |       </metadata>
  | -->
  |    </local-tx-datasource>
  |     
  | </datasources>

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4088112#4088112

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4088112
分享到:
评论

相关推荐

    myeclipse下整合spring和hibernate

    - 在开发过程中可能会遇到“Hibernate Dialect must be explicitly set”这样的异常。这通常是因为 Hibernate 配置文件中没有指定正确的 dialect。根据所使用的数据库类型,比如 Oracle,MySQL,SQL Server 等,...

    hibernate3.6.0dialect.jar

    hibernate3.6.0dialect.jar

    hibernate3dialect

    hibernate3dialect

    Hibernate4.0以上 SQLiteDialect.java

    hibernate 4以上Hibernate.INTEGER之类的不能使用了,之前使用的SQLiteDialect.java编译不过去了,这个可以。

    达梦Hibernate方言2.0至4.0

    Hibernate方言(Dialect)是Hibernate框架中的一个关键概念,它是Hibernate与特定数据库之间通信的桥梁。方言定义了如何将Hibernate的SQL语句转换为特定数据库所理解的SQL,包括列类型、约束、SQL语法等。例如,达梦...

    kingbasehibernate3.3.2dialect.jar

    hibernate下的kingbase的jar文件,需要的同学自行下载

    GBase_Hibernate3.2.3_GA-Dialect_8.3.81.51_build50.1.jar

    南大通用GBase数据库GBase_Hibernate3.2.3_GA-Dialect_8.3.81.51_build50.1.jar

    hibernate SQLServer2008Dialect

    SQLServer2008Dialect 优化了原来的分页查询数据方法以及在生成SQL时表后增加了with(nolock)

    Hibernate连接SQLite配置说明和方言代码

    1.1、将两个jar包:com.zy.hibernate.dialect.SQLiteDialect.jar、sqlite-jdbc-3.7.2.jar拷贝到“\WEB-INF\lib”文件夹下; 2、配置hibernate: 2.1、将“hibernate\hibernate.cfg.xml”拷贝到“\WEB-INF\classes”...

    达梦 Hibernate 方言 2.0 至 4.0

    而方言(Dialect)则是Hibernate中用于适配不同数据库系统的类,它定义了SQL语法的特定实现,使得Hibernate可以正确地在不同的数据库上执行SQL语句。 达梦数据库作为国内自主研发的高性能、高安全性的数据库产品,...

    Hibernate不同数据库的连接及SQL方言

    Hibernate提供了多种SQL方言,例如org.hibernate.dialect.OracleDialect、org.hibernate.dialect.MySQLDialect、org.hibernate.dialect.SQLServerDialect等。我们可以在配置文件中使用元素来设置SQL方言,例如: ...

    瀚高数据库hibernate方言 hgdb-hibernate-dialect

    方言(Dialect)是Hibernate中的一个关键组件,它定义了如何与特定的数据库管理系统(DBMS)进行通信的规则和语法。 瀚高数据库,全称为HighGo Database,是一款源自中国的高性能、安全可靠的开源数据库系统,适用于...

    达梦数据库hibernate方言包

    DmDialect-for-hibernate2.0、DmDialect-for-hibernate2.1、DmDialect-for-hibernate3.0、DmDialect-for-hibernate3.1、DmDialect-for-hibernate3.6、DmDialect-for-hibernate4.0、DmDialect-for-hibernate5.0、...

    DmDialect-for-hibernate4.0.zip

    在SpringBoot集成Hibernate时,通过配置`spring.jpa.hibernate.dialect`属性,指定使用DmDialect,就能让Hibernate知道如何与达梦数据库进行有效通信。这样,开发人员就可以利用Hibernate的高级特性,如懒加载、事务...

    hibernate-4.3.11finaldialect.jar

    Hibernate人大金仓jar包

    Hibernate 配置各种数据库

    hibernate.dialect = org.hibernate.dialect.MySQLDialect hibernate.connection.driver_class = com.mysql.jdbc.Driver hibernate.connection.url = jdbc:mysql:///test hibernate.connection.username = gavin ...

    hibernate中所有数据库方言

    在Hibernate中,为了适应不同的数据库管理系统(DBMS),它引入了“方言”(Dialect)的概念。方言是Hibernate与特定数据库进行有效沟通的关键组件,负责处理SQL语法差异,确保跨数据库的一致性和兼容性。以下是对...

    hibernate.properties

    ## to use the second-level cache with JTA, Hibernate must be able to obtain the JTA TransactionManager #hibernate.transaction.manager_lookup_class org.hibernate.transaction....

    hibernate5相关jar包

    `hibernate-dialect.jar`包含不同数据库的方言类,使得Hibernate可以生成适合特定数据库的SQL语句。 5. 第三方库:如`javassist.jar`, `dom4j.jar`, `slf4j-api.jar`, `slf4j-log4j12.jar`等 - `javassist.jar`:...

    kingbase8-Finaldialect-5.2.17.jar

    亲测可以使用kingbase8-Finaldialect-5.2.17.jar kingbase8-8.2.0.jar

Global site tag (gtag.js) - Google Analytics