-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Different behavior of hibernate between 2 tomcat
PostPosted: Mon Jul 18, 2011 3:54 am 
Newbie

Joined: Mon Jul 18, 2011 3:37 am
Posts: 1
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.