如何解决org.postgresql.jdbc.PgConnection.createClob()尚未实现 [英] How to resolve org.postgresql.jdbc.PgConnection.createClob() is not yet implemented
问题描述
启动spring-boot应用程序时,我收到:
When starting spring-boot application I've received:
原因:java .sql.SQLFeatureNotSupportedException:尚未实现org.postgresql.jdbc.PgConnection.createClob()方法。
Caused by: java.sql.SQLFeatureNotSupportedException: Method org.postgresql.jdbc.PgConnection.createClob() is not yet implemented.
我知道这与Postgresql驱动程序中的某些问题有关我正在使用。
I know this is related to some issue from Postgresql driver, which I am using now.
许多人解决了此问题,只需将以下行放在application.properties文件中:
Many people resolved the problem just putting this following line in application.properties file:
spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults = true
spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults=true
我仍然遇到相同的问题。还有其他提示吗?如果考虑使用当前配置查看我的项目:
https://github.com/caliari77/hiRank
I still have the same issue. Is there any other tip for It? In case thinking about see my project with current configuration: https://github.com/caliari77/hiRank
推荐答案
经过一些测试,我可以解决这个问题。似乎缺少Hibernate实现,因此要解决此问题,我已在gradle.build文件中添加了它。我以为Spring-boot在获得JPA时已经处理了它,但是我错了。这是我从gradle.build更新的依赖项:
After some tests I could resolve this. It seems Hibernate implementation was missing, so to resolve this I've added It in gradle.build file. I thought Spring-boot already took care of It when getting JPA, but I was wrong. Here It is my updated dependencies from gradle.build:
dependencies {
//Spring
//implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
//runtimeOnly 'org.springframework.boot:spring-boot-devtools'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
//Hibernate
implementation 'org.hibernate:hibernate-core:5.4.2.Final'
implementation 'org.hibernate:hibernate-entitymanager:5.4.2.Final'
//Postgres
implementation 'org.postgresql:postgresql:42.2.5.jre7'
//Gson
implementation 'com.google.code.gson:gson:2.8.5'
//Logger
implementation 'log4j:log4j:1.2.17'
}
这篇关于如何解决org.postgresql.jdbc.PgConnection.createClob()尚未实现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!