理论上本文适用于在使用 JPA+PostgreSQL 时 遇到 org.postgresql.jdbc.PgConnection.createClob() 问题的情况
环境以及主要依赖版本号
SpringBoot: 2.1.9.RELEASE
PostgreSQL: 11.5
PostgreSQL-Driver: 42.2.8
发生的问题
项目启动时, 报org.postgresql.jdbc.PgConnection.createClob() is not yet implemented 错误, 但是不影响项目运行
但是博主有强迫症,必须要解决这个问题,遂Google之,也找到了很多解决方法,譬如添加如下配置:
spring:
jpa:
database-platform: org.hibernate.dialect.PostgreSQL9Dialect
properties:
hibernate:
temp:
use_jdbc_metadata_defaults: false
jdbc:
lob:
non_contextual_creation: true
然而很不幸的是,对我都没有效果。
解决的方法
究其原因呢,我也找到了如下解释:出处: https://vkuzel.com/spring-boot-jpa-hibernate-atomikos-postgresql-exception
These exceptions appears because JPA (Hibernate) supported by Atomikos is trying to verify PostgreSQL CLOB feature. This fea