`

报错Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not se

阅读更多
WARN 12992 --- [           main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
    at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1011)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:802)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:521)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:678)
    at org.springframework.boot.SpringApplication.doRun(SpringApplication.java:339)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:274)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:931)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:920)
    at com.business.backend.BizApplication.main(BizApplication.java:122)
Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
    at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.determineDialect(DialectFactoryImpl.java:104)
    at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:71)
    at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:205)
    at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111)
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234)
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206)
    at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1887)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1845)
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:857)
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850)
    at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:425)
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:849)
    at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:60)
    at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:343)
    at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:318)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)
    ... 16 common frames omitted

INFO 12992 --- [           main] o.apache.catalina.core.StandardService   : Stopping service Tomcat


1. JPA增加hibernate SQL方言
spring.jpa.database-platform=org.hibernate.dialect.MySQLDialect
或者
spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect
分享到:
评论

相关推荐

    hibernate3.6.0dialect.jar

    hibernate3.6.0dialect.jar

    Hibernate4.0以上 SQLiteDialect.java

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

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

    hibernate.dialect org.hibernate.dialect.HSQLDialect hibernate.connection.driver_class org.hsqldb.jdbcDriver hibernate.connection.username sa hibernate.connection.password hibernate.connection.url jdbc...

    kingbase8-Finaldialect-5.2.17.jar

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

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

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

    hibernate SQLServer2008Dialect

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

    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

    数据库连接字符串

    oracle连接字符串: class:oracle.jdbc.driver.OracleDriver url:"jdbc:oracle:thin:@localhost:1521:jbitdb","epet","epet" sqlserver: ...url:"jdbc:sqlserver:/...Firebird org.hibernate.dialect.FirebirdDialect

    ssh整合,不带hibernate.cfg.xml的方式

    hibernate.dialect=org.hibernate.dialect.MySQL5Dialect hibernate.connection.driver_class=com.mysql.jdbc.Driver hibernate.connection.url=jdbc:mysql://localhost:3306/mydb hibernate.connection.username=...

    DmDialect-for-hibernate4.0.zip

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

    hibernate.properties详解

    - `hibernate.dialect`:指定使用的方言,这里为`org.hibernate.dialect.HSQLDialect`。 - `hibernate.connection.driver_class`:数据库驱动类。 - `hibernate.connection.username` 和 `hibernate.connection....

    hibernate.cfg.xml文件详细解释

    <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect ``` **说明**:方言配置用于告诉 Hibernate 使用哪种数据库特定的 SQL 语法。例如,对于 MySQL 数据库,通常会使用 `org.hibernate....

    hibernate.cfg.xml中配置信息详解

    Hibernate.dialect 属性用于指定 Hibernate 的数据库 dialect(方言),该属性的值是一个 Hibernate Dialect 类名,例如 org.hibernate.dialect.OracleDialect。该属性的作用是允许 Hibernate 针对特定的关系数据库...

    kingbasehibernate3.3.2dialect.jar

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

    hibernate.cfg.xml 配置 和数据库驱动

    <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect <property name="hibernate.show_sql">true ``` 3. **SessionFactory配置**:SessionFactory是Hibernate的核心对象,负责创建Session,...

    达梦Hibernate方言2.0至4.0

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

    hibernate3dialect

    hibernate3dialect

    达梦数据库7.6最新的驱动包及hibernate方言包

    在Hibernate中,方言(Dialect)是关键组件之一,它定义了特定数据库的SQL语法和特性。达梦数据库的方言包使得Hibernate能理解并生成符合达梦数据库语法的SQL语句。在压缩包中提供的Hibernate方言包,适用于...

Global site tag (gtag.js) - Google Analytics