【问题标题】:What's the hibernate dialect for this driver/DB connection?此驱动程序/数据库连接的休眠方言是什么?
【发布时间】:2019-03-22 04:46:38
【问题描述】:

我刚刚收到一些使用 Spring Boot/Spring DAta/JPA 连接到数据库的要求。这是网址:

jdbc:compositesw:dbapi@XXXXXXXXXXX:XXXX?domain=twccorp&dataSource=SFDC&connectTimeout=120

这是司机:

cs.jdbc.driver.CompositeDriver

这是我的 application.properties(为安全起见省略了值):

 spring.datasource.url = 'same as above'
 spring.datasource.username = xxxxxxx
 spring.datasource.password = xxxxxxx
 spring.datasource.driverClassName = 'same as above'

还有这里的日志:

  o.h.e.j.e.i.JdbcEnvironmentInitiator     : HHH000342: Could not obtain connection to query metadata : Unable to determine Dialect to use [name=composite, majorVersion=7]; user must register resolver or explicitly set 'hibernate.dialect'
  2018-10-17 10:08:06.008  WARN 1232 --- [           main] ConfigServletWebServerApplicationContext : 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/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service 

我会感谢能发光的人。

【问题讨论】:

  • 您的错误消息是显示以定义 spring.jpa.properties.hibernate.dialect= 但不确定 CIS 的方言名称是什么,您是否添加了 csjdbc jar,因为我认为它没有在 maven repo 中列出。 .

标签: spring-boot spring-data-jpa spring-data jpa-2.0


【解决方案1】:

我也遇到过同样的问题。

由于复合特定方言不可用,我使用了org.hibernate.dialect.Oracle10gDialect 方言。

效果很好。

【讨论】:

    猜你喜欢
    • 2011-05-21
    • 2014-11-04
    • 1970-01-01
    • 1970-01-01
    • 2014-09-14
    • 1970-01-01
    • 2015-10-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多