title: Spring boot app fails Method org.postgresql.jdbc4.Jdbc4Connection.createClob() is not yet implemented
body: <p>I am using spring boot command line runner app, it hangs at PostGIS dialect, the below stack trace contains what's happening. Unable to understand what's going wrong, I have hibernate-spatial queries. </p>
  
  <pre><code>2018-04-06 12:11:08.554  INFO 31495 --- [           main] replayer.Main                            : No active profile set, falling back to default profiles: default
  2018-04-06 12:11:08.780  INFO 31495 --- [           main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@39d9314d: startup date [Fri Apr 06 12:11:08 NZST 2018]; root of context hierarchy
  2018-04-06 12:11:10.811  INFO 31495 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
  2018-04-06 12:11:11.149  INFO 31495 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$a0866479] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  2018-04-06 12:11:12.038  INFO 31495 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
  2018-04-06 12:11:12.113  INFO 31495 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
  2018-04-06 12:11:12.113  INFO 31495 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.28
  2018-04-06 12:11:12.146  INFO 31495 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener   : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib]
  2018-04-06 12:11:12.385  INFO 31495 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
  2018-04-06 12:11:12.386  INFO 31495 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 3615 ms 
  2018-04-06 12:11:12.704  INFO 31495 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Servlet dispatcherServlet mapped to [/]
  2018-04-06 12:11:12.710  INFO 31495 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
  2018-04-06 12:11:12.711  INFO 31495 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
  2018-04-06 12:11:12.711  INFO 31495 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
  2018-04-06 12:11:12.711  INFO 31495 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
  2018-04-06 12:11:13.264  INFO 31495 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
  2018-04-06 12:11:14.376  INFO 31495 --- [           main] com.zaxxer.hikari.pool.PoolBase          : HikariPool-1 - Driver does not support get/set network timeout for connections. (Method org.postgresql.jdbc4.Jdbc4Connection.getNetworkTimeout() is not yet implemented.)
  2018-04-06 12:11:14.834  INFO 31495 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
  2018-04-06 12:11:15.073  INFO 31495 --- [           main] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default'
  2018-04-06 12:11:15.111  INFO 31495 --- [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [
  name: default
  ...]
  2018-04-06 12:11:15.306  INFO 31495 --- [           main] org.hibernate.Version                    : HHH000412: Hibernate Core {5.0.0.Final}
  2018-04-06 12:11:15.310  INFO 31495 --- [           main] org.hibernate.cfg.Environment            : HHH000206: hibernate.properties not found
  2018-04-06 12:11:15.313  INFO 31495 --- [           main] org.hibernate.cfg.Environment            : HHH000021: Bytecode provider name : javassist
  2018-04-06 12:11:15.332  INFO 31495 --- [           main] o.h.spatial.integration.SpatialService   : HHH80000001: hibernate-spatial integration enabled : true
  2018-04-06 12:11:15.418  INFO 31495 --- [           main] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.0.0.Final}
  2018-04-06 12:11:15.891  INFO 31495 --- [           main] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.spatial.dialect.postgis.PostgisDialect
  2018-04-06 13:10:34.209  INFO 2217 --- [           main] o.h.e.j.e.i.LobCreatorBuilderImpl        : HHH000424: Disabling contextual LOB creation as createClob() method threw error : 
  java.lang.reflect.InvocationTargetException
  
  java.lang.reflect.InvocationTargetException: null
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_161]
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_161]
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_161]
  at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_161]
  at org.hibernate.engine.jdbc.env.internal.LobCreatorBuilderImpl.useContextualLobCreation(LobCreatorBuilderImpl.java:113) [hibernate-core-5.0.0.Final.jar:5.0.0.Final]
  at org.hibernate.engine.jdbc.env.internal.LobCreatorBuilderImpl.makeLobCreatorBuilder(LobCreatorBuilderImpl.java:54) [hibernate-core-5.0.0.Final.jar:5.0.0.Final]
  at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentImpl.&lt;init&gt;(JdbcEnvironmentImpl.java:247) [hibernate-core-5.0.0.Final.jar:5.0.0.Final]
  at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:114) [hibernate-core-5.0.0.Final.jar:5.0.0.Final]
  at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35) [hibernate-core-5.0.0.Final.jar:5.0.0.Final]
  at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:88) [hibernate-core-5.0.0.Final.jar:5.0.0.Final]
  at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:234) [hibernate-core-5.0.0.Final.jar:5.0.0.Final]
  at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:208) [hibernate-core-5.0.0.Final.jar:5.0.0.Final]
  at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:189) [hibernate-core-5.0.0.Final.jar:5.0.0.Final]
  at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:51) [hibernate-core-5.0.0.Final.jar:5.0.0.Final]
  at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:94) [hibernate-core-5.0.0.Final.jar:5.0.0.Final]
  at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:217) [hibernate-core-5.0.0.Final.jar:5.0.0.Final]
  at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:189) [hibernate-core-5.0.0.Final.jar:5.0.0.Final]
  at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.handleTypes(MetadataBuildingProcess.java:352) [hibernate-core-5.0.0.Final.jar:5.0.0.Final]
  at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:111) [hibernate-core-5.0.0.Final.jar:5.0.0.Final]
  at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:770) [hibernate-entitymanager-5.0.0.Final.jar:5.0.0.Final]
  at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:797) [hibernate-entitymanager-5.0.0.Final.jar:5.0.0.Final]
  at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:57) [spring-orm-5.0.4.RELEASE.jar:5.0.4.RELEASE]
  at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365) [spring-orm-5.0.4.RELEASE.jar:5.0.4.RELEASE]
  at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:388) [spring-orm-5.0.4.RELEASE.jar:5.0.4.RELEASE]
  at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:377) [spring-orm-5.0.4.RELEASE.jar:5.0.4.RELEASE]
  at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341) [spring-orm-5.0.4.RELEASE.jar:5.0.4.RELEASE]
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1769) [spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1706) [spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:583) [spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:502) [spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
  at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:312) [spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
  at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
  at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) [spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) [spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
  at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1085) ~[spring-context-5.0.4.RELEASE.jar:5.0.4.RELEASE]
  at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:858) ~[spring-context-5.0.4.RELEASE.jar:5.0.4.RELEASE]
  at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) ~[spring-context-5.0.4.RELEASE.jar:5.0.4.RELEASE]
  at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
  at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752) ~[spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
  at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:388) ~[spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
  at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) ~[spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
  at replayer.Main.main(Main.java:29) ~[classes/:na]
  Caused by: java.sql.SQLFeatureNotSupportedException: Method org.postgresql.jdbc4.Jdbc4Connection.createClob() is not yet implemented.
  at org.postgresql.Driver.notImplemented(Driver.java:734) ~[postgresql-9.3-1104-jdbc41.jar:na]
  at org.postgresql.jdbc4.AbstractJdbc4Connection.createClob(AbstractJdbc4Connection.java:58) ~[postgresql-9.3-1104-jdbc41.jar:na]
  at org.postgresql.jdbc4.Jdbc4Connection.createClob(Jdbc4Connection.java:21) ~[postgresql-9.3-1104-jdbc41.jar:na]
  ... 42 common frames omitted
  
  2018-04-06 13:10:34.211  INFO 2217 --- [           main] org.hibernate.type.BasicTypeRegistry     : HHH000270: Type registration [java.util.UUID] overrides previous : org.hibernate.type.UUIDBinaryType@364b1061
  2018-04-06 13:10:34.430  INFO 2217 --- [           main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
  2018-04-06 13:10:34.462  WARN 2217 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'main': Unsatisfied dependency expressed through field 'eboxEventRepository'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'repository.EboxEventRepository' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
  2018-04-06 13:10:34.463  INFO 2217 --- [           main] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
  2018-04-06 13:10:34.463  INFO 2217 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown initiated...
  2018-04-06 13:10:34.486  INFO 2217 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown completed.
  2018-04-06 13:10:34.488  INFO 2217 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
  2018-04-06 13:10:34.507  INFO 2217 --- [           main] ConditionEvaluationReportLoggingListener : 
  
  Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
  2018-04-06 13:10:34.641 ERROR 2217 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 
  
  **************************
  APPLICATION FAILED TO START
  ***************************
  
  Description:
  
  Field eboxEventRepository in replayer.Main required a bean of type 'repository.EboxEventRepository' that could not be found.
  
  
  Action:
  
  Consider defining a bean of type 'repository.EboxEventRepository' in your configuration.
  </code></pre>
  
  <p>My Main class looks like this, I want it to be a command line runner, hence implementing the CommandLineRunner.</p>
  
  <p>The application should just read data from a specific table and dump that to json content and onto a disk. </p>
  
  <pre><code>package replayer;
  
  
  import com.fasterxml.jackson.databind.ObjectMapper;
  import my.model.Event;
  import my.model.EventMessage;
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.boot.Banner;
  import org.springframework.boot.CommandLineRunner;
  import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  import repository.EventRepository;
  
  import java.io.PrintWriter;
  import java.util.Arrays;
  import java.util.List;
  import java.util.UUID;
  
  @SpringBootApplication
  public class Main implements CommandLineRunner {
  
  @Autowired
  EventRepository eboxEventRepository;
  
  public static void main(String[] args) {
  
      SpringApplication app = new SpringApplication(Main.class);
      app.setBannerMode(Banner.Mode.OFF);
      app.run(args);
  
  }
  
  @Override
  public void run(String... args) throws Exception {
      List&lt;EboxEvent&gt; eboxEvents = eboxEventRepository.findEboxEventBetweenEventTimestamps(null, null);
  
      final ObjectMapper objectMapper = new ObjectMapper();
      PrintWriter out = new PrintWriter("/tmp/events.tmp");
  
      for (EboxEvent event : eboxEvents) {
          EventMessage message = new EventMessage.Builder(EventMessage.Type.DATA_CHANGED,
                          EventMessage.Operation.CREATE,
                          my.model.Event.class.getName()).eventId(UUID.randomUUID().toString()).dataAfter(Arrays.asList(event))
                          .build();
          String json = objectMapper.writeValueAsString(message);
          out.println(json);
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>And my pom depenedencies are like this</p>
  
  <pre><code>&lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-data-jpa&lt;/artifactId&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter&lt;/artifactId&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
          &lt;version&gt;RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
          &lt;artifactId&gt;commons-lang3&lt;/artifactId&gt;
          &lt;version&gt;3.7&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;
          &lt;version&gt;5.0.0.Final&lt;/version&gt;
          &lt;exclusions&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;org.hibernate.javax.persistence&lt;/groupId&gt;
                  &lt;artifactId&gt;hibernate-jpa-2.0-api&lt;/artifactId&gt;
              &lt;/exclusion&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;org.hibernate.javax.persistence&lt;/groupId&gt;
                  &lt;artifactId&gt;hibernate-jpa-2.1-api&lt;/artifactId&gt;
              &lt;/exclusion&gt;
          &lt;/exclusions&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-spatial&lt;/artifactId&gt;
          &lt;version&gt;5.0.0.Final&lt;/version&gt;
          &lt;exclusions&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;postgresql&lt;/groupId&gt;
                  &lt;artifactId&gt;postgresql&lt;/artifactId&gt;
              &lt;/exclusion&gt;
          &lt;/exclusions&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-core&lt;/artifactId&gt;
          &lt;version&gt;5.0.0.Final&lt;/version&gt;
          &lt;exclusions&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;org.hibernate.javax.persistence&lt;/groupId&gt;
                  &lt;artifactId&gt;hibernate-jpa-2.0-api&lt;/artifactId&gt;
              &lt;/exclusion&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;org.hibernate.javax.persistence&lt;/groupId&gt;
                  &lt;artifactId&gt;hibernate-jpa-2.1-api&lt;/artifactId&gt;
              &lt;/exclusion&gt;
          &lt;/exclusions&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.postgresql&lt;/groupId&gt;
          &lt;artifactId&gt;postgresql&lt;/artifactId&gt;
          &lt;version&gt;9.3-1104-jdbc41&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
          &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
          &lt;version&gt;1.7.21&lt;/version&gt;
      &lt;/dependency&gt;
  
  &lt;/dependencies&gt;
  </code></pre>