IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

JPA Java Discussion :

JPA hibernatetool probleme avec collection


Sujet :

JPA Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre averti
    Inscrit en
    Mars 2004
    Messages
    56
    Détails du profil
    Informations forums :
    Inscription : Mars 2004
    Messages : 56
    Par défaut JPA hibernatetool probleme avec collection
    Bonjour j'ai un problème que je n'arrive pas à comprendre, il me semble avoir configuré correctement mes entity avec les bonnes relations... J'ai toutes mes relation ne faisant pas référence à une collection qui fonctionnent (OneToOne et ManyToOne) mais dès que je tente d'obtenir quelque chose avec une collection (ManyToMany ou OneToMany) j'ai hibernatetool qui me fait l'erreur suivante :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    [hibernatetool] Executing Hibernate Tool with a JPA Configuration
    [hibernatetool] 1. task: hbm2ddl (Generates database schema)
    [hibernatetool] An exception occurred while running exporter #2:hbm2ddl (Generates database schema)
    [hibernatetool] To get the full stack trace run ant with -verbose
    [hibernatetool] org.hibernate.MappingException: Could not determine type for: java.util.Collection, at table: Application, for columns: [org.hibernate.mapping.Column(profils)]
     
    BUILD FAILED
    C:\Sarapis\build.xml:75: org.hibernate.MappingException: Could not determine type for: java.util.Collection, at table: Application, for columns: [org.hibernate.mapping.Column(profils)]
    	at org.hibernate.tool.ant.HibernateToolTask.reportException(HibernateToolTask.java:226)
    	at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:189)
    	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    	at sun.reflect.GeneratedMethodAccessor69.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.lang.reflect.Method.invoke(Unknown Source)
    	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
    	at org.apache.tools.ant.Task.perform(Task.java:348)
    	at org.apache.tools.ant.Target.execute(Target.java:357)
    	at org.apache.tools.ant.Target.performTasks(Target.java:385)
    	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
    	at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
    	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    	at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
    	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
    	at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:623)
    	at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:456)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.lang.reflect.Method.invoke(Unknown Source)
    	at org.eclipse.ant.core.AntRunner.run(AntRunner.java:377)
    	at org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:230)
    	at java.lang.Thread.run(Unknown Source)
    Caused by: org.hibernate.MappingException: Could not determine type for: java.util.Collection, at table: Application, for columns: [org.hibernate.mapping.Column(profils)]
    	at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:269)
    	at org.hibernate.mapping.Column.getSqlTypeCode(Column.java:138)
    	at org.hibernate.mapping.Column.getSqlType(Column.java:182)
    	at org.hibernate.mapping.Table.sqlCreateString(Table.java:397)
    	at org.hibernate.cfg.Configuration.generateSchemaCreationScript(Configuration.java:854)
    	at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:94)
    	at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:61)
    	at org.hibernate.tool.ant.Hbm2DDLExporterTask.execute(Hbm2DDLExporterTask.java:45)
    	at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:186)
    	... 22 more
    --- Nested Exception ---
    org.hibernate.MappingException: Could not determine type for: java.util.Collection, at table: Application, for columns: [org.hibernate.mapping.Column(profils)]
    	at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:269)
    	at org.hibernate.mapping.Column.getSqlTypeCode(Column.java:138)
    	at org.hibernate.mapping.Column.getSqlType(Column.java:182)
    	at org.hibernate.mapping.Table.sqlCreateString(Table.java:397)
    	at org.hibernate.cfg.Configuration.generateSchemaCreationScript(Configuration.java:854)
    	at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:94)
    	at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:61)
    	at org.hibernate.tool.ant.Hbm2DDLExporterTask.execute(Hbm2DDLExporterTask.java:45)
    	at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:186)
    	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    	at sun.reflect.GeneratedMethodAccessor69.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.lang.reflect.Method.invoke(Unknown Source)
    	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
    	at org.apache.tools.ant.Task.perform(Task.java:348)
    	at org.apache.tools.ant.Target.execute(Target.java:357)
    	at org.apache.tools.ant.Target.performTasks(Target.java:385)
    	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
    	at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
    	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    	at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
    	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
    	at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:623)
    	at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:456)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.lang.reflect.Method.invoke(Unknown Source)
    	at org.eclipse.ant.core.AntRunner.run(AntRunner.java:377)
    	at org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:230)
    	at java.lang.Thread.run(Unknown Source)

    sinon voici mes entity :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    package esco.sarapis.entity.application;
     
    import java.util.ArrayList;
    import java.util.Collection;
     
    import javax.persistence.CascadeType;
    import javax.persistence.Entity;
    import javax.persistence.EnumType;
    import javax.persistence.Enumerated;
    import javax.persistence.FetchType;
    import javax.persistence.JoinColumn;
    import javax.persistence.JoinTable;
    import javax.persistence.ManyToMany;
    import javax.persistence.ManyToOne;
     
    import esco.sarapis.entity.common.APersonne;
    import esco.sarapis.entity.common.AbstractEntity;
    import esco.sarapis.entity.groupe.Profil;
     
     
    @Entity
    public class Application extends AbstractEntity{
     
    	//Attibuts
    	private CategorieApplication categorie;
    	private String description;
    	private String identifiant;
    	private String nom;
    	private String password;
     
    	//Constructeurs
    	public Application(){
    		super();
    	}	
    	public Application(String identifiant, String password, String nom,
    			CategorieApplication categorie) {
    		super();
    		this.identifiant = identifiant;
    		this.password = password;
    		this.nom = nom;
    		this.categorie = categorie;
    	}
     
    	//Accesseurs
    	@Enumerated(EnumType.STRING)
    	public CategorieApplication getCategorie() {
    		return categorie;
    	}
    	public String getDescription() {
    		return description;
    	}
    	public String getIdentifiant() {
    		return identifiant;
    	}
    	public String getNom() {
    		return nom;
    	}
    	public String getPassword() {
    		return password;
    	}
    	public void setCategorie(CategorieApplication categorie) {
    		this.categorie = categorie;
    	}
    	public void setDescription(String description) {
    		this.description = description;
    	}
    	public void setIdentifiant(String identifiant) {
    		this.identifiant = identifiant;
    	}
    	public void setNom(String nom) {
    		this.nom = nom;
    	}
    	public void setPassword(String password) {
    		this.password = password;
    	}
     
    	//Relations 	
    	private Collection<Profil> profils = new ArrayList<Profil>();;
    	private APersonne proprietaire;
     
    	@ManyToMany (cascade = {CascadeType.PERSIST, CascadeType.MERGE},fetch = FetchType.EAGER)
    	@JoinTable(name="applications_profils",
    			joinColumns=
    				@JoinColumn(name="APPLICATION_ID", referencedColumnName="ID"),
    			inverseJoinColumns=
    				@JoinColumn(name="PROFIL_ID", referencedColumnName="ID"))
    	public Collection<Profil> getProfils() {
    		return profils;
    	}
    	public void setProfils(Collection<Profil> profils) {
    		this.profils = profils;
    	}
    	@ManyToOne
    	@JoinColumn(name="apersonne_fk")
    	public APersonne getProprietaire() {
    		return proprietaire;
    	}
    	public void setProprietaire(APersonne proprietaire) {
    		this.proprietaire = proprietaire;
    	}
     
    	@Override
    	public String toString() {
    		// TODO Auto-generated method stub
    		return super.toString()+String.format("Application[%s,%s,%s,%s]", this.categorie,this.description, this.identifiant, this.nom);
    	}		
     
    }
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    package esco.sarapis.entity.groupe;
     
    import java.util.ArrayList;
    import java.util.Collection;
    import java.util.Set;
     
    import javax.persistence.CascadeType;
    import javax.persistence.Entity;
    import javax.persistence.FetchType;
    import javax.persistence.JoinColumn;
    import javax.persistence.ManyToMany;
    import javax.persistence.ManyToOne;
    import javax.persistence.OneToMany;
     
    import esco.sarapis.entity.application.Application;
    import esco.sarapis.entity.common.AGroupe;
    import esco.sarapis.entity.common.APersonne;
    import esco.sarapis.entity.structure.Etablissement;
     
     
    @Entity
    public class Profil extends AGroupe{
     
    	//Attributs
    	private String regle_peuplement;
     
    	//Constructeurs
    	public Profil(String cn, CategorieGroupe categorie) {
    		super(cn, categorie);
    	}
    	public Profil(){
    		super();
    	}
     
    	//Accesseurs
    	public String getRegle_peuplement() {
    		return regle_peuplement;
    	}
    	public void setRegle_peuplement(String regle_peuplement) {
    		this.regle_peuplement = regle_peuplement;
    	}
     
    	//Relations	
    	private Etablissement proprietaire;
    	private Collection<Application> applications = new ArrayList<Application>();
     
    	@ManyToMany(cascade = {CascadeType.PERSIST, CascadeType.MERGE},fetch = FetchType.EAGER,mappedBy="profils")
    	public Collection<Application> getApplications() {
    		return applications;
    	}
    	public void setApplications(Collection<Application> applications) {
    		this.applications = applications;
    	}
    	@ManyToOne
    	@JoinColumn(name="etablissement_fk")
    	public Etablissement getProprietaire() {
    		return proprietaire;
    	}
    	public void setProprietaire(Etablissement proprietaire) {
    		this.proprietaire = proprietaire;
    	}
     
    	@Override
    	public String toString() {
    		// TODO Auto-generated method stub
    		return super.toString()+String.format("Profil[%s]", this.regle_peuplement);
    	}
     
    }
    Mon entity AGroupe dont profil hérite.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    package esco.sarapis.entity.common;
     
    import javax.persistence.Entity;
    import javax.persistence.EnumType;
    import javax.persistence.Enumerated;
    import javax.persistence.Inheritance;
    import javax.persistence.InheritanceType;
     
    import esco.sarapis.entity.groupe.CategorieGroupe;
     
     
    @Entity
    @Inheritance(strategy=InheritanceType.JOINED)
    public abstract class AGroupe extends AbstractEntity{
     
    	//Attributs
    	@Enumerated(EnumType.STRING)
    	private CategorieGroupe categorie;
    	private String cn;
    	private String description;
     
    	//Constructeurs
    	public AGroupe(String cn, CategorieGroupe categorie) {
    		super();
    		this.cn = cn;
    		this.categorie = categorie;
    	}
     
    	public AGroupe(){
    		super();
    	}
     
    	//Accesseurs
    	public CategorieGroupe getCategorie() {
    		return categorie;
    	}
    	public String getCn() {
    		return cn;
    	}
    	public String getDescription() {
    		return description;
    	}
    	public void setCategorie(CategorieGroupe categorie) {
    		this.categorie = categorie;
    	}
    	public void setCn(String cn) {
    		this.cn = cn;
    	}
    	public void setDescription(String description) {
    		this.description = description;
    	}
     
    	@Override
    	public String toString() {
    		// TODO Auto-generated method stub
    		return super.toString()+String.format("AGroupe[%s,%s,%s]", this.categorie, this.cn, this.description);
    	}
     
     
    }
    Voici mon abstractEnty dont toutes mes entity héritent.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    package esco.sarapis.entity.common;
     
    import java.io.Serializable;
    import java.util.Date;
     
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.MappedSuperclass;
    import javax.persistence.Temporal;
    import javax.persistence.TemporalType;
    import javax.persistence.Version;
     
    @MappedSuperclass
    public abstract class AbstractEntity implements Serializable{
     
    	//Attributs
    	@Id
    	@GeneratedValue(strategy = GenerationType.AUTO)
    	private long id;
    	@Version
    	private int version;	
    	@Temporal(value = TemporalType.TIMESTAMP)
    	private Date dateCreation;
    	@Temporal(value = TemporalType.TIMESTAMP)
    	private Date dateModification;
     
    	//Constructeur
    	public AbstractEntity(){
    		this.dateCreation.getTime();
    		this.dateModification.getTime();
    	}
     
    	//Accesseurs
    	public long getId() {
    		return id;
    	}
    	public void setId(long id) {
    		this.id = id;
    	}
    	public int getVersion() {
    		return version;
    	}
    	public void setVersion(int version) {
    		this.version = version;
    	}
    	public Date getDateCreation() {
    		return dateCreation;
    	}
    	public void setDateCreation(Date dateCreation) {
    		this.dateCreation = dateCreation;
    	}
    	public Date getDateModification() {
    		return dateModification;
    	}
    	public void setDateModification(Date dateModif) {
    		this.dateModification = dateModif;
    	}
     
    	@Override
    	public int hashCode() {
    		final int prime = 31;
    		int result = 1;
    		result = prime * result
    		+ ((dateCreation == null) ? 0 : dateCreation.hashCode());
    		result = prime * result
    		+ ((dateModification == null) ? 0 : dateModification.hashCode());
    		result = prime * result + (int) (id ^ (id >>> 32));
    		result = prime * result + version;
    		return result;
    	}
     
    	@Override
    	public boolean equals(Object obj) {
    		if (this == obj)
    			return true;
    		if (obj == null)
    			return false;
    		if (!(obj instanceof AbstractEntity))
    			return false;
    		final AbstractEntity other = (AbstractEntity) obj;
    		if (dateCreation == null) {
    			if (other.dateCreation != null)
    				return false;
    		} else if (!dateCreation.equals(other.dateCreation))
    			return false;
    		if (dateModification == null) {
    			if (other.dateModification != null)
    				return false;
    		} else if (!dateModification.equals(other.dateModification))
    			return false;
    		if (id != other.id)
    			return false;
    		if (version != other.version)
    			return false;
    		return true;
    	}
     
    	@Override
    	public String toString(){
    		return String.format("Entity[%d,%d,%s,%s]", id, version, dateCreation.toString(),dateModification.toString());
     
    	}
     
    }
    pour expliquer rapidement la relation application profil est de cardinalité n..m et vice versa.


    Si vous voulez d'autres information n'hésitez pas à me demander, là ça fait 1 journée déjà que je ne comprend pas mon problème.

    Sinon voici mon script ant pour générer mon schema sql :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    <project name="Sarapis" default="compile" basedir=".">
     
    	<!-- nom du projet et version -->
    	<property name="proj.name" value="Sarapis" />
    	<property name="proj.shortname" value="Sarapis" />
    	<property name="version" value="1.0" />
     
    	<!-- Propriété globales -->
    	<property name="src.java.dir" value="src" />
    	<property name="lib.dir" value="lib" />
    	<property name="driver.jar" value="lib/mysql-connector-java-5.0.8-bin.jar" />
    	<property name="build.dir" value="bin" />
    	<property name="dist.dir" value="dist"/>
    	<property name="ddl.dir" value="${build.dir}/properties/bd"/>  	
     
    	<!-- le Classpath du projet -->
    	<path id="project.classpath">
    		<fileset dir="${lib.dir}">
    			<include name="**/*.jar" />
    		</fileset>
    	</path>
    	<path id="jpatoolslib">
    		<path location="lib/hibernate3.jar" />
    		<path location="lib/hibernate-tools.jar" />
    	    <path location="lib/commons-logging-1.0.4.jar" />
    	    <path location="lib/commons-collections-2.1.1.jar" />
    	    <path location="lib/dom4j-1.6.1.jar" />
    	    <path location="lib/freemarker.jar" />
    	    <path location="${driver.jar}" />
    	</path>
    	<path id="ejb3toolslib">
    	 <path refid="jpatoolslib"/> <!-- ref to previously defined toolslib -->
    	 <path location="lib/hibernate-annotations.jar" />
    	 <path location="lib/hibernate-commons-annotations.jar" />
    	 <path location="lib/ejb3-persistence.jar" />
    	 <path location="lib/hibernate-entitymanager.jar" />
    	 <path location="lib/jboss-archive-browsing.jar" />
    	 <path location="lib/javassist-3.7.jar" /> 
    	</path>
     
    	<!-- Nettoyage projet -->
    	<target name="clean" description="Nettoyer le projet">
    	    <delete dir="${build.dir}"/>
    		<mkdir dir="${build.dir}" />
    	    <delete dir="${dist.dir}"/>
    		<delete dir="${ddl.dir}"/>
    		<mkdir dir="${ddl.dir}" />
    	</target>
     
    	<target name="compile" depends="clean">
    		<javac srcdir="${src.java.dir}" destdir="${build.dir}" classpathref="project.classpath" />
    		<!-- Copy associated resource files -->
    	    <copy  todir="${build.dir}/META-INF">
    	    	<fileset dir="${src.java.dir}/META-INF" includes="**/*"/>
    	    </copy>
    		<copy  todir="${build.dir}">
    	    	<fileset dir="${src.java.dir}/properties" includes="**/*"/>
    	    </copy>
    	</target>
     
     
    	<!-- Hibernate Tools -->
    	<taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="ejb3toolslib" />
     
    	<!-- Générer le schéma de la base -->
    	<target name="DDL" depends="compile" description="Génération DDL base">
    		<mkdir dir="${ddl.dir}" />
    		<hibernatetool destdir="${basedir}">
    			<property key="jdk5" value="true" />
    			<property key="ejb3" value="true" />
    			<classpath path="${build.dir}" />
    			<!-- Utiliser META-INF/persistence.xml -->
    			<jpaconfiguration />
    			<!-- export -->
    			<hbm2ddl drop="true" create="true" export="false" outputfilename="${ddl.dir}/schema.sql" delimiter=";" format="true" />
    		</hibernatetool>
    	</target>
     
    	<!-- Générer la base -->
    	<target name="BD" depends="compile" description="Génération BD">
    		<hibernatetool destdir="${basedir}">
    			<classpath path="${build.dir}"/>
    			<!-- Utiliser META-INF/persistence.xml -->
    			<jpaconfiguration />
    			<!-- export -->
    			<hbm2ddl drop="true" create="true" export="true" outputfilename="${ddl.dir}/schema.sql" delimiter=";" format="true" />
    		</hibernatetool>
    	</target>
    </project>

  2. #2
    Membre averti
    Inscrit en
    Mars 2004
    Messages
    56
    Détails du profil
    Informations forums :
    Inscription : Mars 2004
    Messages : 56
    Par défaut
    juste pour plus de détails voici ce qui est affiché dans la console lors de l'exécution de la tache ant ddl

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    Apache Ant version 1.7.0 compiled on December 13 2006
    Buildfile: C:\Sarapis\build.xml
    parsing buildfile C:\Sarapis\build.xml with URI = file:/C:/Sarapis/build.xml
    Project base dir set to: C:\Sarapis
    [antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found.
    Build sequence for target(s) `DDL' is [compile, DDL]
    Complete build sequence is [compile, DDL, clean, BD, ]
    compile:
        [javac] META-INF\persistence.xml skipped - don't know how to handle it
        [javac] esco\sarapis\entity\application\Application-d.ucd skipped - don't know how to handle it
        [javac] esco\sarapis\entity\application\Application-d.uml skipped - don't know how to handle it
        [javac] esco\sarapis\entity\application\Application.java omitted as C:\Sarapis\bin\esco\sarapis\entity\application\Application.class is up to date.
        ... compilation des classes OK
        [javac] properties\keys.properties skipped - don't know how to handle it
        [javac] properties\log4j.properties skipped - don't know how to handle it
        [javac] spring-config.xml skipped - don't know how to handle it
         [copy] persistence.xml omitted as C:\Sarapis\bin\META-INF\persistence.xml is up to date.
         [copy] No sources found.
         [copy] keys.properties omitted as C:\Sarapis\bin\keys.properties is up to date.
         [copy] log4j.properties added as log4j.properties is outdated.
         [copy] No sources found.
         [copy] Copying 1 file to C:\Sarapis\bin
         [copy] Copying C:\Sarapis\src\properties\log4j.properties to C:\Sarapis\bin\log4j.properties
    DDL:
        [mkdir] Skipping C:\Sarapis\bin\properties\bd because it already exists.
    [hibernatetool] Executing Hibernate Tool with a JPA Configuration
    [hibernatetool] 1. task: hbm2ddl (Generates database schema)
    [hibernatetool] 15 mai 2008 12:12:11 org.hibernate.cfg.annotations.Version <clinit>
    [hibernatetool] INFO: Hibernate Annotations 3.3.1.GA
    [hibernatetool] 15 mai 2008 12:12:11 org.hibernate.cfg.Environment <clinit>
    [hibernatetool] INFO: Hibernate 3.2.6
    [hibernatetool] 15 mai 2008 12:12:11 org.hibernate.cfg.Environment <clinit>
    [hibernatetool] INFO: hibernate.properties not found
    [hibernatetool] 15 mai 2008 12:12:11 org.hibernate.cfg.Environment buildBytecodeProvider
    [hibernatetool] INFO: Bytecode provider name : cglib
    [hibernatetool] 15 mai 2008 12:12:11 org.hibernate.cfg.Environment <clinit>
    [hibernatetool] INFO: using JDK 1.4 java.sql.Timestamp handling
    [hibernatetool] 15 mai 2008 12:12:11 org.hibernate.ejb.Version <clinit>
    [hibernatetool] INFO: Hibernate EntityManager 3.3.2.GA
    [hibernatetool] 15 mai 2008 12:12:12 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.application.Application
    [hibernatetool] 15 mai 2008 12:12:12 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.application.Application on table Application
    [hibernatetool] 15 mai 2008 12:12:12 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.application.PluginDescription
    [hibernatetool] 15 mai 2008 12:12:12 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.fonction.TypeDomaine
    [hibernatetool] 15 mai 2008 12:12:12 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.fonction.TypeDomaine on table TypeDomaine
    [hibernatetool] 15 mai 2008 12:12:12 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.common.APersonne
    [hibernatetool] 15 mai 2008 12:12:12 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.common.APersonne on table APersonne
    [hibernatetool] 15 mai 2008 12:12:12 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.personne.Enseignant
    [hibernatetool] 15 mai 2008 12:12:12 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.personne.Enseignant on table Enseignant
    [hibernatetool] 15 mai 2008 12:12:12 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.structure.BassinFormation
    [hibernatetool] 15 mai 2008 12:12:12 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.structure.BassinFormation on table BassinFormation
    [hibernatetool] 15 mai 2008 12:12:12 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.personne.PersonelExterieur
    [hibernatetool] 15 mai 2008 12:12:12 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.personne.PersonelExterieur on table PersonelExterieur
    [hibernatetool] 15 mai 2008 12:12:12 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.education.MEF
    [hibernatetool] 15 mai 2008 12:12:12 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.education.MEF on table MEF
    [hibernatetool] 15 mai 2008 12:12:12 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.education.Enseignement
    [hibernatetool] 15 mai 2008 12:12:12 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.education.Enseignement on table Enseignement
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.common.AFonction
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.common.AFonction on table AFonction
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.fonction.Fonction
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.fonction.Fonction on table Fonction
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.fonction.FonctionClasse
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.fonction.FonctionClasse on table FonctionClasse
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.personne.Eleve
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.personne.Eleve on table Eleve
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.fonction.FonctionEnseignement
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.fonction.FonctionEnseignement on table FonctionEnseignement
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.fonction.FonctionRelation
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.fonction.FonctionRelation on table FonctionRelation
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.common.AStructure
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.common.AStructure on table AStructure
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.structure.CollectiviteLocale
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.structure.CollectiviteLocale on table CollectiviteLocale
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.personne.TuteurStage
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.personne.TuteurStage on table TuteurStage
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.common.AGroupe
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.common.AGroupe on table AGroupe
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.groupe.GroupementEtablissements
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.groupe.GroupementEtablissements on table GroupementEtablissements
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.groupe.RelationEleve
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.groupe.RelationEleve on table RelationEleve
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.groupe.Profil
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.groupe.Profil on table Profil
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.fonction.TypeService
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.fonction.TypeService on table TypeService
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.structure.Etablissement
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.structure.Etablissement on table Etablissement
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.structure.TypeStructure
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.structure.TypeStructure on table TypeStructure
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.education.Discipline
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.education.Discipline on table Discipline
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.groupe.Classe
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.groupe.Classe on table Classe
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.structure.Contrat
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.structure.Contrat on table Contrat
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.fonction.FonctionMEF
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.fonction.FonctionMEF on table FonctionMEF
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.groupe.RoleApplicatif
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.groupe.RoleApplicatif on table RoleApplicatif
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.fonction.FonctionDomaineGroupementEtablissement
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.fonction.FonctionDomaineGroupementEtablissement on table FonctionDomaineGroupementEtablissement
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.personne.NonEnseignantEtablissement
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.personne.NonEnseignantEtablissement on table NonEnseignantEtablissement
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.personne.ResponsableEntreprise
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.personne.ResponsableEntreprise on table ResponsableEntreprise
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.structure.ServiceAcademique
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.structure.ServiceAcademique on table ServiceAcademique
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.groupe.Groupe
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.groupe.Groupe on table Groupe
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.fonction.FonctionStage
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.fonction.FonctionStage on table FonctionStage
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.personne.Telephone
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.personne.Telephone on table Telephone
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.structure.Ministere
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.structure.Ministere on table Ministere
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.personne.NonEnseignantCollectiviteLocale
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.personne.NonEnseignantCollectiviteLocale on table NonEnseignantCollectiviteLocale
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.structure.CentreInteret
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.structure.CentreInteret on table CentreInteret
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.structure.Entreprise
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.structure.Entreprise on table Entreprise
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.fonction.TypeFonctionFiliere
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.fonction.TypeFonctionFiliere on table TypeFonctionFiliere
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.personne.NonEnseignantServiceAcademique
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.personne.NonEnseignantServiceAcademique on table NonEnseignantServiceAcademique
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.fonction.FonctionDomaine
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.fonction.FonctionDomaine on table FonctionDomaine
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationBinder bindClass
    [hibernatetool] INFO: Binding entity from annotated class: esco.sarapis.entity.personne.PersonneRelationEleve
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.annotations.EntityBinder bindTable
    [hibernatetool] INFO: Bind entity esco.sarapis.entity.personne.PersonneRelationEleve on table PersonneRelationEleve
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.cfg.AnnotationConfiguration secondPassCompile
    [hibernatetool] INFO: Hibernate Validator not found: ignoring
    [hibernatetool] 15 mai 2008 12:12:13 org.hibernate.dialect.Dialect <init>
    [hibernatetool] INFO: Using dialect: org.hibernate.dialect.MySQL5Dialect
    [hibernatetool] An exception occurred while running exporter #2:hbm2ddl (Generates database schema)
    [hibernatetool] To get the full stack trace run ant with -verbose
    [hibernatetool] org.hibernate.MappingException: Could not determine type for: java.util.Set, at table: Application, for columns: [org.hibernate.mapping.Column(profils)]
     
    BUILD FAILED
    C:\Sarapis\build.xml:75: org.hibernate.MappingException: Could not determine type for: java.util.Set, at table: Application, for columns: [org.hibernate.mapping.Column(profils)]
    	at org.hibernate.tool.ant.HibernateToolTask.reportException(HibernateToolTask.java:226)
    	at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:189)
    	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    	at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.lang.reflect.Method.invoke(Unknown Source)
    	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
    	at org.apache.tools.ant.Task.perform(Task.java:348)
    	at org.apache.tools.ant.Target.execute(Target.java:357)
    	at org.apache.tools.ant.Target.performTasks(Target.java:385)
    	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
    	at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
    	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    	at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
    	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
    	at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
    	at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
    Caused by: org.hibernate.MappingException: Could not determine type for: java.util.Set, at table: Application, for columns: [org.hibernate.mapping.Column(profils)]
    	at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:269)
    	at org.hibernate.mapping.Column.getSqlTypeCode(Column.java:138)
    	at org.hibernate.mapping.Column.getSqlType(Column.java:182)
    	at org.hibernate.mapping.Table.sqlCreateString(Table.java:397)
    	at org.hibernate.cfg.Configuration.generateSchemaCreationScript(Configuration.java:854)
    	at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:94)
    	at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:61)
    	at org.hibernate.tool.ant.Hbm2DDLExporterTask.execute(Hbm2DDLExporterTask.java:45)
    	at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:186)
    	... 15 more
    --- Nested Exception ---
    org.hibernate.MappingException: Could not determine type for: java.util.Set, at table: Application, for columns: [org.hibernate.mapping.Column(profils)]
    	at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:269)
    	at org.hibernate.mapping.Column.getSqlTypeCode(Column.java:138)
    	at org.hibernate.mapping.Column.getSqlType(Column.java:182)
    	at org.hibernate.mapping.Table.sqlCreateString(Table.java:397)
    	at org.hibernate.cfg.Configuration.generateSchemaCreationScript(Configuration.java:854)
    	at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:94)
    	at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:61)
    	at org.hibernate.tool.ant.Hbm2DDLExporterTask.execute(Hbm2DDLExporterTask.java:45)
    	at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:186)
    	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    	at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.lang.reflect.Method.invoke(Unknown Source)
    	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
    	at org.apache.tools.ant.Task.perform(Task.java:348)
    	at org.apache.tools.ant.Target.execute(Target.java:357)
    	at org.apache.tools.ant.Target.performTasks(Target.java:385)
    	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
    	at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
    	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    	at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
    	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
    	at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
    	at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
     
    Total time: 2 seconds

  3. #3
    Membre averti
    Inscrit en
    Mars 2004
    Messages
    56
    Détails du profil
    Informations forums :
    Inscription : Mars 2004
    Messages : 56
    Par défaut
    Bizarre mais il fallait mettre les annotation au niveau des attributs et non au niveau des accesseurs

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. probleme avec JPA
    Par riadhhwajdii dans le forum JPA
    Réponses: 0
    Dernier message: 29/10/2009, 09h46
  2. Probleme avec les collections
    Par viavba dans le forum Général VBA
    Réponses: 2
    Dernier message: 19/09/2008, 16h26
  3. [Struts-Layout] probleme avec la collection
    Par verdi-verda dans le forum Struts 1
    Réponses: 2
    Dernier message: 17/09/2008, 19h58
  4. Réponses: 1
    Dernier message: 19/07/2007, 14h53
  5. [Struts-Layout] pager and collection, probleme avec sort
    Par chouchou93 dans le forum Struts 1
    Réponses: 22
    Dernier message: 27/06/2007, 13h34

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo