Org.hibernate.cfg.Environment - hibernate.properties not found

I am working on a project that uses GWT on the client side, Tomcat Apache server, MySQL, Hibernate with JPA. I also use annotations and EntityManager. My folder structure is as follows:

+build
+java
   +com
   +META-INF
       persistence.xml
+webcontent
   +WEB-INF

I get the following output in the console among other information

INFO org.hibernate.cfg.Environment  - hibernate.properties not found
INFO org.hibernate.cfg.Environment  - Bytecode provider name : javassist

I also tried placing persistence.xml inside web-inf / meta-inf, but I still get the same error. This only happens when I manage it on the server. If I test it locally using the main class, it works. Any idea why it cannot find the properties file

+3
source share
1 answer

Hibernate , hibernate.properties. , webcontent/WEB-INF/hibernate.properties

persistence.xml :

<properties>
 <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" />
</properties>
+3

Source: https://habr.com/ru/post/1786817/


All Articles