Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java.lang.reflect.InvocationTargetException: null

I have a REST API project in jersey and hk2 used. Now, I convert is to spring boot project and keep jersey endpoints and DI in hk2. it seems that it is working except the following error. But I have no idea why the following error happens. Any hints welcomed. I will provide more details as requested. I have no idea what the error is about.

Thanks

Error:

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.2.10.Final.jar:5.2.10.Final]
    at org.hibernate.engine.jdbc.env.internal.LobCreatorBuilderImpl.makeLobCreatorBuilder(LobCreatorBuilderImpl.java:54) [hibernate-core-5.2.10.Final.jar:5.2.10.Final]
    at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentImpl.<init>(JdbcEnvironmentImpl.java:271) [hibernate-core-5.2.10.Final.jar:5.2.10.Final]
    at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:114) [hibernate-core-5.2.10.Final.jar:5.2.10.Final]
    at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35) [hibernate-core-5.2.10.Final.jar:5.2.10.Final]
    at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:88) [hibernate-core-5.2.10.Final.jar:5.2.10.Final]
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:259) [hibernate-core-5.2.10.Final.jar:5.2.10.Final]
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:233) [hibernate-core-5.2.10.Final.jar:5.2.10.Final]
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:210) [hibernate-core-5.2.10.Final.jar:5.2.10.Final]
    at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:51) [hibernate-core-5.2.10.Final.jar:5.2.10.Final]
    at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:94) [hibernate-core-5.2.10.Final.jar:5.2.10.Final]
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:242) [hibernate-core-5.2.10.Final.jar:5.2.10.Final]
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:210) [hibernate-core-5.2.10.Final.jar:5.2.10.Final]
    at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.handleTypes(MetadataBuildingProcess.java:352) [hibernate-core-5.2.10.Final.jar:5.2.10.Final]
    at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:111) [hibernate-core-5.2.10.Final.jar:5.2.10.Final]
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:858) [hibernate-core-5.2.10.Final.jar:5.2.10.Final]
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:885) [hibernate-core-5.2.10.Final.jar:5.2.10.Final]
    at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:58) [hibernate-core-5.2.10.Final.jar:5.2.10.Final]
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:79) [javax.persistence-api-2.2.jar:2.2]
    at com.opentext.eventbus.EMFFactory.<init>(EMFFactory.java:38) [classes/:na]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [na:1.8.0_161]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [na:1.8.0_161]
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [na:1.8.0_161]
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423) [na:1.8.0_161]
    at org.glassfish.hk2.utilities.reflection.ReflectionHelper.makeMe(ReflectionHelper.java:1375) [hk2-utils-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.ClazzCreator.createMe(ClazzCreator.java:272) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:366) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:487) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.PerLookupContext.findOrCreate(PerLookupContext.java:70) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2126) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:116) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:90) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.FactoryCreator.create(FactoryCreator.java:135) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:487) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:83) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:71) [hk2-locator-2.5.0-b42.jar:na]
    at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture$1.call(Cache.java:97) [hk2-utils-2.5.0-b42.jar:na]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_161]
    at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture.run(Cache.java:154) [hk2-utils-2.5.0-b42.jar:na]
    at org.glassfish.hk2.utilities.cache.Cache.compute(Cache.java:199) [hk2-utils-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.SingletonContext.findOrCreate(SingletonContext.java:122) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2126) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:116) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:698) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:78) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:212) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:229) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:358) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:487) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.PerLookupContext.findOrCreate(PerLookupContext.java:70) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2126) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:116) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:90) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.FactoryCreator.create(FactoryCreator.java:135) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:487) [hk2-locator-2.5.0-b42.jar:na]
    at org.glassfish.jersey.inject.hk2.RequestContext.findOrCreate(RequestContext.java:83) [jersey-hk2-2.26.jar:na]
    at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2126) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:116) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:698) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:78) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:212) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:229) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:358) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:487) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.PerLookupContext.findOrCreate(PerLookupContext.java:70) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2126) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:116) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:698) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:78) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:212) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:229) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:358) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:487) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.PerLookupContext.findOrCreate(PerLookupContext.java:70) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2126) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:685) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:78) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:212) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:229) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:358) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:487) [hk2-locator-2.5.0-b42.jar:na]
    at org.glassfish.jersey.inject.hk2.RequestContext.findOrCreate(RequestContext.java:83) [jersey-hk2-2.26.jar:na]
    at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2126) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetService(ServiceLocatorImpl.java:777) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetService(ServiceLocatorImpl.java:740) [hk2-locator-2.5.0-b42.jar:na]
    at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:710) [hk2-locator-2.5.0-b42.jar:na]
    at org.glassfish.jersey.inject.hk2.AbstractHk2InjectionManager.getInstance(AbstractHk2InjectionManager.java:184) [jersey-hk2-2.26.jar:na]
    at org.glassfish.jersey.inject.hk2.ImmediateHk2InjectionManager.getInstance(ImmediateHk2InjectionManager.java:54) [jersey-hk2-2.26.jar:na]
    at org.glassfish.jersey.internal.inject.Injections.getOrCreate(Injections.java:129) [jersey-common-2.26.jar:na]
    at org.glassfish.jersey.server.model.MethodHandler$ClassBasedMethodHandler.getInstance(MethodHandler.java:284) [jersey-server-2.26.jar:na]
    at org.glassfish.jersey.server.internal.routing.PushMethodHandlerRouter.apply(PushMethodHandlerRouter.java:75) [jersey-server-2.26.jar:na]
    at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:110) [jersey-server-2.26.jar:na]
    at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:113) [jersey-server-2.26.jar:na]
    at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:113) [jersey-server-2.26.jar:na]
    at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:113) [jersey-server-2.26.jar:na]
    at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:113) [jersey-server-2.26.jar:na]
    at org.glassfish.jersey.server.internal.routing.RoutingStage.apply(RoutingStage.java:93) [jersey-server-2.26.jar:na]
    at org.glassfish.jersey.server.internal.routing.RoutingStage.apply(RoutingStage.java:62) [jersey-server-2.26.jar:na]
    at org.glassfish.jersey.process.internal.Stages.process(Stages.java:197) [jersey-common-2.26.jar:na]
    at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:269) [jersey-server-2.26.jar:na]
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:272) [jersey-common-2.26.jar:na]
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:268) [jersey-common-2.26.jar:na]
    at org.glassfish.jersey.internal.Errors.process(Errors.java:316) [jersey-common-2.26.jar:na]
    at org.glassfish.jersey.internal.Errors.process(Errors.java:298) [jersey-common-2.26.jar:na]
    at org.glassfish.jersey.internal.Errors.process(Errors.java:268) [jersey-common-2.26.jar:na]
    at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:289) [jersey-common-2.26.jar:na]
    at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:256) [jersey-server-2.26.jar:na]
    at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:703) [jersey-server-2.26.jar:na]
    at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:416) [jersey-container-servlet-core-2.26.jar:na]
    at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:370) [jersey-container-servlet-core-2.26.jar:na]
    at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:389) [jersey-container-servlet-core-2.26.jar:na]
    at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:342) [jersey-container-servlet-core-2.26.jar:na]
    at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:229) [jersey-container-servlet-core-2.26.jar:na]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [tomcat-embed-core-8.5.29.jar:8.5.29]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-8.5.29.jar:8.5.29]
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-embed-websocket-8.5.29.jar:8.5.29]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-8.5.29.jar:8.5.29]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-8.5.29.jar:8.5.29]
    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) [spring-web-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-8.5.29.jar:8.5.29]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-8.5.29.jar:8.5.29]
    at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109) [spring-web-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-8.5.29.jar:8.5.29]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-8.5.29.jar:8.5.29]
    at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81) [spring-web-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-8.5.29.jar:8.5.29]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-8.5.29.jar:8.5.29]
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) [spring-web-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-8.5.29.jar:8.5.29]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-8.5.29.jar:8.5.29]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) [tomcat-embed-core-8.5.29.jar:8.5.29]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-embed-core-8.5.29.jar:8.5.29]
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496) [tomcat-embed-core-8.5.29.jar:8.5.29]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [tomcat-embed-core-8.5.29.jar:8.5.29]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) [tomcat-embed-core-8.5.29.jar:8.5.29]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [tomcat-embed-core-8.5.29.jar:8.5.29]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [tomcat-embed-core-8.5.29.jar:8.5.29]
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) [tomcat-embed-core-8.5.29.jar:8.5.29]
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-8.5.29.jar:8.5.29]
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790) [tomcat-embed-core-8.5.29.jar:8.5.29]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459) [tomcat-embed-core-8.5.29.jar:8.5.29]
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.29.jar:8.5.29]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_161]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_161]
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.5.29.jar:8.5.29]
    at java.lang.Thread.run(Thread.java:748) [na:1.8.0_161]
Caused by: java.sql.SQLFeatureNotSupportedException: Method org.postgresql.jdbc.PgConnection.createClob() is not yet implemented.
    at org.postgresql.Driver.notImplemented(Driver.java:669) ~[postgresql-42.1.4.jar:42.1.4]
    at org.postgresql.jdbc.PgConnection.createClob(PgConnection.java:1246) ~[postgresql-42.1.4.jar:42.1.4]
    ... 154 common frames omitted

part of persistence.xml

<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQL94Dialect" />

pom.xml

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.0.1.RELEASE</version>
  </parent>
  <dependencies>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-jersey</artifactId>
    </dependency>
   <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-core</artifactId>
      <version>5.2.10.Final</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.core</groupId>
      <artifactId>jersey-server</artifactId>
      <version>2.26</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.containers</groupId>
      <artifactId>jersey-container-servlet</artifactId>
      <version>2.26</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.media</groupId>
      <artifactId>jersey-media-json-jackson</artifactId>
      <version>2.26</version>
    </dependency>
    <dependency>
      <groupId>org.postgresql</groupId>
      <artifactId>postgresql</artifactId>
      <version>42.1.4</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.bundles.repackaged</groupId>
      <artifactId>jersey-guava</artifactId>
      <version>2.26-b01</version>
    </dependency>

  </dependencies>
like image 697
BAE Avatar asked Apr 05 '18 19:04

BAE


1 Answers

Root problem

Caused by: java.sql.SQLFeatureNotSupportedException: Method org.postgresql.jdbc.PgConnection.createClob() is not yet implemented.

Looks like bug https://hibernate.atlassian.net/browse/HHH-12368

They recommended set property (I believe it's the best workaround):

as workaround is to disable hibernate to detect this function by setting flag hibernate.jdbc.lob.non_contextual_creation=true

The other solution described here: http://vkuzel.blogspot.com.cy/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

So you can also try to add to your Spring boot properties file

spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults = false
like image 106
Yuriy Alevohin Avatar answered Sep 21 '22 01:09

Yuriy Alevohin