Add this property in your application.properties :
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
Reference :
This is an issue of Hibernate
, as a workaround you can use the following flag. Then set up the following config in your properties:
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
For Spring boot 2.x.x this flag simply disable contextual LOB creation, but if you really want to know the properly answer check UPDATE V1.
UPDATED V1
This was a Hibernate issue.
If you use Spring Boot latest version from 2.0.x
until 2.1.x
includes Hibernate 5.3.10.final
you can take a look here but this issue was fixed on Hibernate version
5.4.0.CR1 then you need to add that dependency or if it is possible the latest version:
For Gradle:
compile('org.hibernate:hibernate-core:5.4.2.Final')
For Maven:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.4.2.Final</version>
</dependency>
UPDATED V2 "SPRING BOOT 2.2.0.M(1-4)"
In addition Spring boot v2.2.0.Mx
includes now Hibernate v5.4.x
then this issue was fixed for these versions.
I had the similar issue. I followed this solution and it worked for me
http://vkuzel.blogspot.com/2016/03/spring-boot-jpa-hibernate-atomikos.html
# Disable feature detection by this undocumented parameter. Check the org.hibernate.engine.jdbc.internal.JdbcServiceImpl.configure method for more details.
spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults = false
# Because detection is disabled you have to set correct dialect by hand.
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQL9Dialect
Solved by using following Yaml configuration:
spring:
jpa:
properties:
hibernate:
jdbc:
lob:
non_contextual_creation: true
database-platform: org.hibernate.dialect.PostgreSQL9Dialect
Solved by adding hibernate.properties with
hibernate.jdbc.lob.non_contextual_creation=true
Other solutions with application.properties
didn't work. This can be also done via XML hibernate.cfg.xml
Spring Boot version: 2.0.2.RELEASE
spring:
jpa:
properties:
hibernate:
temp:
use_jdbc_metadata_defaults: false
jdbc:
lob:
non_contextual_creation: true
use_jdbc_metadata_defaults: false or non_contextual_creation: true two items work fine
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With