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

17,731

Hibernate just informs you that it wasn't able to find file named hibernate.properties. If you would like to get rid of this log message create webcontent/WEB-INF/hibernate.properties

You can provide vendor specific properties in the persistence.xml directly like this :

<properties>
 <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" />
</properties>
Share:
17,731
Admin
Author by

Admin

Updated on July 29, 2022

Comments

  • Admin
    Admin over 1 year

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

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

    I am getting following output in the console among other info

    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 same error. This is happening only when I operate it on server. If I test it locally using a main class, it works. Any idea why it can not find properties file