-->
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.  [ 5 posts ] 
Author Message
 Post subject: Dont understand an error message...
PostPosted: Mon Jul 31, 2006 4:05 am 
Newbie

Joined: Mon Jul 31, 2006 3:54 am
Posts: 4
Hi all,

I am experiencing troubles with hibernate and I look into the the log and have a mysterious message, but I cannot understand it. Do you have any idea ? Thanks for your help.

Hibernate version: 3.1

Mapping documents:

<hibernate-mapping package="com.pf.projet.data.articlebis.modele">

<typedef name="formatCharType"
class="com.pf.projet.data.articlebis.util.FormatCharType">
<param name="nbChar">10</param>
</typedef>

<class name="TableRef" table="T_TABREF_REF" >

<comment>Table de reference.</comment>

<composite-id name="id" class="TableRef$Id" >
<key-property name="cotab" />
<key-property name="covlr"/>
</composite-id>


<discriminator column="cotab" type="string" insert="false" />
<property name="lbvlr" />
<property name="noord"/>


</class>

</hibernate-mapping>

Full stack trace of any exception that occurs:
org.hibernate.MappingException: Following superclasses referenced in extends not found: com.pf.projet.data.articlebis.modele.TableRef[com.pf.projet.data.articlebis.modele.suitede],com.pf.projet.data.articlebis.modele.TableRef[com.pf.projet.data.articlebis.modele.suitede],com.pf.projet.data.articlebis.modele.TableRef[com.pf.projet.data.articlebis.modele.general],com.pf.projet.data.articlebis.modele.TableRef[com.pf.projet.data.articlebis.modele.general],com.pf.projet.data.articlebis.modele.TableRef[com.pf.projet.data.articlebis.modele.commercial],com.pf.projet.data.articlebis.modele.TableRef[com.pf.projet.data.articlebis.modele.general],com.pf.projet.data.articlebis.modele.TableRef[com.pf.projet.data.articlebis.modele.logistique],com.pf.projet.data.articlebis.modele.TableRef[com.pf.projet.data.articlebis.modele.general],com.pf.projet.data.articlebis.modele.TableRef[com.pf.projet.data.articlebis.modele.general],com.pf.projet.data.articlebis.modele.TableRef[com.pf.projet.data.articlebis.modele.general]
at org.hibernate.cfg.Configuration.processExtendsQueue(Configuration.java:1085)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1004)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1168)
at com.pf.projet.util.HibernateUtil.<clinit>(HibernateUtil.java:24)
at com.pf.projet.dao.articlebis.acteurs.GroupeLDAPService.getList(GroupeLDAPService.java:87)
at com.pf.projet.actions.LoginAction.initColonnesAuthorisees(LoginAction.java:275)
at com.pf.projet.actions.LoginAction.execute(LoginAction.java:183)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)

Name and version of the database you are using:
I am using Oracle

_________________
Clement Soullard


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 31, 2006 7:46 am 
Expert
Expert

Joined: Thu Sep 22, 2005 10:29 am
Posts: 285
Location: Almassera/Valencia/Spain/EU/Earth/Solar system/Milky Way/Local Group/Virgo Supercluster
where are your subclass tags?
Code:
<subclass name="suitede" discriminator-value="xxx"/>
<subclass name="general" discriminator-value="yyy"/>
<subclass name="commercial" discriminator-value="zzz"/>
<subclass name="logistique" discriminator-value="ttt"/>


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 31, 2006 8:36 am 
Newbie

Joined: Mon Jul 31, 2006 3:54 am
Posts: 4
Thanks for answering. There are many subclasses to Table ref. But here is a typical subclass mapping of it.

I dont know what should be the normal display but only the package name is displayed in my error message, not the class name.

<hibernate-mapping package="com.pf.projet.data.article.modele.logistique" >

<typedef name="formatCharType"
class="com.pf.projet.data.article.util.FormatCharType">
<param name="nbChar">10</param>
</typedef>

<subclass name="TypeOuverture" extends="com.pf.projet.data.article.modele.TableRef" discriminator-value="TYOUVCOD" />

</hibernate-mapping>

_________________
Clement Soullard


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 01, 2006 4:01 am 
Expert
Expert

Joined: Thu Sep 22, 2005 10:29 am
Posts: 285
Location: Almassera/Valencia/Spain/EU/Earth/Solar system/Milky Way/Local Group/Virgo Supercluster
It looks like a bug in Hibernate, getting confused with the package tag in the subclasses hbm files.

Try getting rid of the package declaration. Something like this:
Code:
<hibernate-mapping>

   <typedef
      name="formatCharType"
      class="com.pf.projet.data.article.util.FormatCharType"
   >
      <param name="nbChar">10</param>
   </typedef>

   <subclass
      name="com.pf.projet.data.article.modele.logistique.TypeOuverture"
      extends="com.pf.projet.data.article.modele.TableRef"
      discriminator-value="TYOUVCOD"
   />

</hibernate-mapping>


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 01, 2006 7:47 am 
Newbie

Joined: Mon Jul 31, 2006 3:54 am
Posts: 4
I finally understand that the message "Following superclasses referenced in extends not found" was refering to the mapping definition and not the classes.

The thing was I did not had mapped the TableRef.hbm.xml in the hibernate.cfg.xml.

Basic, but the pessage was a little confusing.


Thanks for your helps.

_________________
Clement Soullard


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

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.