开发者

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

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
   +W开发者_高级运维EB-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


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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜