0

I have a problem with my new Project , I receive this error that I can not solve, I loaded the project on github I think it's a configuration problem.

https://github.com/DeAngelisLuca/Traccialo

application.properties

spring.datasource.url= jdbc:postgresql://localhost/traccialo 
spring.datasource.username=postgres
spring.datasource.password=postgres
spring.jpa.hibernate.ddl-auto=create-drop

spring.datasource.driverClassName=org.postgresql.Driver

spring.jpa.hibernate.hbm2ddl.auto=update

spring.jpa.hibernate.show_sql=true
hibernate.temp.use_jdbc_metadata_defaults false

part of stackTrace

2018-04-15 19:54:27.672  INFO 9696 --- [           main] i.d.Traccialo.ServletInitializer         : Starting ServletInitializer v0.0.1-SNAPSHOT on PC-Luca with PID 9696 (C:\Users\Luca\eclipse-workspace-professional\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\Traccialo\WEB-INF\classes started by Luca in C:\Users\Luca\Downloads\eclipse-jee-oxygen-3-win32-x86_64\eclipse)
2018-04-15 19:54:27.675  INFO 9696 --- [           main] i.d.Traccialo.ServletInitializer         : No active profile set, falling back to default profiles: default
2018-04-15 19:54:27.752  INFO 9696 --- [           main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@25b78608: startup date [Sun Apr 15 19:54:27 CEST 2018]; root of context hierarchy
2018-04-15 19:54:28.569  INFO 9696 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Overriding bean definition for bean 'dataSource' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Tomcat; factoryMethodName=dataSource; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Tomcat.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Hikari; factoryMethodName=dataSource; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]]
2018-04-15 19:54:29.273  INFO 9696 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$dc6cce97] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-04-15 19:54:29.358  INFO 9696 --- [           main] o.a.c.c.C.[.[localhost].[/Traccialo]     : Initializing Spring embedded WebApplicationContext
2018-04-15 19:54:29.358  INFO 9696 --- [           main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 1606 ms
2018-04-15 19:54:29.768  INFO 9696 --- [           main] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2018-04-15 19:54:29.769  INFO 9696 --- [           main] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'errorPageFilter' to: [/*]
2018-04-15 19:54:29.769  INFO 9696 --- [           main] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2018-04-15 19:54:29.770  INFO 9696 --- [           main] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2018-04-15 19:54:29.770  INFO 9696 --- [           main] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
2018-04-15 19:54:29.770  INFO 9696 --- [           main] .s.DelegatingFilterProxyRegistrationBean : Mapping filter: 'springSecurityFilterChain' to: [/*]
2018-04-15 19:54:29.770  INFO 9696 --- [           main] o.s.b.w.servlet.ServletRegistrationBean  : Servlet dispatcherServlet mapped to [/]
2018-04-15 19:54:30.022  INFO 9696 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
2018-04-15 19:54:30.153  INFO 9696 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
2018-04-15 19:54:30.229  INFO 9696 --- [           main] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default'
2018-04-15 19:54:30.264  INFO 9696 --- [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [
    name: default
    ...]
2018-04-15 19:54:30.465  INFO 9696 --- [           main] org.hibernate.Version                    : HHH000412: Hibernate Core {5.2.16.Final}
2018-04-15 19:54:30.469  INFO 9696 --- [           main] org.hibernate.cfg.Environment            : HHH000206: hibernate.properties not found
2018-04-15 19:54:30.562  INFO 9696 --- [           main] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
2018-04-15 19:54:30.836  INFO 9696 --- [           main] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.PostgreSQL95Dialect
2018-04-15 19:54:30.961  INFO 9696 --- [           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(Unknown Source) ~[na:1.8.0_161]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_161]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_161]

stacktrace photo enter image description here

4
  • 4
    Neither the application.properties nor the stacktrace should be posted as screenshot, but as text. Commented Apr 15, 2018 at 17:44
  • i have edit the post , thanks for the info Commented Apr 15, 2018 at 17:58
  • please add your complete error stacktrace to your question.. to know what exactly the problem here is :) Thanks Commented Apr 15, 2018 at 18:11
  • add stacktrace photo Commented Apr 15, 2018 at 18:23

1 Answer 1

1

This exception only came when there is a mismatch of jdbc driver 4 (I think so, I have faced earlier this), As you know hibernate is a ORM tool so to create a connection it needs some meta-data information from the database.

You can disable this feature just by putting this line in application.properties

hibernate.temp.use_jdbc_metadata_defaults = false

if you have hibernate.cfg.xml as a configuration file then you may add this line to your config file

hibernate.cfg.xml file add below property

<property name="hibernate.temp.use_jdbc_metadata_defaults">false</property>

Note :- If you see your application.properties key-value pair must be seperated with = (assignment operator). please add this to your code

Hope this will help you out. Thanks :)

Sign up to request clarification or add additional context in comments.

3 Comments

have you put = in between key-value pair ??
sure, it was an oversight
Someone Can help me?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.