掲示板

Different behavior of hibernate between 2 installations of Liferays

12年前 に Anthony Charkes によって更新されました。

Different behavior of hibernate between 2 installations of Liferays

New Member 投稿: 1 参加年月日: 11/07/15 最新の投稿
Hello,

I have a problem I can't understand and I hope somebody will be able to help.
I'm currently developing a portlet using spring MVC and Hibernate. On my development computer, I have installed the Liferay's bundle (6.0.6) and everything work fine. But I'm trying to deploy my Portlet on a Liferay 6.0.6 (but not with the bundle) on a server and Hibernate doesn't load my entities.
I've looked in my logs and I can see that the "PU Root URL" is different between the 2 instances. I'm deploying the same war in the two cases.

Here is the version on my computer :

Console> 2011-07-15 14:27:55|DEBUG|| Ejb3Configuration.configure |Processing PersistenceUnitInfo [
	name: GU
	persistence provider classname: org.hibernate.ejb.HibernatePersistence
	classloader: WebappClassLoader
  context: /DP-GuichetUnique-AlerteSanitaire-Portlet-2.2.0-SNAPSHOT
  delegate: false
  repositories:
    /WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@16fa474

	Temporary classloader: org.springframework.instrument.classloading.SimpleThrowawayClassLoader@10699f0
	excludeUnlistedClasses: false
	JTA datasource: null
	Non JTA datasource: com.mchange.v2.c3p0.ComboPooledDataSource [ ... ]
	Transaction type: RESOURCE_LOCAL
	PU root URL: file:/D:/liferay/bundles/liferay-portal-6.0.6/tomcat-6.0.29/webapps/DP-GuichetUnique-AlerteSanitaire-Portlet-2.2.0-SNAPSHOT/WEB-INF/lib/DP-GuichetUnique-Objects-2.2.0-SNAPSHOT.jar
	Jar files URLs []
	Managed classes names []
	Mapping files names []
	Properties []


And here is the one on the server :

Console> 2011-07-15 16:19:37|DEBUG|| Ejb3Configuration.configure |Processing PersistenceUnitInfo [
	name: GU
	persistence provider classname: org.hibernate.ejb.HibernatePersistence
	classloader: WebappClassLoader
  context: /DP-GuichetUnique-AlerteSanitaire-Portlet-2.2.0-SNAPSHOT
  delegate: false
  repositories:
    /WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@181edf4

	Temporary classloader: org.springframework.instrument.classloading.SimpleThrowawayClassLoader@130e79d
	excludeUnlistedClasses: false
	JTA datasource: null
	Non JTA datasource: com.mchange.v2.c3p0.ComboPooledDataSource [... ]
	Transaction type: RESOURCE_LOCAL
	PU root URL: file:/usr/MIDDLE/cnop/guichet-unique/tomcat1/work/Standalone/guichet-unique/DP-GuichetUnique-AlerteSanitaire-Portlet-2.2.0-SNAPSHOT/loader/
	Jar files URLs []
	Managed classes names []
	Mapping files names []
	Properties []


As a result, the hibernate entities (that are in DP-GuichetUnique-AlerteSanitaire-Portlet-2.2.0-SNAPSHOT.jar with my persistence.xml) are not found on my server.
Has anybody an idea why I don't have the same behavior between my 2 Liferays ?

Thanks,

Anthony