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, everything works fine as I deploy my portlet but on when I try to deploy it on a server, Hibernate can't load my entities. In the two cases, I'm deploying the same war with the same portal (Liferay 6.0.6).
I've looked in my logs and I can see that the "PU Root URL" is different between the 2 instances.
Here is the version on my computer :
Code:
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 :
Code:
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.
I think I must have a problem with my tomcat configuration but as I don't really know how this "PU root URL" is generated, I don't know where to look.
Has anybody an idea why I get this difference ?
Thanks,
Anthony