Java – Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException

hibernatejavapostgresqlpostgresql-9.2postgresql-9.3

I configured hibernate to use Posgresql

<property name="hibernate.dialect">org.hibernate.dialect.PostgreSQL92Dialect</property>
        <property name="hibernate.connection.driver_class">org.postgresql.Driver</property>

But I get exception when I start tomcat:

23-Jul-2017 21:22:25.544 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 7529 ms
23-Jul-2017 21:26:47.901 INFO [http-nio-8081-exec-9] org.hibernate.Version.logVersion HHH000412: Hibernate Core {5.2.10.Final}
23-Jul-2017 21:26:47.912 INFO [http-nio-8081-exec-9] org.hibernate.cfg.Environment.<clinit> HHH000206: hibernate.properties not found
23-Jul-2017 21:26:48.546 INFO [http-nio-8081-exec-9] org.hibernate.annotations.common.reflection.java.JavaReflectionManager.<clinit> HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
23-Jul-2017 21:26:49.840 INFO [http-nio-8081-exec-9] org.hibernate.dialect.Dialect.<init> HHH000400: Using dialect: org.hibernate.dialect.PostgreSQL92Dialect
23-Jul-2017 21:26:50.021 INFO [http-nio-8081-exec-9] org.hibernate.engine.jdbc.env.internal.LobCreatorBuilderImpl.useContextualLobCreation HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
23-Jul-2017 21:26:50.024 INFO [http-nio-8081-exec-9] org.hibernate.type.BasicTypeRegistry.register HHH000270: Type registration [java.util.UUID] overrides previous : org.hibernate.type.UUIDBinaryType@4bbde374
Hibernate: 

When I insert record in Postgresql table rows are empty.
How I can configure properly Hibernate?

Best Answer

This exception is thrown by Hibernate and has nothing to do with Spring Boot or your implementation. This error can be suppressed by modifying your application.properties as per the instructions in this link.

Related Topic