-->
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.  [ 3 posts ] 
Author Message
 Post subject: Pb with schema export
PostPosted: Mon Sep 15, 2003 9:12 am 
Beginner
Beginner

Joined: Mon Sep 15, 2003 9:10 am
Posts: 43
PLEASE HELP ! This is my problem :

INFO: Mapping file: C:\dvlp\OutilsNew\Hibernate-2.0.3\bin\MappingGlobal.hbm.xml
15 sept. 2003 15:08:18 net.sf.hibernate.cfg.Configuration add
GRAVE: Could not compile the mapping document
java.lang.ClassNotFoundException: Personne
at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)


MYCONFIG FILE IS :

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >

<hibernate-mapping>

<class name="Personne" table="personnes">
<id name="id" type="int" column="id">
<generator class="assigned" />
</id>
<property name="nom" type="java.lang.String" column="nom" length="255"/>
<property name="prenom" type="java.lang.String" column="prenom" length="255"/>

<set name="Entreprises" table="Personnel_Entreprise" lazy="true">
<key>
<column name="personne_id" not-null="true" />
</key>
<many-to-many class="Entreprise">
<column name="entreprise" not-null="true"/>
</many-to-many>
</set>
</class>

<class name="Entreprise" table="entreprises">
<id name="id" type="int" column="id">
<generator class="assigned" />
</id>
<property name="raisonSociale" type="java.lang.String" column="nom" length="255"/>

<set name="Personnes" table="Personnel_Entreprise" lazy="true">
<key>
<column name="entreprise_id" not-null="true" />
</key>
<many-to-many class="Personne">
<column name="personne" not-null="true"/>
</many-to-many>
</set>

</class>

</hibernate-mapping>


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 15, 2003 10:31 am 
Beginner
Beginner

Joined: Tue Aug 26, 2003 1:02 pm
Posts: 34
Location: Akron, OH
Are you really putting your classes in the default package?
I would think your mapping should look more like:

<class name="com.yourcompany.project.Personne" table="personnes">

You must put the fully qualified class name in the mapping, not just the root.


Top
 Profile  
 
 Post subject: ok !
PostPosted: Mon Sep 15, 2003 1:11 pm 
Beginner
Beginner

Joined: Mon Sep 15, 2003 9:10 am
Posts: 43
thanks that's all good !


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.