【发布时间】: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