База данных Postgresql не соединяется с Hibernate - PullRequest
0 голосов
/ 26 сентября 2018

Я пытаюсь связать свою базу данных с моим Java-кодом, используя Hibernate.Но почему-то я получаю эту ошибку.Я знаю, что что-то напутало в файле hibernate.cfg.xml и в моем файле maven pom.Но я не уверен, что мне нужно искать.Я сейчас использую postgresql 10.5 и hibernate jdbc 42.2.5.

    Sep 26, 2018 3:23:07 PM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {5.3.6.Final}
Sep 26, 2018 3:23:07 PM org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
Sep 26, 2018 3:23:08 PM org.hibernate.annotations.common.reflection.java.JavaReflectionManager <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {5.0.4.Final}
Sep 26, 2018 3:23:08 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
WARN: HHH10001002: Using Hibernate built-in connection pool (not for production use!)
Sep 26, 2018 3:23:08 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001005: using driver [org.postgresql.Driver] at URL [jdbc:postgresql://localhost:5432/dbprak]
Sep 26, 2018 3:23:08 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001001: Connection properties: {user=postgres, password=****}
Sep 26, 2018 3:23:08 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001003: Autocommit mode: false
Sep 26, 2018 3:23:08 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl$PooledConnections <init>
INFO: HHH000115: Hibernate connection pool size: 20 (min=1)
Sep 26, 2018 3:23:08 PM org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.PostgreSQLDialect
Sep 26, 2018 3:23:08 PM org.hibernate.engine.jdbc.env.internal.LobCreatorBuilderImpl useContextualLobCreation
INFO: HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
Sep 26, 2018 3:23:08 PM org.hibernate.type.BasicTypeRegistry register
INFO: HHH000270: Type registration [java.util.UUID] overrides previous : org.hibernate.type.UUIDBinaryType@18e36d14
Sep 26, 2018 3:23:08 PM org.hibernate.type.descriptor.java.JavaTypeDescriptorRegistry checkEqualsAndHashCode
WARN: HHH000481: Encountered Java type [class java.lang.Object] for which we could not locate a JavaTypeDescriptor and which does not appear to implement equals and/or hashCode.  This can lead to significant performance problems when performing equality/dirty checking involving this Java type.  Consider registering a custom JavaTypeDescriptor or at least implementing equals/hashCode.
Sep 26, 2018 3:23:09 PM org.hibernate.hql.internal.QueryTranslatorFactoryInitiator initiateService
INFO: HHH000397: Using ASTQueryTranslatorFactory
Hibernate: select person0_.id as id1_12_, person0_.birthday as birthday2_12_, person0_.browserUsed as browserU3_12_, person0_.cityId as cityId10_12_, person0_.creationDate as creation4_12_, person0_.firstName as firstNam5_12_, person0_.gender as gender6_12_, person0_.lastName as lastName7_12_, person0_.locationIP as location8_12_, person0_.speaks as speaks9_12_ from person person0_
Sep 26, 2018 3:23:09 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
WARN: HHH10001002: Using Hibernate built-in connection pool (not for production use!)
Sep 26, 2018 3:23:09 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001005: using driver [org.postgresql.Driver] at URL [jdbc:postgresql://localhost:5432/dbprak]
Sep 26, 2018 3:23:09 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001001: Connection properties: {user=Nils, password=****}
Sep 26, 2018 3:23:09 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001003: Autocommit mode: false
Sep 26, 2018 3:23:09 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl$PooledConnections <init>
INFO: HHH000115: Hibernate connection pool size: 20 (min=1)
Sep 26, 2018 3:23:09 PM org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.PostgreSQLDialect
Sep 26, 2018 3:23:09 PM org.hibernate.engine.jdbc.env.internal.LobCreatorBuilderImpl useContextualLobCreation
INFO: HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
Sep 26, 2018 3:23:09 PM org.hibernate.type.BasicTypeRegistry register
INFO: HHH000270: Type registration [java.util.UUID] overrides previous : org.hibernate.type.UUIDBinaryType@18e36d14
Sep 26, 2018 3:23:09 PM org.hibernate.type.descriptor.java.JavaTypeDescriptorRegistry checkEqualsAndHashCode
WARN: HHH000481: Encountered Java type [class java.lang.Object] for which we could not locate a JavaTypeDescriptor and which does not appear to implement equals and/or hashCode.  This can lead to significant performance problems when performing equality/dirty checking involving this Java type.  Consider registering a custom JavaTypeDescriptor or at least implementing equals/hashCode.
Sep 26, 2018 3:23:09 PM org.hibernate.hql.internal.QueryTranslatorFactoryInitiator initiateService
INFO: HHH000397: Using ASTQueryTranslatorFactory
Hibernate: select person0_.id as id1_12_, person0_.birthday as birthday2_12_, person0_.browserUsed as browserU3_12_, person0_.cityId as cityId10_12_, person0_.creationDate as creation4_12_, person0_.firstName as firstNam5_12_, person0_.gender as gender6_12_, person0_.lastName as lastName7_12_, person0_.locationIP as location8_12_, person0_.speaks as speaks9_12_ from person person0_

Это может быть ошибкой. INFO: HHH000424: отключение создания контекстного объекта в виде метода createClob (); ошибка: java.lang.reflect.InvocationTargetException

Но я изучаю Java и сейчас не могу правильно обрабатывать ошибки и предупреждения.Мне действительно нужен хороший совет, что менять.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...