Cześć, od dwóch dni staram się uruchomić przykładowy projekt w mavenie z użyciem hibernate. Ogólnie wszystko działało na starszej wersji, jednak, gdy użyłem hibernate 5(zmieniłem również funkcję getSessionFactory() jednak jest ona dobra) ciągle mam taki komunikat:
Enitial SessionFactory creation failedorg.hibernate.internal.util.config.ConfigurationException: Unable to perform unmarshalling at line number 0 and column 0 in RESOURCE hibernate.cfg.xml. Message: null
mój plik hibernate.cfg.xml:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-5.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">org.postgresql.Driver</property>
<property name="hibernate.connection.url">jdbc:postgresql://127.0.0.1:5432/postgres</property>
<property name="hibernate.connection.username">postgres</property>
<property name="hibernate.connection.password">123</property>
<property name="hibernate.connection.pool_size">10</property>
<property name="show_sql">true</property>
<property name="dialect">org.hibernate.dialect.PostgreSQL82Dialect</property>
<property name="hibernate.current_session_context_class">thread</property>
<mapping class="pl.example.Employee" />
</session-factory>
</hibernate-configuration>
W kodzie jest wszystko dobrze, a jeśli chodzi o funkcję getSessionFactory() to wygląda ona u mnie jak w każdym przykładzie, poradniku itd. dla hibernate 5.
filemonczykShalomfilemonczyk